diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 789a9564..ee1cd268 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,41 +1,37 @@ lockVersion: 2.0.0 id: 16f22cbf-f23f-4419-8924-3a4b06381947 management: - docChecksum: dd151459f079aa5c974ad9f0015d580a - docVersion: 0.0.3 - speakeasyVersion: 1.615.2 - generationVersion: 2.698.4 - releaseVersion: 0.40.3 - configChecksum: da34b6fc69cb6f59e054eff389118e32 + docChecksum: 6a5b4b24f1aa8b0f4b9e30c1d9acc3f5 + docVersion: 1.1.1 + speakeasyVersion: 1.636.3 + generationVersion: 2.723.11 + releaseVersion: 0.41.0 + configChecksum: d4b97562752f27158ff7bf3b9131f924 repoURL: https://github.com/LukeHagar/plexjs.git repoSubDirectory: . installationURL: https://github.com/LukeHagar/plexjs published: true features: typescript: + acceptHeaders: 2.81.2 additionalDependencies: 0.1.0 - constsAndDefaults: 0.1.12 - core: 3.21.22 + additionalProperties: 0.1.1 + core: 3.21.26 + deepObjectParams: 0.1.0 defaultEnabledRetries: 0.1.0 - deprecations: 2.81.1 downloadStreams: 0.1.1 enumUnions: 0.1.0 - enums: 2.82.1 envVarSecurityUsage: 0.1.2 - errors: 2.86.0 - flattening: 2.82.1 globalSecurity: 2.82.14 globalSecurityCallbacks: 0.1.0 globalSecurityFlattening: 0.1.0 globalServerURLs: 2.82.5 - methodServerURLs: 2.82.1 + globals: 2.82.2 nameOverrides: 2.81.2 - nullables: 0.1.1 - openEnums: 0.1.1 responseFormat: 0.2.3 retries: 2.83.0 sdkHooks: 0.3.0 - unions: 2.85.11 + unions: 2.86.0 uploadStreams: 0.1.0 generatedFiles: - .gitattributes @@ -44,1028 +40,1287 @@ 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/addplaylistcontentsunauthorized.md - - docs/sdk/models/errors/applyupdatesbadrequest.md - - docs/sdk/models/errors/applyupdateserrors.md - - docs/sdk/models/errors/applyupdatesunauthorized.md - - docs/sdk/models/errors/applyupdatesupdatererrors.md - - docs/sdk/models/errors/cancelserveractivitiesactivitieserrors.md - - docs/sdk/models/errors/cancelserveractivitiesbadrequest.md - - docs/sdk/models/errors/cancelserveractivitieserrors.md - - docs/sdk/models/errors/cancelserveractivitiesunauthorized.md - - docs/sdk/models/errors/checkforupdatesbadrequest.md - - docs/sdk/models/errors/checkforupdateserrors.md - - docs/sdk/models/errors/checkforupdatesunauthorized.md - - docs/sdk/models/errors/checkforupdatesupdatererrors.md - - docs/sdk/models/errors/clearplaylistcontentsbadrequest.md - - docs/sdk/models/errors/clearplaylistcontentserrors.md - - docs/sdk/models/errors/clearplaylistcontentsplaylistserrors.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/createplaylistunauthorized.md - - docs/sdk/models/errors/deletelibrarybadrequest.md - - docs/sdk/models/errors/deletelibraryerrors.md - - docs/sdk/models/errors/deletelibrarylibraryerrors.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/deleteplaylistunauthorized.md - - docs/sdk/models/errors/enablepapertrailbadrequest.md - - docs/sdk/models/errors/enablepapertrailerrors.md - - docs/sdk/models/errors/enablepapertraillogerrors.md - - docs/sdk/models/errors/enablepapertrailunauthorized.md - - docs/sdk/models/errors/errors.md - - docs/sdk/models/errors/getactorslibrarybadrequest.md - - docs/sdk/models/errors/getactorslibraryerrors.md - - docs/sdk/models/errors/getactorslibrarylibraryerrors.md - - docs/sdk/models/errors/getactorslibraryunauthorized.md - - docs/sdk/models/errors/getalllibrariesbadrequest.md - - docs/sdk/models/errors/getalllibrarieserrors.md - - docs/sdk/models/errors/getalllibrarieslibraryerrors.md - - docs/sdk/models/errors/getalllibrariesunauthorized.md - - docs/sdk/models/errors/getavailableclientsbadrequest.md - - docs/sdk/models/errors/getavailableclientserrors.md - - docs/sdk/models/errors/getavailableclientsservererrors.md - - docs/sdk/models/errors/getavailableclientsunauthorized.md - - docs/sdk/models/errors/getbandwidthstatisticsbadrequest.md - - docs/sdk/models/errors/getbandwidthstatisticserrors.md - - docs/sdk/models/errors/getbandwidthstatisticsstatisticserrors.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/getbannerimageunauthorized.md - - docs/sdk/models/errors/getbutlertasksbadrequest.md - - docs/sdk/models/errors/getbutlertasksbutlererrors.md - - docs/sdk/models/errors/getbutlertaskserrors.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/getcompanionsdataunauthorized.md - - docs/sdk/models/errors/getcountrieslibrarybadrequest.md - - docs/sdk/models/errors/getcountrieslibraryerrors.md - - docs/sdk/models/errors/getcountrieslibrarylibraryerrors.md - - docs/sdk/models/errors/getcountrieslibraryunauthorized.md - - docs/sdk/models/errors/getdevicesbadrequest.md - - docs/sdk/models/errors/getdeviceserrors.md - - docs/sdk/models/errors/getdevicesservererrors.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/getfilehashunauthorized.md - - docs/sdk/models/errors/getgenreslibrarybadrequest.md - - docs/sdk/models/errors/getgenreslibraryerrors.md - - docs/sdk/models/errors/getgenreslibrarylibraryerrors.md - - docs/sdk/models/errors/getgenreslibraryunauthorized.md - - docs/sdk/models/errors/getgeodatabadrequest.md - - docs/sdk/models/errors/getgeodataerrors.md - - docs/sdk/models/errors/getgeodataplexerrors.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/getglobalhubsunauthorized.md - - docs/sdk/models/errors/gethomedatabadrequest.md - - docs/sdk/models/errors/gethomedataerrors.md - - docs/sdk/models/errors/gethomedataplexerrors.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/getlibrarydetailsunauthorized.md - - docs/sdk/models/errors/getlibraryhubsbadrequest.md - - docs/sdk/models/errors/getlibraryhubserrors.md - - docs/sdk/models/errors/getlibraryhubshubserrors.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/getlibraryitemsunauthorized.md - - docs/sdk/models/errors/getlibrarysectionsallbadrequest.md - - docs/sdk/models/errors/getlibrarysectionsallerrors.md - - docs/sdk/models/errors/getlibrarysectionsalllibraryerrors.md - - docs/sdk/models/errors/getlibrarysectionsallunauthorized.md - - docs/sdk/models/errors/getmediametadatabadrequest.md - - docs/sdk/models/errors/getmediametadataerrors.md - - docs/sdk/models/errors/getmediametadatalibraryerrors.md - - docs/sdk/models/errors/getmediametadataunauthorized.md - - docs/sdk/models/errors/getmediaprovidersbadrequest.md - - docs/sdk/models/errors/getmediaproviderserrors.md - - docs/sdk/models/errors/getmediaprovidersservererrors.md - - docs/sdk/models/errors/getmediaprovidersunauthorized.md - - docs/sdk/models/errors/getmetadatachildrenbadrequest.md - - docs/sdk/models/errors/getmetadatachildrenerrors.md - - docs/sdk/models/errors/getmetadatachildrenlibraryerrors.md - - docs/sdk/models/errors/getmetadatachildrenunauthorized.md - - docs/sdk/models/errors/getmyplexaccountbadrequest.md - - docs/sdk/models/errors/getmyplexaccounterrors.md - - docs/sdk/models/errors/getmyplexaccountservererrors.md - - docs/sdk/models/errors/getmyplexaccountunauthorized.md - - docs/sdk/models/errors/getpinbadrequest.md - - docs/sdk/models/errors/getpinerrors.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/getplaylistcontentsunauthorized.md - - docs/sdk/models/errors/getplaylisterrors.md - - docs/sdk/models/errors/getplaylistplaylistserrors.md - - docs/sdk/models/errors/getplaylistsbadrequest.md - - docs/sdk/models/errors/getplaylistserrors.md - - docs/sdk/models/errors/getplaylistsplaylistserrors.md - - docs/sdk/models/errors/getplaylistsunauthorized.md - - docs/sdk/models/errors/getplaylistunauthorized.md - - docs/sdk/models/errors/getrecentlyaddedlibrarybadrequest.md - - docs/sdk/models/errors/getrecentlyaddedlibraryerrors.md - - docs/sdk/models/errors/getrecentlyaddedlibrarylibraryerrors.md - - docs/sdk/models/errors/getrecentlyaddedlibraryunauthorized.md - - docs/sdk/models/errors/getrefreshlibrarymetadatabadrequest.md - - docs/sdk/models/errors/getrefreshlibrarymetadataerrors.md - - docs/sdk/models/errors/getrefreshlibrarymetadatalibraryerrors.md - - docs/sdk/models/errors/getrefreshlibrarymetadataunauthorized.md - - docs/sdk/models/errors/getresizedphotobadrequest.md - - docs/sdk/models/errors/getresizedphotoerrors.md - - docs/sdk/models/errors/getresizedphotoservererrors.md - - docs/sdk/models/errors/getresizedphotounauthorized.md - - docs/sdk/models/errors/getresourcesstatisticsbadrequest.md - - docs/sdk/models/errors/getresourcesstatisticserrors.md - - docs/sdk/models/errors/getresourcesstatisticsstatisticserrors.md - - docs/sdk/models/errors/getresourcesstatisticsunauthorized.md - - docs/sdk/models/errors/getsearchalllibrariesbadrequest.md - - docs/sdk/models/errors/getsearchalllibrarieserrors.md - - docs/sdk/models/errors/getsearchalllibrarieslibraryerrors.md - - docs/sdk/models/errors/getsearchalllibrariesunauthorized.md - - docs/sdk/models/errors/getsearchlibrarybadrequest.md - - docs/sdk/models/errors/getsearchlibraryerrors.md - - docs/sdk/models/errors/getsearchlibrarylibraryerrors.md - - docs/sdk/models/errors/getsearchlibraryunauthorized.md - - docs/sdk/models/errors/getsearchresultsbadrequest.md - - docs/sdk/models/errors/getsearchresultserrors.md - - docs/sdk/models/errors/getsearchresultssearcherrors.md - - docs/sdk/models/errors/getsearchresultsunauthorized.md - - docs/sdk/models/errors/getserveractivitiesactivitieserrors.md - - docs/sdk/models/errors/getserveractivitiesbadrequest.md - - docs/sdk/models/errors/getserveractivitieserrors.md - - docs/sdk/models/errors/getserveractivitiesunauthorized.md - - docs/sdk/models/errors/getservercapabilitiesbadrequest.md - - docs/sdk/models/errors/getservercapabilitieserrors.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/getserverlistservererrors.md - - docs/sdk/models/errors/getserverlistunauthorized.md - - docs/sdk/models/errors/getserverpreferencesbadrequest.md - - docs/sdk/models/errors/getserverpreferenceserrors.md - - docs/sdk/models/errors/getserverpreferencesservererrors.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/getserverresourcesunauthorized.md - - docs/sdk/models/errors/getsessionhistorybadrequest.md - - docs/sdk/models/errors/getsessionhistoryerrors.md - - docs/sdk/models/errors/getsessionhistorysessionserrors.md - - docs/sdk/models/errors/getsessionhistoryunauthorized.md - - docs/sdk/models/errors/getsessionsbadrequest.md - - docs/sdk/models/errors/getsessionserrors.md - - docs/sdk/models/errors/getsessionssessionserrors.md - - docs/sdk/models/errors/getsessionsunauthorized.md - - docs/sdk/models/errors/getsourceconnectioninformationauthenticationerrors.md - - docs/sdk/models/errors/getsourceconnectioninformationbadrequest.md - - docs/sdk/models/errors/getsourceconnectioninformationerrors.md - - docs/sdk/models/errors/getsourceconnectioninformationunauthorized.md - - docs/sdk/models/errors/getstatisticsbadrequest.md - - docs/sdk/models/errors/getstatisticserrors.md - - docs/sdk/models/errors/getstatisticsstatisticserrors.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/getthumbimageunauthorized.md - - docs/sdk/models/errors/gettimelinebadrequest.md - - docs/sdk/models/errors/gettimelineerrors.md - - docs/sdk/models/errors/gettimelineunauthorized.md - - docs/sdk/models/errors/gettimelinevideoerrors.md - - docs/sdk/models/errors/gettokenbypinidbadrequest.md - - docs/sdk/models/errors/gettokenbypiniderrors.md - - docs/sdk/models/errors/gettokenbypinidplexerrors.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/gettopwatchedcontentunauthorized.md - - docs/sdk/models/errors/gettranscodesessionsbadrequest.md - - docs/sdk/models/errors/gettranscodesessionserrors.md - - docs/sdk/models/errors/gettranscodesessionssessionserrors.md - - docs/sdk/models/errors/gettranscodesessionsunauthorized.md - - docs/sdk/models/errors/gettransienttokenauthenticationerrors.md - - docs/sdk/models/errors/gettransienttokenbadrequest.md - - docs/sdk/models/errors/gettransienttokenerrors.md - - docs/sdk/models/errors/gettransienttokenunauthorized.md - - docs/sdk/models/errors/getupdatestatusbadrequest.md - - docs/sdk/models/errors/getupdatestatuserrors.md - - docs/sdk/models/errors/getupdatestatusunauthorized.md - - docs/sdk/models/errors/getupdatestatusupdatererrors.md - - docs/sdk/models/errors/getuserfriendsbadrequest.md - - docs/sdk/models/errors/getuserfriendserrors.md - - docs/sdk/models/errors/getuserfriendsplexerrors.md - - docs/sdk/models/errors/getuserfriendsunauthorized.md - - docs/sdk/models/errors/getusersbadrequest.md - - docs/sdk/models/errors/getuserserrors.md - - docs/sdk/models/errors/getusersunauthorized.md - - docs/sdk/models/errors/getusersuserserrors.md - - docs/sdk/models/errors/getwatchlistbadrequest.md - - docs/sdk/models/errors/getwatchlisterrors.md - - docs/sdk/models/errors/getwatchlistunauthorized.md - - docs/sdk/models/errors/getwatchlistwatchlisterrors.md - - docs/sdk/models/errors/loglinebadrequest.md - - docs/sdk/models/errors/loglineerrors.md - - docs/sdk/models/errors/loglinelogerrors.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/logmultilineunauthorized.md - - docs/sdk/models/errors/markplayedbadrequest.md - - docs/sdk/models/errors/markplayederrors.md - - docs/sdk/models/errors/markplayedmediaerrors.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/markunplayedunauthorized.md - - docs/sdk/models/errors/performsearchbadrequest.md - - docs/sdk/models/errors/performsearcherrors.md - - docs/sdk/models/errors/performsearchsearcherrors.md - - docs/sdk/models/errors/performsearchunauthorized.md - - docs/sdk/models/errors/performvoicesearchbadrequest.md - - docs/sdk/models/errors/performvoicesearcherrors.md - - docs/sdk/models/errors/performvoicesearchsearcherrors.md - - docs/sdk/models/errors/performvoicesearchunauthorized.md - - docs/sdk/models/errors/postuserssignindataauthenticationerrors.md - - docs/sdk/models/errors/postuserssignindatabadrequest.md - - docs/sdk/models/errors/postuserssignindataerrors.md - - docs/sdk/models/errors/postuserssignindataunauthorized.md - - docs/sdk/models/errors/startalltasksbadrequest.md - - docs/sdk/models/errors/startalltasksbutlererrors.md - - docs/sdk/models/errors/startalltaskserrors.md - - docs/sdk/models/errors/startalltasksunauthorized.md - - docs/sdk/models/errors/starttaskbadrequest.md - - docs/sdk/models/errors/starttaskbutlererrors.md - - docs/sdk/models/errors/starttaskerrors.md - - docs/sdk/models/errors/starttaskunauthorized.md - - docs/sdk/models/errors/startuniversaltranscodebadrequest.md - - docs/sdk/models/errors/startuniversaltranscodeerrors.md - - docs/sdk/models/errors/startuniversaltranscodeunauthorized.md - - docs/sdk/models/errors/startuniversaltranscodevideoerrors.md - - docs/sdk/models/errors/stopalltasksbadrequest.md - - docs/sdk/models/errors/stopalltasksbutlererrors.md - - docs/sdk/models/errors/stopalltaskserrors.md - - docs/sdk/models/errors/stopalltasksunauthorized.md - - docs/sdk/models/errors/stoptaskbadrequest.md - - docs/sdk/models/errors/stoptaskbutlererrors.md - - docs/sdk/models/errors/stoptaskerrors.md - - docs/sdk/models/errors/stoptaskunauthorized.md - - docs/sdk/models/errors/stoptranscodesessionbadrequest.md - - docs/sdk/models/errors/stoptranscodesessionerrors.md - - docs/sdk/models/errors/stoptranscodesessionsessionserrors.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/updateplaylistunauthorized.md - - docs/sdk/models/errors/updateplayprogressbadrequest.md - - docs/sdk/models/errors/updateplayprogresserrors.md - - docs/sdk/models/errors/updateplayprogressmediaerrors.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/uploadplaylistunauthorized.md - docs/sdk/models/operations/account.md - docs/sdk/models/operations/action.md - - docs/sdk/models/operations/activedirection.md - docs/sdk/models/operations/activity.md - - docs/sdk/models/operations/addplaylistcontentsmediacontainer.md - - docs/sdk/models/operations/addplaylistcontentsmetadata.md - - docs/sdk/models/operations/addplaylistcontentsrequest.md - - docs/sdk/models/operations/addplaylistcontentsresponse.md - - docs/sdk/models/operations/addplaylistcontentsresponsebody.md - - docs/sdk/models/operations/alllibraries.md - - docs/sdk/models/operations/allowcameraupload.md - - docs/sdk/models/operations/allowchannels.md - - docs/sdk/models/operations/allowsubtitleadmin.md - - docs/sdk/models/operations/allowsync.md - - docs/sdk/models/operations/allowtuners.md + - docs/sdk/models/operations/addcollectionitemsglobals.md + - docs/sdk/models/operations/addcollectionitemsrequest.md + - docs/sdk/models/operations/addcollectionitemsresponse.md + - docs/sdk/models/operations/adddeviceglobals.md + - docs/sdk/models/operations/adddevicerequest.md + - docs/sdk/models/operations/adddeviceresponse.md + - docs/sdk/models/operations/adddevicetodvrdvr.md + - docs/sdk/models/operations/adddevicetodvrglobals.md + - docs/sdk/models/operations/adddevicetodvrmediacontainer.md + - docs/sdk/models/operations/adddevicetodvrmediacontainermediacontainer.md + - docs/sdk/models/operations/adddevicetodvrrequest.md + - docs/sdk/models/operations/adddevicetodvrresponse.md + - docs/sdk/models/operations/adddevicetodvrresponsebody.md + - docs/sdk/models/operations/adddownloadqueueitemsglobals.md + - docs/sdk/models/operations/adddownloadqueueitemsmediacontainer.md + - docs/sdk/models/operations/adddownloadqueueitemsrequest.md + - docs/sdk/models/operations/adddownloadqueueitemsresponse.md + - docs/sdk/models/operations/adddownloadqueueitemsresponsebody.md + - docs/sdk/models/operations/addedqueueitem.md + - docs/sdk/models/operations/addextrasglobals.md + - docs/sdk/models/operations/addextrasrequest.md + - docs/sdk/models/operations/addextrasresponse.md + - docs/sdk/models/operations/addlineupdvr.md + - docs/sdk/models/operations/addlineupglobals.md + - docs/sdk/models/operations/addlineupmediacontainer.md + - docs/sdk/models/operations/addlineupmediacontainermediacontainer.md + - docs/sdk/models/operations/addlineuprequest.md + - docs/sdk/models/operations/addlineupresponse.md + - docs/sdk/models/operations/addlineupresponsebody.md + - docs/sdk/models/operations/addplaylistitemsglobals.md + - docs/sdk/models/operations/addplaylistitemsrequest.md + - docs/sdk/models/operations/addplaylistitemsresponse.md + - docs/sdk/models/operations/addproviderglobals.md + - docs/sdk/models/operations/addproviderrequest.md + - docs/sdk/models/operations/addproviderresponse.md + - docs/sdk/models/operations/addsectionglobals.md + - docs/sdk/models/operations/addsectionprefs.md + - docs/sdk/models/operations/addsectionrequest.md + - docs/sdk/models/operations/addsectionresponse.md + - docs/sdk/models/operations/addsubtitlesglobals.md + - docs/sdk/models/operations/addsubtitlesrequest.md + - docs/sdk/models/operations/addsubtitlesresponse.md + - docs/sdk/models/operations/addtoplayqueueglobals.md + - docs/sdk/models/operations/addtoplayqueuerequest.md + - docs/sdk/models/operations/addtoplayqueueresponse.md + - docs/sdk/models/operations/advancedsubtitles.md + - docs/sdk/models/operations/analyzemetadataglobals.md + - docs/sdk/models/operations/analyzemetadatarequest.md + - docs/sdk/models/operations/analyzemetadataresponse.md + - docs/sdk/models/operations/applyupdatesglobals.md - docs/sdk/models/operations/applyupdatesrequest.md - docs/sdk/models/operations/applyupdatesresponse.md - - docs/sdk/models/operations/attributes.md - - docs/sdk/models/operations/autoselectsubtitle.md - - docs/sdk/models/operations/billing.md + - docs/sdk/models/operations/autocompleteglobals.md + - docs/sdk/models/operations/autocompleterequest.md + - docs/sdk/models/operations/autocompleteresponse.md + - docs/sdk/models/operations/bandwidth.md + - docs/sdk/models/operations/bandwidths.md - docs/sdk/models/operations/butlertask.md - docs/sdk/models/operations/butlertasks.md - - docs/sdk/models/operations/cancelserveractivitiesrequest.md - - docs/sdk/models/operations/cancelserveractivitiesresponse.md - - docs/sdk/models/operations/chapter.md - - docs/sdk/models/operations/checkforupdatesrequest.md - - docs/sdk/models/operations/checkforupdatesresponse.md - - docs/sdk/models/operations/clearplaylistcontentsrequest.md - - docs/sdk/models/operations/clearplaylistcontentsresponse.md - - docs/sdk/models/operations/collection.md - - docs/sdk/models/operations/connections.md - - docs/sdk/models/operations/context.md - - docs/sdk/models/operations/country.md - - docs/sdk/models/operations/createplaylistmediacontainer.md - - docs/sdk/models/operations/createplaylistmetadata.md - - docs/sdk/models/operations/createplaylistqueryparamtype.md + - docs/sdk/models/operations/cancelactivityglobals.md + - docs/sdk/models/operations/cancelactivityrequest.md + - docs/sdk/models/operations/cancelactivityresponse.md + - docs/sdk/models/operations/cancelgrabglobals.md + - docs/sdk/models/operations/cancelgrabrequest.md + - docs/sdk/models/operations/cancelgrabresponse.md + - docs/sdk/models/operations/cancelrefreshglobals.md + - docs/sdk/models/operations/cancelrefreshrequest.md + - docs/sdk/models/operations/cancelrefreshresponse.md + - docs/sdk/models/operations/channelmappingbykey.md + - docs/sdk/models/operations/checkupdatesglobals.md + - docs/sdk/models/operations/checkupdatesrequest.md + - docs/sdk/models/operations/checkupdatesresponse.md + - docs/sdk/models/operations/chromasubsampling.md + - docs/sdk/models/operations/cleanbundlesresponse.md + - docs/sdk/models/operations/clearplaylistitemsglobals.md + - docs/sdk/models/operations/clearplaylistitemsrequest.md + - docs/sdk/models/operations/clearplaylistitemsresponse.md + - docs/sdk/models/operations/clearplayqueueglobals.md + - docs/sdk/models/operations/clearplayqueuerequest.md + - docs/sdk/models/operations/clearplayqueueresponse.md + - docs/sdk/models/operations/computechannelmapchannelmapping.md + - docs/sdk/models/operations/computechannelmapglobals.md + - docs/sdk/models/operations/computechannelmapmediacontainer.md + - docs/sdk/models/operations/computechannelmaprequest.md + - docs/sdk/models/operations/computechannelmapresponse.md + - docs/sdk/models/operations/computechannelmapresponsebody.md + - docs/sdk/models/operations/connection.md + - docs/sdk/models/operations/connectwebsocketglobals.md + - docs/sdk/models/operations/connectwebsocketrequest.md + - docs/sdk/models/operations/connectwebsocketresponse.md + - docs/sdk/models/operations/createcollectionglobals.md + - docs/sdk/models/operations/createcollectionrequest.md + - docs/sdk/models/operations/createcollectionresponse.md + - docs/sdk/models/operations/createcustomhubglobals.md + - docs/sdk/models/operations/createcustomhubrequest.md + - docs/sdk/models/operations/createcustomhubresponse.md + - docs/sdk/models/operations/createdownloadqueuedownloadqueue.md + - docs/sdk/models/operations/createdownloadqueuemediacontainer.md + - docs/sdk/models/operations/createdownloadqueueresponse.md + - docs/sdk/models/operations/createdownloadqueueresponsebody.md + - docs/sdk/models/operations/createdownloadqueuestatus.md + - docs/sdk/models/operations/createdvrglobals.md + - docs/sdk/models/operations/createdvrrequest.md + - docs/sdk/models/operations/createdvrresponse.md + - docs/sdk/models/operations/createmarkerattributes.md + - docs/sdk/models/operations/createmarkerglobals.md + - docs/sdk/models/operations/createmarkermediacontainer.md + - docs/sdk/models/operations/createmarkerrequest.md + - docs/sdk/models/operations/createmarkerresponse.md + - docs/sdk/models/operations/createmarkerresponsebody.md + - docs/sdk/models/operations/createmarkertype.md + - docs/sdk/models/operations/createplaylistglobals.md - docs/sdk/models/operations/createplaylistrequest.md - docs/sdk/models/operations/createplaylistresponse.md - - docs/sdk/models/operations/createplaylistresponsebody.md - - docs/sdk/models/operations/defaultdirection.md - - docs/sdk/models/operations/defaultsubtitleaccessibility.md - - docs/sdk/models/operations/defaultsubtitleforced.md - - docs/sdk/models/operations/deletelibraryrequest.md - - docs/sdk/models/operations/deletelibraryresponse.md + - docs/sdk/models/operations/createplayqueueglobals.md + - docs/sdk/models/operations/createplayqueuemediacontainer.md + - docs/sdk/models/operations/createplayqueuerequest.md + - docs/sdk/models/operations/createplayqueueresponse.md + - docs/sdk/models/operations/createplayqueueresponsebody.md + - docs/sdk/models/operations/createplayqueuetype.md + - docs/sdk/models/operations/createsubscriptionglobals.md + - docs/sdk/models/operations/createsubscriptionmediacontainer.md + - docs/sdk/models/operations/createsubscriptionprefs.md + - docs/sdk/models/operations/createsubscriptionrequest.md + - docs/sdk/models/operations/createsubscriptionresponse.md + - docs/sdk/models/operations/createsubscriptionresponsebody.md + - docs/sdk/models/operations/deletecachesresponse.md + - docs/sdk/models/operations/deletecollectionglobals.md + - docs/sdk/models/operations/deletecollectionitemglobals.md + - docs/sdk/models/operations/deletecollectionitemrequest.md + - docs/sdk/models/operations/deletecollectionitemresponse.md + - docs/sdk/models/operations/deletecollectionrequest.md + - docs/sdk/models/operations/deletecollectionresponse.md + - docs/sdk/models/operations/deletecustomhubglobals.md + - docs/sdk/models/operations/deletecustomhubrequest.md + - docs/sdk/models/operations/deletecustomhubresponse.md + - docs/sdk/models/operations/deletedvrglobals.md + - docs/sdk/models/operations/deletedvrrequest.md + - docs/sdk/models/operations/deletedvrresponse.md + - docs/sdk/models/operations/deletehistoryglobals.md + - docs/sdk/models/operations/deletehistoryrequest.md + - docs/sdk/models/operations/deletehistoryresponse.md + - docs/sdk/models/operations/deleteindexesglobals.md + - docs/sdk/models/operations/deleteindexesrequest.md + - docs/sdk/models/operations/deleteindexesresponse.md + - docs/sdk/models/operations/deleteintrosglobals.md + - docs/sdk/models/operations/deleteintrosrequest.md + - docs/sdk/models/operations/deleteintrosresponse.md + - docs/sdk/models/operations/deletelibrarysectionglobals.md + - docs/sdk/models/operations/deletelibrarysectionrequest.md + - docs/sdk/models/operations/deletelibrarysectionresponse.md + - docs/sdk/models/operations/deletelineupdvr.md + - docs/sdk/models/operations/deletelineupglobals.md + - docs/sdk/models/operations/deletelineupmediacontainer.md + - docs/sdk/models/operations/deletelineupmediacontainermediacontainer.md + - docs/sdk/models/operations/deletelineuprequest.md + - docs/sdk/models/operations/deletelineupresponse.md + - docs/sdk/models/operations/deletelineupresponsebody.md + - docs/sdk/models/operations/deletemarkerglobals.md + - docs/sdk/models/operations/deletemarkerrequest.md + - docs/sdk/models/operations/deletemarkerresponse.md + - docs/sdk/models/operations/deletemediaitemglobals.md + - docs/sdk/models/operations/deletemediaitemrequest.md + - docs/sdk/models/operations/deletemediaitemresponse.md + - docs/sdk/models/operations/deletemediaproviderglobals.md + - docs/sdk/models/operations/deletemediaproviderrequest.md + - docs/sdk/models/operations/deletemediaproviderresponse.md + - docs/sdk/models/operations/deletemetadataitemglobals.md + - docs/sdk/models/operations/deletemetadataitemrequest.md + - docs/sdk/models/operations/deletemetadataitemresponse.md + - docs/sdk/models/operations/deleteplaylistglobals.md + - docs/sdk/models/operations/deleteplaylistitemglobals.md + - docs/sdk/models/operations/deleteplaylistitemrequest.md + - docs/sdk/models/operations/deleteplaylistitemresponse.md - docs/sdk/models/operations/deleteplaylistrequest.md - docs/sdk/models/operations/deleteplaylistresponse.md - - docs/sdk/models/operations/device.md - - docs/sdk/models/operations/director.md - - docs/sdk/models/operations/directory.md - - docs/sdk/models/operations/download.md + - docs/sdk/models/operations/deleteplayqueueitemglobals.md + - docs/sdk/models/operations/deleteplayqueueitemrequest.md + - docs/sdk/models/operations/deleteplayqueueitemresponse.md + - docs/sdk/models/operations/deletestreamglobals.md + - docs/sdk/models/operations/deletestreamrequest.md + - docs/sdk/models/operations/deletestreamresponse.md + - docs/sdk/models/operations/deletesubscriptionglobals.md + - docs/sdk/models/operations/deletesubscriptionrequest.md + - docs/sdk/models/operations/deletesubscriptionresponse.md + - docs/sdk/models/operations/detectadsglobals.md + - docs/sdk/models/operations/detectadsrequest.md + - docs/sdk/models/operations/detectadsresponse.md + - docs/sdk/models/operations/detectcreditsglobals.md + - docs/sdk/models/operations/detectcreditsrequest.md + - docs/sdk/models/operations/detectcreditsresponse.md + - docs/sdk/models/operations/detectintrosglobals.md + - docs/sdk/models/operations/detectintrosrequest.md + - docs/sdk/models/operations/detectintrosresponse.md + - docs/sdk/models/operations/detectvoiceactivityglobals.md + - docs/sdk/models/operations/detectvoiceactivityrequest.md + - docs/sdk/models/operations/detectvoiceactivityresponse.md + - docs/sdk/models/operations/devicechannel.md + - docs/sdk/models/operations/discoverdevicesresponse.md + - docs/sdk/models/operations/editmarkerattributes.md + - docs/sdk/models/operations/editmarkerglobals.md + - docs/sdk/models/operations/editmarkerrequest.md + - docs/sdk/models/operations/editmarkerresponse.md + - docs/sdk/models/operations/editmetadataitemargs.md + - docs/sdk/models/operations/editmetadataitemglobals.md + - docs/sdk/models/operations/editmetadataitemrequest.md + - docs/sdk/models/operations/editmetadataitemresponse.md + - docs/sdk/models/operations/editsectionglobals.md + - docs/sdk/models/operations/editsectionprefs.md + - docs/sdk/models/operations/editsectionrequest.md + - docs/sdk/models/operations/editsectionresponse.md + - docs/sdk/models/operations/editsubscriptionpreferencesglobals.md + - docs/sdk/models/operations/editsubscriptionpreferencesprefs.md + - docs/sdk/models/operations/editsubscriptionpreferencesrequest.md + - docs/sdk/models/operations/editsubscriptionpreferencesresponse.md + - docs/sdk/models/operations/emptytrashglobals.md + - docs/sdk/models/operations/emptytrashrequest.md + - docs/sdk/models/operations/emptytrashresponse.md + - docs/sdk/models/operations/enablepapertrailglobals.md + - docs/sdk/models/operations/enablepapertrailrequest.md - docs/sdk/models/operations/enablepapertrailresponse.md - - docs/sdk/models/operations/extras.md + - docs/sdk/models/operations/extension.md - docs/sdk/models/operations/feature.md - - docs/sdk/models/operations/field.md - - docs/sdk/models/operations/fieldtype.md - - docs/sdk/models/operations/filter.md - - docs/sdk/models/operations/flattenseasons.md - - docs/sdk/models/operations/force.md - - docs/sdk/models/operations/friend.md - - docs/sdk/models/operations/genre.md - - docs/sdk/models/operations/geodata.md - - docs/sdk/models/operations/getactorslibrarydirectory.md - - docs/sdk/models/operations/getactorslibrarymediacontainer.md - - docs/sdk/models/operations/getactorslibraryqueryparamtype.md - - docs/sdk/models/operations/getactorslibraryrequest.md - - docs/sdk/models/operations/getactorslibraryresponse.md - - docs/sdk/models/operations/getactorslibraryresponsebody.md - - docs/sdk/models/operations/getalllibrariesdirectory.md - - docs/sdk/models/operations/getalllibrarieslocation.md - - docs/sdk/models/operations/getalllibrariesmediacontainer.md - - docs/sdk/models/operations/getalllibrariesresponse.md - - docs/sdk/models/operations/getalllibrariesresponsebody.md - - docs/sdk/models/operations/getalllibrariestype.md - - docs/sdk/models/operations/getavailableclientsmediacontainer.md - - docs/sdk/models/operations/getavailableclientsresponse.md - - docs/sdk/models/operations/getavailableclientsresponsebody.md - - docs/sdk/models/operations/getbandwidthstatisticsaccount.md - - docs/sdk/models/operations/getbandwidthstatisticsdevice.md - - docs/sdk/models/operations/getbandwidthstatisticsmediacontainer.md - - docs/sdk/models/operations/getbandwidthstatisticsrequest.md - - docs/sdk/models/operations/getbandwidthstatisticsresponse.md - - docs/sdk/models/operations/getbandwidthstatisticsresponsebody.md - - docs/sdk/models/operations/getbannerimagerequest.md - - docs/sdk/models/operations/getbannerimageresponse.md - - docs/sdk/models/operations/getbutlertasksresponse.md - - docs/sdk/models/operations/getbutlertasksresponsebody.md - - docs/sdk/models/operations/getcompanionsdataresponse.md - - docs/sdk/models/operations/getcountrieslibrarydirectory.md - - docs/sdk/models/operations/getcountrieslibrarymediacontainer.md - - docs/sdk/models/operations/getcountrieslibraryqueryparamtype.md - - docs/sdk/models/operations/getcountrieslibraryrequest.md - - docs/sdk/models/operations/getcountrieslibraryresponse.md - - docs/sdk/models/operations/getcountrieslibraryresponsebody.md - - docs/sdk/models/operations/getdevicesmediacontainer.md - - docs/sdk/models/operations/getdevicesresponse.md - - docs/sdk/models/operations/getdevicesresponsebody.md - - docs/sdk/models/operations/getfilehashrequest.md - - docs/sdk/models/operations/getfilehashresponse.md - - docs/sdk/models/operations/getgenreslibrarydirectory.md - - docs/sdk/models/operations/getgenreslibrarymediacontainer.md - - docs/sdk/models/operations/getgenreslibraryqueryparamtype.md - - docs/sdk/models/operations/getgenreslibraryrequest.md - - docs/sdk/models/operations/getgenreslibraryresponse.md - - docs/sdk/models/operations/getgenreslibraryresponsebody.md - - docs/sdk/models/operations/getgeodatageodata.md - - docs/sdk/models/operations/getgeodataresponse.md - - docs/sdk/models/operations/getglobalhubsmediacontainer.md - - docs/sdk/models/operations/getglobalhubsmetadata.md - - docs/sdk/models/operations/getglobalhubsrequest.md - - docs/sdk/models/operations/getglobalhubsresponse.md - - docs/sdk/models/operations/getglobalhubsresponsebody.md - - docs/sdk/models/operations/gethomedataresponse.md - - docs/sdk/models/operations/gethomedataresponsebody.md - - docs/sdk/models/operations/getlibrarydetailsdirectory.md - - docs/sdk/models/operations/getlibrarydetailsfield.md - - docs/sdk/models/operations/getlibrarydetailsfieldtype.md - - docs/sdk/models/operations/getlibrarydetailsfilter.md + - docs/sdk/models/operations/flavor.md + - docs/sdk/models/operations/format.md + - docs/sdk/models/operations/generatethumbsglobals.md + - docs/sdk/models/operations/generatethumbsrequest.md + - docs/sdk/models/operations/generatethumbsresponse.md + - docs/sdk/models/operations/getalbumsglobals.md + - docs/sdk/models/operations/getalbumsrequest.md + - docs/sdk/models/operations/getalbumsresponse.md + - docs/sdk/models/operations/getallhubsglobals.md + - docs/sdk/models/operations/getallhubsmediacontainer.md + - docs/sdk/models/operations/getallhubsrequest.md + - docs/sdk/models/operations/getallhubsresponse.md + - docs/sdk/models/operations/getallhubsresponsebody.md + - docs/sdk/models/operations/getallitemleavesglobals.md + - docs/sdk/models/operations/getallitemleavesrequest.md + - docs/sdk/models/operations/getallitemleavesresponse.md + - docs/sdk/models/operations/getalllanguagesmediacontainer.md + - docs/sdk/models/operations/getalllanguagesresponse.md + - docs/sdk/models/operations/getalllanguagesresponsebody.md + - docs/sdk/models/operations/getallleavesglobals.md + - docs/sdk/models/operations/getallleavesrequest.md + - docs/sdk/models/operations/getallleavesresponse.md + - docs/sdk/models/operations/getallpreferencesresponse.md + - docs/sdk/models/operations/getallsubscriptionsglobals.md + - docs/sdk/models/operations/getallsubscriptionsrequest.md + - docs/sdk/models/operations/getallsubscriptionsresponse.md + - docs/sdk/models/operations/getartsglobals.md + - docs/sdk/models/operations/getartsrequest.md + - docs/sdk/models/operations/getartsresponse.md + - docs/sdk/models/operations/getaugmentationstatusglobals.md + - docs/sdk/models/operations/getaugmentationstatusrequest.md + - docs/sdk/models/operations/getaugmentationstatusresponse.md + - docs/sdk/models/operations/getavailablegrabbersglobals.md + - docs/sdk/models/operations/getavailablegrabbersmediacontainer.md + - docs/sdk/models/operations/getavailablegrabbersrequest.md + - docs/sdk/models/operations/getavailablegrabbersresponse.md + - docs/sdk/models/operations/getavailablegrabbersresponsebody.md + - docs/sdk/models/operations/getavailablesortsglobals.md + - docs/sdk/models/operations/getavailablesortsmediacontainer.md + - docs/sdk/models/operations/getavailablesortsrequest.md + - docs/sdk/models/operations/getavailablesortsresponse.md + - docs/sdk/models/operations/getavailablesortsresponsebody.md + - docs/sdk/models/operations/getbackgroundtasksmediacontainer.md + - docs/sdk/models/operations/getbackgroundtasksresponse.md + - docs/sdk/models/operations/getbackgroundtasksresponsebody.md + - docs/sdk/models/operations/getbackgroundtaskstype.md + - docs/sdk/models/operations/getcategoriesglobals.md + - docs/sdk/models/operations/getcategoriesrequest.md + - docs/sdk/models/operations/getcategoriesresponse.md + - docs/sdk/models/operations/getchannelsglobals.md + - docs/sdk/models/operations/getchannelsmediacontainer.md + - docs/sdk/models/operations/getchannelsrequest.md + - docs/sdk/models/operations/getchannelsresponse.md + - docs/sdk/models/operations/getchannelsresponsebody.md + - docs/sdk/models/operations/getchapterimageglobals.md + - docs/sdk/models/operations/getchapterimagerequest.md + - docs/sdk/models/operations/getchapterimageresponse.md + - docs/sdk/models/operations/getclusterglobals.md + - docs/sdk/models/operations/getclusterrequest.md + - docs/sdk/models/operations/getclusterresponse.md + - docs/sdk/models/operations/getcollectionimageglobals.md + - docs/sdk/models/operations/getcollectionimagerequest.md + - docs/sdk/models/operations/getcollectionimageresponse.md + - docs/sdk/models/operations/getcollectionitemsglobals.md + - docs/sdk/models/operations/getcollectionitemsrequest.md + - docs/sdk/models/operations/getcollectionitemsresponse.md + - docs/sdk/models/operations/getcollectionsglobals.md + - docs/sdk/models/operations/getcollectionsrequest.md + - docs/sdk/models/operations/getcollectionsresponse.md + - docs/sdk/models/operations/getcolorsglobals.md + - docs/sdk/models/operations/getcolorsmediacontainer.md + - docs/sdk/models/operations/getcolorsrequest.md + - docs/sdk/models/operations/getcolorsresponse.md + - docs/sdk/models/operations/getcolorsresponsebody.md + - docs/sdk/models/operations/getcommonglobals.md + - docs/sdk/models/operations/getcommonrequest.md + - docs/sdk/models/operations/getcommonresponse.md + - docs/sdk/models/operations/getcontinuewatchingglobals.md + - docs/sdk/models/operations/getcontinuewatchingmediacontainer.md + - docs/sdk/models/operations/getcontinuewatchingrequest.md + - docs/sdk/models/operations/getcontinuewatchingresponse.md + - docs/sdk/models/operations/getcontinuewatchingresponsebody.md + - docs/sdk/models/operations/getcountriescountry.md + - docs/sdk/models/operations/getcountrieslineupsglobals.md + - docs/sdk/models/operations/getcountrieslineupsrequest.md + - docs/sdk/models/operations/getcountrieslineupsresponse.md + - docs/sdk/models/operations/getcountriesmediacontainer.md + - docs/sdk/models/operations/getcountriesresponse.md + - docs/sdk/models/operations/getcountriesresponsebody.md + - docs/sdk/models/operations/getcountryregionscountry.md + - docs/sdk/models/operations/getcountryregionsglobals.md + - docs/sdk/models/operations/getcountryregionsmediacontainer.md + - docs/sdk/models/operations/getcountryregionsrequest.md + - docs/sdk/models/operations/getcountryregionsresponse.md + - docs/sdk/models/operations/getcountryregionsresponsebody.md + - docs/sdk/models/operations/getdevicedetailsglobals.md + - docs/sdk/models/operations/getdevicedetailsrequest.md + - docs/sdk/models/operations/getdevicedetailsresponse.md + - docs/sdk/models/operations/getdeviceschannelsglobals.md + - docs/sdk/models/operations/getdeviceschannelsmediacontainer.md + - docs/sdk/models/operations/getdeviceschannelsrequest.md + - docs/sdk/models/operations/getdeviceschannelsresponse.md + - docs/sdk/models/operations/getdeviceschannelsresponsebody.md + - docs/sdk/models/operations/getdownloadqueuedownloadqueue.md + - docs/sdk/models/operations/getdownloadqueueglobals.md + - docs/sdk/models/operations/getdownloadqueueitemsdecisionresult.md + - docs/sdk/models/operations/getdownloadqueueitemsdownloadqueueitem.md + - docs/sdk/models/operations/getdownloadqueueitemsglobals.md + - docs/sdk/models/operations/getdownloadqueueitemsmediacontainer.md + - docs/sdk/models/operations/getdownloadqueueitemsrequest.md + - docs/sdk/models/operations/getdownloadqueueitemsresponse.md + - docs/sdk/models/operations/getdownloadqueueitemsresponsebody.md + - docs/sdk/models/operations/getdownloadqueueitemsstatus.md + - docs/sdk/models/operations/getdownloadqueueitemstranscode.md + - docs/sdk/models/operations/getdownloadqueuemediacontainer.md + - docs/sdk/models/operations/getdownloadqueuemediaglobals.md + - docs/sdk/models/operations/getdownloadqueuemediarequest.md + - docs/sdk/models/operations/getdownloadqueuemediaresponse.md + - docs/sdk/models/operations/getdownloadqueuerequest.md + - docs/sdk/models/operations/getdownloadqueueresponse.md + - docs/sdk/models/operations/getdownloadqueueresponsebody.md + - docs/sdk/models/operations/getdownloadqueuestatus.md + - docs/sdk/models/operations/getdvrdvr.md + - docs/sdk/models/operations/getdvrglobals.md + - docs/sdk/models/operations/getdvrmediacontainer.md + - docs/sdk/models/operations/getdvrmediacontainermediacontainer.md + - docs/sdk/models/operations/getdvrrequest.md + - docs/sdk/models/operations/getdvrresponse.md + - docs/sdk/models/operations/getdvrresponsebody.md + - docs/sdk/models/operations/getextrasglobals.md + - docs/sdk/models/operations/getextrasrequest.md + - docs/sdk/models/operations/getextrasresponse.md + - docs/sdk/models/operations/getfileglobals.md + - docs/sdk/models/operations/getfilerequest.md + - docs/sdk/models/operations/getfileresponse.md + - docs/sdk/models/operations/getfirstcharactersdirectory.md + - docs/sdk/models/operations/getfirstcharactersglobals.md + - docs/sdk/models/operations/getfirstcharactersmediacontainer.md + - docs/sdk/models/operations/getfirstcharactersrequest.md + - docs/sdk/models/operations/getfirstcharactersresponse.md + - docs/sdk/models/operations/getfirstcharactersresponsebody.md + - docs/sdk/models/operations/getfoldersdirectory.md + - docs/sdk/models/operations/getfoldersglobals.md + - docs/sdk/models/operations/getfoldersmediacontainer.md + - docs/sdk/models/operations/getfoldersrequest.md + - docs/sdk/models/operations/getfoldersresponse.md + - docs/sdk/models/operations/getfoldersresponsebody.md + - docs/sdk/models/operations/gethistoryitemglobals.md + - docs/sdk/models/operations/gethistoryitemrequest.md + - docs/sdk/models/operations/gethistoryitemresponse.md + - docs/sdk/models/operations/gethubitemsglobals.md + - docs/sdk/models/operations/gethubitemsrequest.md + - docs/sdk/models/operations/gethubitemsresponse.md + - docs/sdk/models/operations/gethubitemsresponsebody.md + - docs/sdk/models/operations/getidentitymediacontainer.md + - docs/sdk/models/operations/getidentityresponse.md + - docs/sdk/models/operations/getidentityresponsebody.md + - docs/sdk/models/operations/getimagefrombifglobals.md + - docs/sdk/models/operations/getimagefrombifindex.md + - docs/sdk/models/operations/getimagefrombifrequest.md + - docs/sdk/models/operations/getimagefrombifresponse.md + - docs/sdk/models/operations/getimageglobals.md + - docs/sdk/models/operations/getimagerequest.md + - docs/sdk/models/operations/getimageresponse.md + - docs/sdk/models/operations/getitemartworkelement.md + - docs/sdk/models/operations/getitemartworkglobals.md + - docs/sdk/models/operations/getitemartworkrequest.md + - docs/sdk/models/operations/getitemartworkresponse.md + - docs/sdk/models/operations/getitemdecisionglobals.md + - docs/sdk/models/operations/getitemdecisionrequest.md + - docs/sdk/models/operations/getitemdecisionresponse.md + - docs/sdk/models/operations/getitemtreeglobals.md + - docs/sdk/models/operations/getitemtreerequest.md + - docs/sdk/models/operations/getitemtreeresponse.md + - docs/sdk/models/operations/getlibrarydetailsglobals.md - docs/sdk/models/operations/getlibrarydetailsmediacontainer.md - - docs/sdk/models/operations/getlibrarydetailsoperator.md - docs/sdk/models/operations/getlibrarydetailsrequest.md - docs/sdk/models/operations/getlibrarydetailsresponse.md - docs/sdk/models/operations/getlibrarydetailsresponsebody.md - - docs/sdk/models/operations/getlibrarydetailssort.md - - docs/sdk/models/operations/getlibrarydetailstype.md - - docs/sdk/models/operations/getlibraryhubscountry.md - - docs/sdk/models/operations/getlibraryhubsdirector.md - - docs/sdk/models/operations/getlibraryhubsgenre.md - - docs/sdk/models/operations/getlibraryhubshub.md - - docs/sdk/models/operations/getlibraryhubsmedia.md - - docs/sdk/models/operations/getlibraryhubsmediacontainer.md - - docs/sdk/models/operations/getlibraryhubsmetadata.md - - docs/sdk/models/operations/getlibraryhubspart.md - - docs/sdk/models/operations/getlibraryhubsrequest.md - - docs/sdk/models/operations/getlibraryhubsresponse.md - - docs/sdk/models/operations/getlibraryhubsresponsebody.md - - docs/sdk/models/operations/getlibraryhubsrole.md - - docs/sdk/models/operations/getlibraryhubswriter.md - - docs/sdk/models/operations/getlibraryitemsactivedirection.md - - docs/sdk/models/operations/getlibraryitemscollection.md - - docs/sdk/models/operations/getlibraryitemscountry.md - - docs/sdk/models/operations/getlibraryitemsdefaultdirection.md - - docs/sdk/models/operations/getlibraryitemsdirector.md - - docs/sdk/models/operations/getlibraryitemsfield.md - - docs/sdk/models/operations/getlibraryitemsfieldtype.md - - docs/sdk/models/operations/getlibraryitemsfilter.md - - docs/sdk/models/operations/getlibraryitemsgenre.md - - docs/sdk/models/operations/getlibraryitemsguids.md - - docs/sdk/models/operations/getlibraryitemshasthumbnail.md - - docs/sdk/models/operations/getlibraryitemsimage.md - - docs/sdk/models/operations/getlibraryitemslibraryoptimizedforstreaming.md - - docs/sdk/models/operations/getlibraryitemslibraryresponsetype.md - - docs/sdk/models/operations/getlibraryitemslibrarytype.md - - docs/sdk/models/operations/getlibraryitemslocation.md - - docs/sdk/models/operations/getlibraryitemsmedia.md - - docs/sdk/models/operations/getlibraryitemsmediacontainer.md - - docs/sdk/models/operations/getlibraryitemsmeta.md - - docs/sdk/models/operations/getlibraryitemsmetadata.md - - docs/sdk/models/operations/getlibraryitemsoperator.md - - docs/sdk/models/operations/getlibraryitemsoptimizedforstreaming.md - - docs/sdk/models/operations/getlibraryitemsoptimizedforstreaming1.md - - docs/sdk/models/operations/getlibraryitemspart.md - - docs/sdk/models/operations/getlibraryitemsproducer.md - - docs/sdk/models/operations/getlibraryitemsqueryparamincludemeta.md - - docs/sdk/models/operations/getlibraryitemsqueryparamtype.md + - docs/sdk/models/operations/getlibraryitemsglobals.md - docs/sdk/models/operations/getlibraryitemsrequest.md - docs/sdk/models/operations/getlibraryitemsresponse.md - - docs/sdk/models/operations/getlibraryitemsresponsebody.md - - docs/sdk/models/operations/getlibraryitemsrole.md - - docs/sdk/models/operations/getlibraryitemssimilar.md - - docs/sdk/models/operations/getlibraryitemssort.md - - docs/sdk/models/operations/getlibraryitemstype.md - - docs/sdk/models/operations/getlibraryitemsultrablurcolors.md - - docs/sdk/models/operations/getlibraryitemswriter.md - - docs/sdk/models/operations/getlibrarysectionsallactivedirection.md - - docs/sdk/models/operations/getlibrarysectionsallcollection.md - - docs/sdk/models/operations/getlibrarysectionsallcountry.md - - docs/sdk/models/operations/getlibrarysectionsalldefaultdirection.md - - docs/sdk/models/operations/getlibrarysectionsalldirector.md - - docs/sdk/models/operations/getlibrarysectionsallfield.md - - docs/sdk/models/operations/getlibrarysectionsallfieldtype.md - - docs/sdk/models/operations/getlibrarysectionsallfilter.md - - docs/sdk/models/operations/getlibrarysectionsallgenre.md - - docs/sdk/models/operations/getlibrarysectionsallguids.md - - docs/sdk/models/operations/getlibrarysectionsallhasthumbnail.md - - docs/sdk/models/operations/getlibrarysectionsallimage.md - - docs/sdk/models/operations/getlibrarysectionsalllibraryoptimizedforstreaming.md - - docs/sdk/models/operations/getlibrarysectionsalllibraryresponsetype.md - - docs/sdk/models/operations/getlibrarysectionsalllibrarytype.md - - docs/sdk/models/operations/getlibrarysectionsallmedia.md - - docs/sdk/models/operations/getlibrarysectionsallmediacontainer.md - - docs/sdk/models/operations/getlibrarysectionsallmeta.md - - docs/sdk/models/operations/getlibrarysectionsallmetadata.md - - docs/sdk/models/operations/getlibrarysectionsalloperator.md - - docs/sdk/models/operations/getlibrarysectionsalloptimizedforstreaming.md - - docs/sdk/models/operations/getlibrarysectionsalloptimizedforstreaming1.md - - docs/sdk/models/operations/getlibrarysectionsalloptimizedforstreaminglibrary1.md - - docs/sdk/models/operations/getlibrarysectionsallpart.md - - docs/sdk/models/operations/getlibrarysectionsallqueryparamincludemeta.md - - docs/sdk/models/operations/getlibrarysectionsallqueryparamtype.md - - docs/sdk/models/operations/getlibrarysectionsallrequest.md - - docs/sdk/models/operations/getlibrarysectionsallresponse.md - - docs/sdk/models/operations/getlibrarysectionsallresponsebody.md - - docs/sdk/models/operations/getlibrarysectionsallrole.md - - docs/sdk/models/operations/getlibrarysectionsallsort.md - - docs/sdk/models/operations/getlibrarysectionsallstream.md - - docs/sdk/models/operations/getlibrarysectionsalltype.md - - docs/sdk/models/operations/getlibrarysectionsallultrablurcolors.md - - docs/sdk/models/operations/getlibrarysectionsallwriter.md - - docs/sdk/models/operations/getmediaartsmediacontainer.md - - docs/sdk/models/operations/getmediaartsmetadata.md - - docs/sdk/models/operations/getmediaartsrequest.md - - docs/sdk/models/operations/getmediaartsresponse.md - - docs/sdk/models/operations/getmediaartsresponsebody.md - - docs/sdk/models/operations/getmediametadataattributes.md - - docs/sdk/models/operations/getmediametadatachapter.md - - docs/sdk/models/operations/getmediametadatacountry.md - - docs/sdk/models/operations/getmediametadatadirector.md - - docs/sdk/models/operations/getmediametadataextras.md - - docs/sdk/models/operations/getmediametadatagenre.md - - docs/sdk/models/operations/getmediametadataguids.md - - docs/sdk/models/operations/getmediametadatahasthumbnail.md - - docs/sdk/models/operations/getmediametadataimage.md - - docs/sdk/models/operations/getmediametadatalibraryoptimizedforstreaming.md - - docs/sdk/models/operations/getmediametadatalibrarytype.md - - docs/sdk/models/operations/getmediametadatalocation.md - - docs/sdk/models/operations/getmediametadatamarker.md - - docs/sdk/models/operations/getmediametadatamedia.md - - docs/sdk/models/operations/getmediametadatamediacontainer.md - - docs/sdk/models/operations/getmediametadatametadata.md - - docs/sdk/models/operations/getmediametadataoptimizedforstreaming.md - - docs/sdk/models/operations/getmediametadataoptimizedforstreaming1.md - - docs/sdk/models/operations/getmediametadataoptimizedforstreaminglibrary1.md - - docs/sdk/models/operations/getmediametadatapart.md - - docs/sdk/models/operations/getmediametadataproducer.md - - docs/sdk/models/operations/getmediametadataratings.md - - docs/sdk/models/operations/getmediametadatarequest.md - - docs/sdk/models/operations/getmediametadataresponse.md - - docs/sdk/models/operations/getmediametadataresponsebody.md - - docs/sdk/models/operations/getmediametadatarole.md - - docs/sdk/models/operations/getmediametadatasimilar.md - - docs/sdk/models/operations/getmediametadatastream.md - - docs/sdk/models/operations/getmediametadatatype.md - - docs/sdk/models/operations/getmediametadataultrablurcolors.md - - docs/sdk/models/operations/getmediametadatawriter.md - - docs/sdk/models/operations/getmediapostersmediacontainer.md - - docs/sdk/models/operations/getmediapostersmetadata.md - - docs/sdk/models/operations/getmediapostersrequest.md - - docs/sdk/models/operations/getmediapostersresponse.md - - docs/sdk/models/operations/getmediapostersresponsebody.md - - docs/sdk/models/operations/getmediaprovidersdirectory.md - - docs/sdk/models/operations/getmediaprovidersmediacontainer.md - - docs/sdk/models/operations/getmediaprovidersrequest.md - - docs/sdk/models/operations/getmediaprovidersresponse.md - - docs/sdk/models/operations/getmediaprovidersresponsebody.md - - docs/sdk/models/operations/getmetadatachildrendirectory.md - - docs/sdk/models/operations/getmetadatachildrenmediacontainer.md - - docs/sdk/models/operations/getmetadatachildrenmetadata.md - - docs/sdk/models/operations/getmetadatachildrenrequest.md - - docs/sdk/models/operations/getmetadatachildrenresponse.md - - docs/sdk/models/operations/getmetadatachildrenresponsebody.md - - docs/sdk/models/operations/getmyplexaccountresponse.md - - docs/sdk/models/operations/getmyplexaccountresponsebody.md - - docs/sdk/models/operations/getpinauthpincontainer.md - - docs/sdk/models/operations/getpinrequest.md - - docs/sdk/models/operations/getpinresponse.md - - docs/sdk/models/operations/getplaylistcontentscountry.md - - docs/sdk/models/operations/getplaylistcontentsdirector.md - - docs/sdk/models/operations/getplaylistcontentsgenre.md - - docs/sdk/models/operations/getplaylistcontentsmedia.md - - docs/sdk/models/operations/getplaylistcontentsmediacontainer.md - - docs/sdk/models/operations/getplaylistcontentsmetadata.md - - docs/sdk/models/operations/getplaylistcontentspart.md - - docs/sdk/models/operations/getplaylistcontentsqueryparamtype.md - - docs/sdk/models/operations/getplaylistcontentsrequest.md - - docs/sdk/models/operations/getplaylistcontentsresponse.md - - docs/sdk/models/operations/getplaylistcontentsresponsebody.md - - docs/sdk/models/operations/getplaylistcontentsrole.md - - docs/sdk/models/operations/getplaylistcontentswriter.md - - docs/sdk/models/operations/getplaylistmediacontainer.md - - docs/sdk/models/operations/getplaylistmetadata.md + - docs/sdk/models/operations/getlibrarymatchesglobals.md + - docs/sdk/models/operations/getlibrarymatchesrequest.md + - docs/sdk/models/operations/getlibrarymatchesresponse.md + - docs/sdk/models/operations/getlineupchannelsglobals.md + - docs/sdk/models/operations/getlineupchannelsmediacontainer.md + - docs/sdk/models/operations/getlineupchannelsrequest.md + - docs/sdk/models/operations/getlineupchannelsresponse.md + - docs/sdk/models/operations/getlineupchannelsresponsebody.md + - docs/sdk/models/operations/getlineupglobals.md + - docs/sdk/models/operations/getlineuprequest.md + - docs/sdk/models/operations/getlineupresponse.md + - docs/sdk/models/operations/getlivetvsessionglobals.md + - docs/sdk/models/operations/getlivetvsessionrequest.md + - docs/sdk/models/operations/getlivetvsessionresponse.md + - docs/sdk/models/operations/getmediapartglobals.md + - docs/sdk/models/operations/getmediapartrequest.md + - docs/sdk/models/operations/getmediapartresponse.md + - docs/sdk/models/operations/getmetadatahubsglobals.md + - docs/sdk/models/operations/getmetadatahubsrequest.md + - docs/sdk/models/operations/getmetadatahubsresponse.md + - docs/sdk/models/operations/getmetadataitemglobals.md + - docs/sdk/models/operations/getmetadataitemrequest.md + - docs/sdk/models/operations/getmetadataitemresponse.md + - docs/sdk/models/operations/getnotificationsglobals.md + - docs/sdk/models/operations/getnotificationsrequest.md + - docs/sdk/models/operations/getnotificationsresponse.md + - docs/sdk/models/operations/getpartindexglobals.md + - docs/sdk/models/operations/getpartindexindex.md + - docs/sdk/models/operations/getpartindexrequest.md + - docs/sdk/models/operations/getpartindexresponse.md + - docs/sdk/models/operations/getpersonglobals.md + - docs/sdk/models/operations/getpersonmediacontainer.md + - docs/sdk/models/operations/getpersonrequest.md + - docs/sdk/models/operations/getpersonresponse.md + - docs/sdk/models/operations/getpersonresponsebody.md + - docs/sdk/models/operations/getplaylistgeneratordevice.md + - docs/sdk/models/operations/getplaylistgeneratorglobals.md + - docs/sdk/models/operations/getplaylistgeneratoritem.md + - docs/sdk/models/operations/getplaylistgeneratoritemsglobals.md + - docs/sdk/models/operations/getplaylistgeneratoritemsmediacontainer.md + - docs/sdk/models/operations/getplaylistgeneratoritemsrequest.md + - docs/sdk/models/operations/getplaylistgeneratoritemsresponse.md + - docs/sdk/models/operations/getplaylistgeneratoritemsresponsebody.md + - docs/sdk/models/operations/getplaylistgeneratorlocation.md + - docs/sdk/models/operations/getplaylistgeneratormediacontainer.md + - docs/sdk/models/operations/getplaylistgeneratorpolicy.md + - docs/sdk/models/operations/getplaylistgeneratorrequest.md + - docs/sdk/models/operations/getplaylistgeneratorresponse.md + - docs/sdk/models/operations/getplaylistgeneratorresponsebody.md + - docs/sdk/models/operations/getplaylistgeneratorscope.md + - docs/sdk/models/operations/getplaylistgeneratorsglobals.md + - docs/sdk/models/operations/getplaylistgeneratorsmediacontainer.md + - docs/sdk/models/operations/getplaylistgeneratorsrequest.md + - docs/sdk/models/operations/getplaylistgeneratorsresponse.md + - docs/sdk/models/operations/getplaylistgeneratorsresponsebody.md + - docs/sdk/models/operations/getplaylistgeneratorstate.md + - docs/sdk/models/operations/getplaylistgeneratorstatus.md + - docs/sdk/models/operations/getplaylistgeneratorstype.md + - docs/sdk/models/operations/getplaylistgeneratorsubtitles.md + - docs/sdk/models/operations/getplaylistgeneratortype.md + - docs/sdk/models/operations/getplaylistglobals.md + - docs/sdk/models/operations/getplaylistitemsglobals.md + - docs/sdk/models/operations/getplaylistitemsrequest.md + - docs/sdk/models/operations/getplaylistitemsresponse.md - docs/sdk/models/operations/getplaylistrequest.md - docs/sdk/models/operations/getplaylistresponse.md - - docs/sdk/models/operations/getplaylistresponsebody.md - - docs/sdk/models/operations/getplaylistsmediacontainer.md - - docs/sdk/models/operations/getplaylistsmetadata.md - - docs/sdk/models/operations/getplaylistsrequest.md - - docs/sdk/models/operations/getplaylistsresponse.md - - docs/sdk/models/operations/getplaylistsresponsebody.md - - docs/sdk/models/operations/getrecentlyaddedactivedirection.md - - docs/sdk/models/operations/getrecentlyaddeddefaultdirection.md - - docs/sdk/models/operations/getrecentlyaddedfield.md - - docs/sdk/models/operations/getrecentlyaddedfieldtype.md - - docs/sdk/models/operations/getrecentlyaddedfilter.md - - docs/sdk/models/operations/getrecentlyaddedhubsresponsetype.md - - docs/sdk/models/operations/getrecentlyaddedhubstype.md - - docs/sdk/models/operations/getrecentlyaddedimage.md - - docs/sdk/models/operations/getrecentlyaddedlibrarycountry.md - - docs/sdk/models/operations/getrecentlyaddedlibrarydirector.md - - docs/sdk/models/operations/getrecentlyaddedlibraryfilter.md - - docs/sdk/models/operations/getrecentlyaddedlibrarygenre.md - - docs/sdk/models/operations/getrecentlyaddedlibrarymedia.md - - docs/sdk/models/operations/getrecentlyaddedlibrarymediacontainer.md - - docs/sdk/models/operations/getrecentlyaddedlibrarymetadata.md - - docs/sdk/models/operations/getrecentlyaddedlibrarypart.md - - docs/sdk/models/operations/getrecentlyaddedlibraryrequest.md - - docs/sdk/models/operations/getrecentlyaddedlibraryresponse.md - - docs/sdk/models/operations/getrecentlyaddedlibraryresponsebody.md - - docs/sdk/models/operations/getrecentlyaddedlibraryrole.md - - docs/sdk/models/operations/getrecentlyaddedlibrarytype.md - - docs/sdk/models/operations/getrecentlyaddedlibrarywriter.md - - docs/sdk/models/operations/getrecentlyaddedmediacontainer.md - - docs/sdk/models/operations/getrecentlyaddedmetadata.md - - docs/sdk/models/operations/getrecentlyaddedoperator.md - - docs/sdk/models/operations/getrecentlyaddedoptimizedforstreaming.md - - docs/sdk/models/operations/getrecentlyaddedoptimizedforstreaming1.md - - docs/sdk/models/operations/getrecentlyaddedrequest.md - - docs/sdk/models/operations/getrecentlyaddedresponse.md - - docs/sdk/models/operations/getrecentlyaddedresponsebody.md - - docs/sdk/models/operations/getrecentlyaddedsort.md - - docs/sdk/models/operations/getrecentlyaddedtype.md - - docs/sdk/models/operations/getrefreshlibrarymetadatarequest.md - - docs/sdk/models/operations/getrefreshlibrarymetadataresponse.md - - docs/sdk/models/operations/getresizedphotorequest.md - - docs/sdk/models/operations/getresizedphotoresponse.md - - docs/sdk/models/operations/getresourcesstatisticsmediacontainer.md - - docs/sdk/models/operations/getresourcesstatisticsrequest.md - - docs/sdk/models/operations/getresourcesstatisticsresponse.md - - docs/sdk/models/operations/getresourcesstatisticsresponsebody.md - - docs/sdk/models/operations/getsearchalllibrariescountry.md - - docs/sdk/models/operations/getsearchalllibrariesdirector.md - - docs/sdk/models/operations/getsearchalllibrariesdirectory.md - - docs/sdk/models/operations/getsearchalllibrariesflattenseasons.md - - docs/sdk/models/operations/getsearchalllibrariesgenre.md - - docs/sdk/models/operations/getsearchalllibrariesguids.md - - docs/sdk/models/operations/getsearchalllibrarieshasthumbnail.md - - docs/sdk/models/operations/getsearchalllibrariesimage.md - - docs/sdk/models/operations/getsearchalllibrarieslibraryoptimizedforstreaming.md - - docs/sdk/models/operations/getsearchalllibrarieslibrarytype.md - - docs/sdk/models/operations/getsearchalllibrarieslocation.md - - docs/sdk/models/operations/getsearchalllibrariesmedia.md - - docs/sdk/models/operations/getsearchalllibrariesmediacontainer.md - - docs/sdk/models/operations/getsearchalllibrariesmetadata.md - - docs/sdk/models/operations/getsearchalllibrariesoptimizedforstreaming.md - - docs/sdk/models/operations/getsearchalllibrariesoptimizedforstreaming1.md - - docs/sdk/models/operations/getsearchalllibrariesoptimizedforstreaminglibrary1.md - - docs/sdk/models/operations/getsearchalllibrariespart.md - - docs/sdk/models/operations/getsearchalllibrariesqueryparamincludecollections.md - - docs/sdk/models/operations/getsearchalllibrariesqueryparamincludeexternalmedia.md - - docs/sdk/models/operations/getsearchalllibrariesrequest.md - - docs/sdk/models/operations/getsearchalllibrariesresponse.md - - docs/sdk/models/operations/getsearchalllibrariesresponsebody.md - - docs/sdk/models/operations/getsearchalllibrariesrole.md - - docs/sdk/models/operations/getsearchalllibrariesshowordering.md - - docs/sdk/models/operations/getsearchalllibrariestype.md - - docs/sdk/models/operations/getsearchalllibrariesultrablurcolors.md - - docs/sdk/models/operations/getsearchalllibrarieswriter.md - - docs/sdk/models/operations/getsearchlibrarymediacontainer.md - - docs/sdk/models/operations/getsearchlibrarymetadata.md - - docs/sdk/models/operations/getsearchlibraryqueryparamtype.md - - docs/sdk/models/operations/getsearchlibraryrequest.md - - docs/sdk/models/operations/getsearchlibraryresponse.md - - docs/sdk/models/operations/getsearchlibraryresponsebody.md - - docs/sdk/models/operations/getsearchresultscountry.md - - docs/sdk/models/operations/getsearchresultsdirector.md - - docs/sdk/models/operations/getsearchresultsgenre.md - - docs/sdk/models/operations/getsearchresultsmedia.md - - docs/sdk/models/operations/getsearchresultsmediacontainer.md - - docs/sdk/models/operations/getsearchresultsmetadata.md - - docs/sdk/models/operations/getsearchresultspart.md - - docs/sdk/models/operations/getsearchresultsrequest.md - - docs/sdk/models/operations/getsearchresultsresponse.md - - docs/sdk/models/operations/getsearchresultsresponsebody.md - - docs/sdk/models/operations/getsearchresultsrole.md - - docs/sdk/models/operations/getsearchresultswriter.md - - docs/sdk/models/operations/getserveractivitiesmediacontainer.md - - docs/sdk/models/operations/getserveractivitiesresponse.md - - docs/sdk/models/operations/getserveractivitiesresponsebody.md - - docs/sdk/models/operations/getservercapabilitiesresponse.md - - docs/sdk/models/operations/getservercapabilitiesresponsebody.md - - docs/sdk/models/operations/getserveridentitymediacontainer.md - - docs/sdk/models/operations/getserveridentityresponse.md - - docs/sdk/models/operations/getserveridentityresponsebody.md - - docs/sdk/models/operations/getserverlistmediacontainer.md - - docs/sdk/models/operations/getserverlistresponse.md - - docs/sdk/models/operations/getserverlistresponsebody.md - - docs/sdk/models/operations/getserverlistserver.md - - docs/sdk/models/operations/getserverpreferencesmediacontainer.md - - docs/sdk/models/operations/getserverpreferencesresponse.md - - docs/sdk/models/operations/getserverpreferencesresponsebody.md - - docs/sdk/models/operations/getserverresourcesrequest.md - - docs/sdk/models/operations/getserverresourcesresponse.md - - docs/sdk/models/operations/getsessionhistorymediacontainer.md - - docs/sdk/models/operations/getsessionhistorymetadata.md - - docs/sdk/models/operations/getsessionhistoryrequest.md - - docs/sdk/models/operations/getsessionhistoryresponse.md - - docs/sdk/models/operations/getsessionhistoryresponsebody.md - - docs/sdk/models/operations/getsessionsmedia.md - - docs/sdk/models/operations/getsessionsmediacontainer.md - - docs/sdk/models/operations/getsessionsmetadata.md - - docs/sdk/models/operations/getsessionspart.md + - docs/sdk/models/operations/getplayqueueglobals.md + - docs/sdk/models/operations/getplayqueuerequest.md + - docs/sdk/models/operations/getplayqueueresponse.md + - docs/sdk/models/operations/getpostplayhubsglobals.md + - docs/sdk/models/operations/getpostplayhubsrequest.md + - docs/sdk/models/operations/getpostplayhubsresponse.md + - docs/sdk/models/operations/getpreferenceglobals.md + - docs/sdk/models/operations/getpreferencerequest.md + - docs/sdk/models/operations/getpreferenceresponse.md + - docs/sdk/models/operations/getpromotedhubsglobals.md + - docs/sdk/models/operations/getpromotedhubsmediacontainer.md + - docs/sdk/models/operations/getpromotedhubsrequest.md + - docs/sdk/models/operations/getpromotedhubsresponse.md + - docs/sdk/models/operations/getpromotedhubsresponsebody.md + - docs/sdk/models/operations/getrandomartworkglobals.md + - docs/sdk/models/operations/getrandomartworkrequest.md + - docs/sdk/models/operations/getrandomartworkresponse.md + - docs/sdk/models/operations/getrelatedhubsglobals.md + - docs/sdk/models/operations/getrelatedhubsrequest.md + - docs/sdk/models/operations/getrelatedhubsresponse.md + - docs/sdk/models/operations/getrelateditemsglobals.md + - docs/sdk/models/operations/getrelateditemsmediacontainer.md + - docs/sdk/models/operations/getrelateditemsrequest.md + - docs/sdk/models/operations/getrelateditemsresponse.md + - docs/sdk/models/operations/getrelateditemsresponsebody.md + - docs/sdk/models/operations/getscheduledrecordingsmediacontainer.md + - docs/sdk/models/operations/getscheduledrecordingsresponse.md + - docs/sdk/models/operations/getscheduledrecordingsresponsebody.md + - docs/sdk/models/operations/getsectionfiltersglobals.md + - docs/sdk/models/operations/getsectionfiltersmediacontainer.md + - docs/sdk/models/operations/getsectionfiltersrequest.md + - docs/sdk/models/operations/getsectionfiltersresponse.md + - docs/sdk/models/operations/getsectionfiltersresponsebody.md + - docs/sdk/models/operations/getsectionhubsglobals.md + - docs/sdk/models/operations/getsectionhubsmediacontainer.md + - docs/sdk/models/operations/getsectionhubsrequest.md + - docs/sdk/models/operations/getsectionhubsresponse.md + - docs/sdk/models/operations/getsectionhubsresponsebody.md + - docs/sdk/models/operations/getsectionimageglobals.md + - docs/sdk/models/operations/getsectionimagerequest.md + - docs/sdk/models/operations/getsectionimageresponse.md + - docs/sdk/models/operations/getsectionpreferencesglobals.md + - docs/sdk/models/operations/getsectionpreferencesrequest.md + - docs/sdk/models/operations/getsectionpreferencesresponse.md + - docs/sdk/models/operations/getsectionsmediacontainer.md + - docs/sdk/models/operations/getsectionsprefsglobals.md + - docs/sdk/models/operations/getsectionsprefsrequest.md + - docs/sdk/models/operations/getsectionsprefsresponse.md + - docs/sdk/models/operations/getsectionsresponse.md + - docs/sdk/models/operations/getsectionsresponsebody.md + - docs/sdk/models/operations/getserverinfoglobals.md + - docs/sdk/models/operations/getserverinforequest.md + - docs/sdk/models/operations/getserverinforesponse.md + - docs/sdk/models/operations/getsessionplaylistindexglobals.md + - docs/sdk/models/operations/getsessionplaylistindexrequest.md + - docs/sdk/models/operations/getsessionplaylistindexresponse.md + - docs/sdk/models/operations/getsessionsegmentglobals.md + - docs/sdk/models/operations/getsessionsegmentrequest.md + - docs/sdk/models/operations/getsessionsegmentresponse.md - docs/sdk/models/operations/getsessionsresponse.md - - docs/sdk/models/operations/getsessionsresponsebody.md - - docs/sdk/models/operations/getsessionsstream.md - - docs/sdk/models/operations/getsessionsuser.md + - docs/sdk/models/operations/getsonicallysimilarglobals.md + - docs/sdk/models/operations/getsonicallysimilarrequest.md + - docs/sdk/models/operations/getsonicallysimilarresponse.md + - docs/sdk/models/operations/getsonicpathglobals.md + - docs/sdk/models/operations/getsonicpathrequest.md + - docs/sdk/models/operations/getsonicpathresponse.md + - docs/sdk/models/operations/getsourceconnectioninformationdevice.md + - docs/sdk/models/operations/getsourceconnectioninformationglobals.md + - docs/sdk/models/operations/getsourceconnectioninformationmediacontainer.md - docs/sdk/models/operations/getsourceconnectioninformationrequest.md - docs/sdk/models/operations/getsourceconnectioninformationresponse.md - - docs/sdk/models/operations/getstatisticsdevice.md - - docs/sdk/models/operations/getstatisticsmediacontainer.md - - docs/sdk/models/operations/getstatisticsrequest.md - - docs/sdk/models/operations/getstatisticsresponse.md - - docs/sdk/models/operations/getstatisticsresponsebody.md - - docs/sdk/models/operations/getthumbimagerequest.md - - docs/sdk/models/operations/getthumbimageresponse.md - - docs/sdk/models/operations/gettimelinerequest.md - - docs/sdk/models/operations/gettimelineresponse.md - - docs/sdk/models/operations/gettokenbypinidauthpincontainer.md - - docs/sdk/models/operations/gettokenbypinidgeodata.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/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 - - docs/sdk/models/operations/gettopwatchedcontentmediacontainer.md - - docs/sdk/models/operations/gettopwatchedcontentmetadata.md - - docs/sdk/models/operations/gettopwatchedcontentqueryparamincludeguids.md - - docs/sdk/models/operations/gettopwatchedcontentqueryparamtype.md - - docs/sdk/models/operations/gettopwatchedcontentrequest.md - - docs/sdk/models/operations/gettopwatchedcontentresponse.md - - docs/sdk/models/operations/gettopwatchedcontentresponsebody.md - - docs/sdk/models/operations/gettopwatchedcontentrole.md - - docs/sdk/models/operations/gettopwatchedcontentuser.md - - docs/sdk/models/operations/gettranscodesessionsmediacontainer.md - - docs/sdk/models/operations/gettranscodesessionsresponse.md - - docs/sdk/models/operations/gettranscodesessionsresponsebody.md - - docs/sdk/models/operations/gettransienttokenqueryparamtype.md + - docs/sdk/models/operations/getsourceconnectioninformationresponsebody.md + - docs/sdk/models/operations/getstreamglobals.md + - docs/sdk/models/operations/getstreamlevelsglobals.md + - docs/sdk/models/operations/getstreamlevelslevel.md + - docs/sdk/models/operations/getstreamlevelsmediacontainer.md + - docs/sdk/models/operations/getstreamlevelsrequest.md + - docs/sdk/models/operations/getstreamlevelsresponse.md + - docs/sdk/models/operations/getstreamlevelsresponsebody.md + - docs/sdk/models/operations/getstreamloudnessglobals.md + - docs/sdk/models/operations/getstreamloudnessrequest.md + - docs/sdk/models/operations/getstreamloudnessresponse.md + - docs/sdk/models/operations/getstreamrequest.md + - docs/sdk/models/operations/getstreamresponse.md + - docs/sdk/models/operations/getsubscriptionglobals.md + - docs/sdk/models/operations/getsubscriptionrequest.md + - docs/sdk/models/operations/getsubscriptionresponse.md + - docs/sdk/models/operations/gettagsdirectory.md + - docs/sdk/models/operations/gettagsglobals.md + - docs/sdk/models/operations/gettagsmediacontainer.md + - docs/sdk/models/operations/gettagsrequest.md + - docs/sdk/models/operations/gettagsresponse.md + - docs/sdk/models/operations/gettagsresponsebody.md + - docs/sdk/models/operations/gettasksresponse.md + - docs/sdk/models/operations/gettasksresponsebody.md + - docs/sdk/models/operations/gettemplateglobals.md + - docs/sdk/models/operations/gettemplatemediacontainer.md + - docs/sdk/models/operations/gettemplaterequest.md + - docs/sdk/models/operations/gettemplateresponse.md + - docs/sdk/models/operations/gettemplateresponsebody.md + - docs/sdk/models/operations/getthumbglobals.md + - docs/sdk/models/operations/getthumbrequest.md + - docs/sdk/models/operations/getthumbresponse.md + - docs/sdk/models/operations/gettransienttokenglobals.md + - docs/sdk/models/operations/gettransienttokenmediacontainer.md - docs/sdk/models/operations/gettransienttokenrequest.md - docs/sdk/models/operations/gettransienttokenresponse.md - - docs/sdk/models/operations/getupdatestatusmediacontainer.md - - docs/sdk/models/operations/getupdatestatusresponse.md - - docs/sdk/models/operations/getupdatestatusresponsebody.md - - docs/sdk/models/operations/getuserfriendsresponse.md - - docs/sdk/models/operations/getusersmediacontainer.md - - docs/sdk/models/operations/getusersrequest.md - - docs/sdk/models/operations/getusersresponse.md - - docs/sdk/models/operations/getusersresponsebody.md - - docs/sdk/models/operations/getusersserver.md - - docs/sdk/models/operations/getwatchlistrequest.md - - docs/sdk/models/operations/getwatchlistresponse.md - - docs/sdk/models/operations/getwatchlistresponsebody.md - - docs/sdk/models/operations/guids.md - - docs/sdk/models/operations/hasthumbnail.md - - docs/sdk/models/operations/hidden.md - - docs/sdk/models/operations/home.md + - docs/sdk/models/operations/gettransienttokenresponsebody.md + - docs/sdk/models/operations/gettransienttokenscope.md + - docs/sdk/models/operations/gettransienttokentype.md + - docs/sdk/models/operations/getupdatesstatusmediacontainer.md + - docs/sdk/models/operations/getupdatesstatusresponse.md + - docs/sdk/models/operations/getupdatesstatusresponsebody.md + - docs/sdk/models/operations/getupdatesstatusstate.md + - docs/sdk/models/operations/hints.md + - docs/sdk/models/operations/homevisibility.md - docs/sdk/models/operations/hub.md - - docs/sdk/models/operations/image.md - - docs/sdk/models/operations/includeadvanced.md - - docs/sdk/models/operations/includecollections.md - - docs/sdk/models/operations/includedetails.md - - docs/sdk/models/operations/includeexternalmedia.md - - docs/sdk/models/operations/includeguids.md - - docs/sdk/models/operations/includehttps.md - - docs/sdk/models/operations/includeipv6.md - - docs/sdk/models/operations/includemeta.md - - docs/sdk/models/operations/includerelay.md - - docs/sdk/models/operations/internalpaymentmethod.md - - docs/sdk/models/operations/level.md - - docs/sdk/models/operations/libtype.md - - docs/sdk/models/operations/location.md - - docs/sdk/models/operations/loglinerequest.md - - docs/sdk/models/operations/loglineresponse.md - - docs/sdk/models/operations/logmultilineresponse.md - - docs/sdk/models/operations/mailingliststatus.md - - docs/sdk/models/operations/marker.md + - docs/sdk/models/operations/ingesttransientitemglobals.md + - docs/sdk/models/operations/ingesttransientitemrequest.md + - docs/sdk/models/operations/ingesttransientitemresponse.md + - docs/sdk/models/operations/language.md + - docs/sdk/models/operations/lineup.md + - docs/sdk/models/operations/lineuptype.md + - docs/sdk/models/operations/listactivitiesmediacontainer.md + - docs/sdk/models/operations/listactivitiesresponse.md + - docs/sdk/models/operations/listactivitiesresponsebody.md + - docs/sdk/models/operations/listcontentglobals.md + - docs/sdk/models/operations/listcontentrequest.md + - docs/sdk/models/operations/listcontentresponse.md + - docs/sdk/models/operations/listdevicesresponse.md + - docs/sdk/models/operations/listdownloadqueueitemsdecisionresult.md + - docs/sdk/models/operations/listdownloadqueueitemsdownloadqueueitem.md + - docs/sdk/models/operations/listdownloadqueueitemsglobals.md + - docs/sdk/models/operations/listdownloadqueueitemsmediacontainer.md + - docs/sdk/models/operations/listdownloadqueueitemsrequest.md + - docs/sdk/models/operations/listdownloadqueueitemsresponse.md + - docs/sdk/models/operations/listdownloadqueueitemsresponsebody.md + - docs/sdk/models/operations/listdownloadqueueitemsstatus.md + - docs/sdk/models/operations/listdownloadqueueitemstranscode.md + - docs/sdk/models/operations/listdvrsdvr.md + - docs/sdk/models/operations/listdvrsmediacontainer.md + - docs/sdk/models/operations/listdvrsmediacontainermediacontainer.md + - docs/sdk/models/operations/listdvrsresponse.md + - docs/sdk/models/operations/listdvrsresponsebody.md + - docs/sdk/models/operations/listhubsglobals.md + - docs/sdk/models/operations/listhubsmediacontainer.md + - docs/sdk/models/operations/listhubsrequest.md + - docs/sdk/models/operations/listhubsresponse.md + - docs/sdk/models/operations/listhubsresponsebody.md + - docs/sdk/models/operations/listlineupsglobals.md + - docs/sdk/models/operations/listlineupsrequest.md + - docs/sdk/models/operations/listlineupsresponse.md + - docs/sdk/models/operations/listmatchesglobals.md + - docs/sdk/models/operations/listmatchesrequest.md + - docs/sdk/models/operations/listmatchesresponse.md + - docs/sdk/models/operations/listmomentsglobals.md + - docs/sdk/models/operations/listmomentsrequest.md + - docs/sdk/models/operations/listmomentsresponse.md + - docs/sdk/models/operations/listpersonmediaglobals.md + - docs/sdk/models/operations/listpersonmediarequest.md + - docs/sdk/models/operations/listpersonmediaresponse.md + - docs/sdk/models/operations/listplaybackhistoryglobals.md + - docs/sdk/models/operations/listplaybackhistorymediacontainer.md + - docs/sdk/models/operations/listplaybackhistorymetadatum.md + - docs/sdk/models/operations/listplaybackhistoryrequest.md + - docs/sdk/models/operations/listplaybackhistoryresponse.md + - docs/sdk/models/operations/listplaybackhistoryresponsebody.md + - docs/sdk/models/operations/listplaylistsglobals.md + - docs/sdk/models/operations/listplaylistsrequest.md + - docs/sdk/models/operations/listplaylistsresponse.md + - docs/sdk/models/operations/listprovidersmediacontainer.md + - docs/sdk/models/operations/listprovidersresponse.md + - docs/sdk/models/operations/listprovidersresponsebody.md + - docs/sdk/models/operations/listsessionsmediacontainer.md + - docs/sdk/models/operations/listsessionsmetadatum.md + - docs/sdk/models/operations/listsessionsresponse.md + - docs/sdk/models/operations/listsessionsresponsebody.md + - docs/sdk/models/operations/listsimilarglobals.md + - docs/sdk/models/operations/listsimilarrequest.md + - docs/sdk/models/operations/listsimilarresponse.md + - docs/sdk/models/operations/listsonicallysimilarglobals.md + - docs/sdk/models/operations/listsonicallysimilarrequest.md + - docs/sdk/models/operations/listsonicallysimilarresponse.md + - docs/sdk/models/operations/listtopusersglobals.md + - docs/sdk/models/operations/listtopusersmediacontainer.md + - docs/sdk/models/operations/listtopusersrequest.md + - docs/sdk/models/operations/listtopusersresponse.md + - docs/sdk/models/operations/listtopusersresponsebody.md + - docs/sdk/models/operations/makedecisionglobals.md + - docs/sdk/models/operations/makedecisionlocation.md + - docs/sdk/models/operations/makedecisionprotocol.md + - docs/sdk/models/operations/makedecisionrequest.md + - docs/sdk/models/operations/makedecisionresponse.md + - docs/sdk/models/operations/makedecisionsubtitles.md + - docs/sdk/models/operations/markplayedglobals.md - docs/sdk/models/operations/markplayedrequest.md - docs/sdk/models/operations/markplayedresponse.md - - docs/sdk/models/operations/markunplayedrequest.md - - docs/sdk/models/operations/markunplayedresponse.md - - docs/sdk/models/operations/media.md - - docs/sdk/models/operations/mediacontainer.md - - docs/sdk/models/operations/mediaprovider.md - - docs/sdk/models/operations/mediareviewsvisibility.md - - docs/sdk/models/operations/meta.md + - docs/sdk/models/operations/matchitemglobals.md + - docs/sdk/models/operations/matchitemrequest.md + - docs/sdk/models/operations/matchitemresponse.md + - docs/sdk/models/operations/mediagrabber.md + - docs/sdk/models/operations/mediasettings.md + - docs/sdk/models/operations/mediasubscription.md + - docs/sdk/models/operations/mergeitemsglobals.md + - docs/sdk/models/operations/mergeitemsrequest.md + - docs/sdk/models/operations/mergeitemsresponse.md - docs/sdk/models/operations/metadata.md - - docs/sdk/models/operations/minsize.md - - docs/sdk/models/operations/myplex.md - - docs/sdk/models/operations/one.md - - docs/sdk/models/operations/onlytransient.md - - docs/sdk/models/operations/operator.md - - docs/sdk/models/operations/optimizedforstreaming.md - - docs/sdk/models/operations/optimizedforstreaming1.md - - docs/sdk/models/operations/owned.md - - docs/sdk/models/operations/part.md - - docs/sdk/models/operations/pastsubscription.md - - docs/sdk/models/operations/pathparamtaskname.md - - docs/sdk/models/operations/pending.md - - docs/sdk/models/operations/performsearchrequest.md - - docs/sdk/models/operations/performsearchresponse.md - - docs/sdk/models/operations/performvoicesearchrequest.md - - docs/sdk/models/operations/performvoicesearchresponse.md - - docs/sdk/models/operations/pivot.md - - docs/sdk/models/operations/player.md + - docs/sdk/models/operations/modifydeviceglobals.md + - docs/sdk/models/operations/modifydevicemediacontainer.md + - docs/sdk/models/operations/modifydevicerequest.md + - docs/sdk/models/operations/modifydeviceresponse.md + - docs/sdk/models/operations/modifydeviceresponsebody.md + - docs/sdk/models/operations/modifyplaylistgeneratorglobals.md + - docs/sdk/models/operations/modifyplaylistgeneratoritem.md + - docs/sdk/models/operations/modifyplaylistgeneratorlocation.md + - docs/sdk/models/operations/modifyplaylistgeneratorpolicy.md + - docs/sdk/models/operations/modifyplaylistgeneratorrequest.md + - docs/sdk/models/operations/modifyplaylistgeneratorresponse.md + - docs/sdk/models/operations/modifyplaylistgeneratorscope.md + - docs/sdk/models/operations/movecollectionitemglobals.md + - docs/sdk/models/operations/movecollectionitemrequest.md + - docs/sdk/models/operations/movecollectionitemresponse.md + - docs/sdk/models/operations/movehubglobals.md + - docs/sdk/models/operations/movehubrequest.md + - docs/sdk/models/operations/movehubresponse.md + - docs/sdk/models/operations/moveplaylistitemglobals.md + - docs/sdk/models/operations/moveplaylistitemrequest.md + - docs/sdk/models/operations/moveplaylistitemresponse.md + - docs/sdk/models/operations/moveplayqueueitemglobals.md + - docs/sdk/models/operations/moveplayqueueitemrequest.md + - docs/sdk/models/operations/moveplayqueueitemresponse.md + - docs/sdk/models/operations/optimizedatabaseglobals.md + - docs/sdk/models/operations/optimizedatabaserequest.md + - docs/sdk/models/operations/optimizedatabaseresponse.md + - docs/sdk/models/operations/params.md - docs/sdk/models/operations/playlisttype.md - - docs/sdk/models/operations/plexdevice.md - - docs/sdk/models/operations/postmediaartsrequest.md - - docs/sdk/models/operations/postmediaartsresponse.md - - docs/sdk/models/operations/postmediaposterrequest.md - - docs/sdk/models/operations/postmediaposterresponse.md - - docs/sdk/models/operations/postuserssignindataauthenticationresponsestatus.md - - docs/sdk/models/operations/postuserssignindataauthenticationstatus.md - - docs/sdk/models/operations/postuserssignindataauthenticationsubscription.md - - docs/sdk/models/operations/postuserssignindataautoselectsubtitle.md - - docs/sdk/models/operations/postuserssignindatadefaultsubtitleaccessibility.md - - docs/sdk/models/operations/postuserssignindatadefaultsubtitleforced.md - - docs/sdk/models/operations/postuserssignindatamailingliststatus.md - - docs/sdk/models/operations/postuserssignindatamediareviewsvisibility.md - - docs/sdk/models/operations/postuserssignindatarequest.md - - docs/sdk/models/operations/postuserssignindatarequestbody.md - - docs/sdk/models/operations/postuserssignindataresponse.md - - docs/sdk/models/operations/postuserssignindataservices.md - - docs/sdk/models/operations/postuserssignindatastate.md - - docs/sdk/models/operations/postuserssignindatastatus.md - - docs/sdk/models/operations/postuserssignindatasubscription.md - - docs/sdk/models/operations/postuserssignindatauserplexaccount.md - - docs/sdk/models/operations/postuserssignindatauserprofile.md - - docs/sdk/models/operations/postuserssignindatawatchedindicator.md - - docs/sdk/models/operations/producer.md - - docs/sdk/models/operations/protected.md - - docs/sdk/models/operations/protocol.md - - docs/sdk/models/operations/provider.md - - docs/sdk/models/operations/queryparamfilter.md - - docs/sdk/models/operations/queryparamforce.md - - docs/sdk/models/operations/queryparamincludecollections.md - - docs/sdk/models/operations/queryparamincludeexternalmedia.md - - docs/sdk/models/operations/queryparamincludeguids.md - - docs/sdk/models/operations/queryparamincludemeta.md - - docs/sdk/models/operations/queryparamonlytransient.md - - docs/sdk/models/operations/queryparamsmart.md - - docs/sdk/models/operations/queryparamtype.md - - docs/sdk/models/operations/rating.md - - docs/sdk/models/operations/ratings.md + - docs/sdk/models/operations/playqueuegenerator.md + - docs/sdk/models/operations/processingstate.md + - docs/sdk/models/operations/processingstatecontext.md + - docs/sdk/models/operations/processsubscriptionsresponse.md + - docs/sdk/models/operations/recommendationsvisibility.md + - docs/sdk/models/operations/refreshitemsmetadataglobals.md + - docs/sdk/models/operations/refreshitemsmetadatarequest.md + - docs/sdk/models/operations/refreshitemsmetadataresponse.md + - docs/sdk/models/operations/refreshplaylistglobals.md + - docs/sdk/models/operations/refreshplaylistrequest.md + - docs/sdk/models/operations/refreshplaylistresponse.md + - docs/sdk/models/operations/refreshprovidersresponse.md + - docs/sdk/models/operations/refreshsectionglobals.md + - docs/sdk/models/operations/refreshsectionrequest.md + - docs/sdk/models/operations/refreshsectionresponse.md + - docs/sdk/models/operations/refreshsectionsmetadataglobals.md + - docs/sdk/models/operations/refreshsectionsmetadatarequest.md + - docs/sdk/models/operations/refreshsectionsmetadataresponse.md - docs/sdk/models/operations/release.md - - docs/sdk/models/operations/responsebody.md - - docs/sdk/models/operations/restricted.md - - docs/sdk/models/operations/role.md - - docs/sdk/models/operations/scope.md - - docs/sdk/models/operations/searchresult.md - - docs/sdk/models/operations/searchtypes.md - - docs/sdk/models/operations/server.md - - docs/sdk/models/operations/services.md - - docs/sdk/models/operations/session.md - - docs/sdk/models/operations/setting.md - - docs/sdk/models/operations/sharedservers.md - - docs/sdk/models/operations/sharedsources.md - - docs/sdk/models/operations/showordering.md - - docs/sdk/models/operations/similar.md - - docs/sdk/models/operations/skip.md - - docs/sdk/models/operations/smart.md - - docs/sdk/models/operations/sort.md - - docs/sdk/models/operations/startalltasksresponse.md + - docs/sdk/models/operations/reloadguideglobals.md + - docs/sdk/models/operations/reloadguiderequest.md + - docs/sdk/models/operations/reloadguideresponse.md + - docs/sdk/models/operations/removedevicefromdvrdvr.md + - docs/sdk/models/operations/removedevicefromdvrglobals.md + - docs/sdk/models/operations/removedevicefromdvrmediacontainer.md + - docs/sdk/models/operations/removedevicefromdvrmediacontainermediacontainer.md + - docs/sdk/models/operations/removedevicefromdvrrequest.md + - docs/sdk/models/operations/removedevicefromdvrresponse.md + - docs/sdk/models/operations/removedevicefromdvrresponsebody.md + - docs/sdk/models/operations/removedeviceglobals.md + - docs/sdk/models/operations/removedevicemediacontainer.md + - docs/sdk/models/operations/removedevicerequest.md + - docs/sdk/models/operations/removedeviceresponse.md + - docs/sdk/models/operations/removedeviceresponsebody.md + - docs/sdk/models/operations/removedownloadqueueitemsglobals.md + - docs/sdk/models/operations/removedownloadqueueitemsrequest.md + - docs/sdk/models/operations/removedownloadqueueitemsresponse.md + - docs/sdk/models/operations/reordersubscriptionglobals.md + - docs/sdk/models/operations/reordersubscriptionrequest.md + - docs/sdk/models/operations/reordersubscriptionresponse.md + - docs/sdk/models/operations/reportglobals.md + - docs/sdk/models/operations/reportmediacontainer.md + - docs/sdk/models/operations/reportrequest.md + - docs/sdk/models/operations/reportresponse.md + - docs/sdk/models/operations/reportresponsebody.md + - docs/sdk/models/operations/reportstate.md + - docs/sdk/models/operations/resetplayqueueglobals.md + - docs/sdk/models/operations/resetplayqueuerequest.md + - docs/sdk/models/operations/resetplayqueueresponse.md + - docs/sdk/models/operations/resetsectiondefaultsglobals.md + - docs/sdk/models/operations/resetsectiondefaultsrequest.md + - docs/sdk/models/operations/resetsectiondefaultsresponse.md + - docs/sdk/models/operations/restartprocessingdownloadqueueitemsglobals.md + - docs/sdk/models/operations/restartprocessingdownloadqueueitemsrequest.md + - docs/sdk/models/operations/restartprocessingdownloadqueueitemsresponse.md + - docs/sdk/models/operations/scanglobals.md + - docs/sdk/models/operations/scanrequest.md + - docs/sdk/models/operations/scanresponse.md + - docs/sdk/models/operations/searchhubsglobals.md + - docs/sdk/models/operations/searchhubsmediacontainer.md + - docs/sdk/models/operations/searchhubsrequest.md + - docs/sdk/models/operations/searchhubsresponse.md + - docs/sdk/models/operations/searchhubsresponsebody.md + - docs/sdk/models/operations/setchannelmapchannelmapping.md + - docs/sdk/models/operations/setchannelmapglobals.md + - docs/sdk/models/operations/setchannelmaprequest.md + - docs/sdk/models/operations/setchannelmapresponse.md + - docs/sdk/models/operations/setdevicepreferencesglobals.md + - docs/sdk/models/operations/setdevicepreferencesrequest.md + - docs/sdk/models/operations/setdevicepreferencesresponse.md + - docs/sdk/models/operations/setdvrpreferencesdvr.md + - docs/sdk/models/operations/setdvrpreferencesglobals.md + - docs/sdk/models/operations/setdvrpreferencesmediacontainer.md + - docs/sdk/models/operations/setdvrpreferencesmediacontainermediacontainer.md + - docs/sdk/models/operations/setdvrpreferencesrequest.md + - docs/sdk/models/operations/setdvrpreferencesresponse.md + - docs/sdk/models/operations/setdvrpreferencesresponsebody.md + - docs/sdk/models/operations/setitemartworkelement.md + - docs/sdk/models/operations/setitemartworkglobals.md + - docs/sdk/models/operations/setitemartworkrequest.md + - docs/sdk/models/operations/setitemartworkresponse.md + - docs/sdk/models/operations/setitempreferencesargs.md + - docs/sdk/models/operations/setitempreferencesglobals.md + - docs/sdk/models/operations/setitempreferencesrequest.md + - docs/sdk/models/operations/setitempreferencesresponse.md + - docs/sdk/models/operations/setpreferencesglobals.md + - docs/sdk/models/operations/setpreferencesprefs.md + - docs/sdk/models/operations/setpreferencesrequest.md + - docs/sdk/models/operations/setpreferencesresponse.md + - docs/sdk/models/operations/setratingglobals.md + - docs/sdk/models/operations/setratingrequest.md + - docs/sdk/models/operations/setratingresponse.md + - docs/sdk/models/operations/setsectionpreferencesglobals.md + - docs/sdk/models/operations/setsectionpreferencesprefs.md + - docs/sdk/models/operations/setsectionpreferencesrequest.md + - docs/sdk/models/operations/setsectionpreferencesresponse.md + - docs/sdk/models/operations/setstreamoffsetglobals.md + - docs/sdk/models/operations/setstreamoffsetrequest.md + - docs/sdk/models/operations/setstreamoffsetresponse.md + - docs/sdk/models/operations/setstreamselectionglobals.md + - docs/sdk/models/operations/setstreamselectionrequest.md + - docs/sdk/models/operations/setstreamselectionresponse.md + - docs/sdk/models/operations/shuffleglobals.md + - docs/sdk/models/operations/shufflerequest.md + - docs/sdk/models/operations/shuffleresponse.md + - docs/sdk/models/operations/splititemglobals.md + - docs/sdk/models/operations/splititemrequest.md + - docs/sdk/models/operations/splititemresponse.md + - docs/sdk/models/operations/startanalysisglobals.md + - docs/sdk/models/operations/startanalysisrequest.md + - docs/sdk/models/operations/startanalysisresponse.md + - docs/sdk/models/operations/startbifgenerationglobals.md + - docs/sdk/models/operations/startbifgenerationrequest.md + - docs/sdk/models/operations/startbifgenerationresponse.md + - docs/sdk/models/operations/starttaskglobals.md - docs/sdk/models/operations/starttaskrequest.md - docs/sdk/models/operations/starttaskresponse.md - - docs/sdk/models/operations/startuniversaltranscoderequest.md - - docs/sdk/models/operations/startuniversaltranscoderesponse.md - - docs/sdk/models/operations/state.md - - docs/sdk/models/operations/statisticsbandwidth.md - - docs/sdk/models/operations/statisticsmedia.md - - docs/sdk/models/operations/statisticsresources.md - - docs/sdk/models/operations/status.md - - docs/sdk/models/operations/stopalltasksresponse.md + - docs/sdk/models/operations/starttasksresponse.md + - docs/sdk/models/operations/starttasktask.md + - docs/sdk/models/operations/starttranscodesessionglobals.md + - docs/sdk/models/operations/starttranscodesessionlocation.md + - docs/sdk/models/operations/starttranscodesessionprotocol.md + - docs/sdk/models/operations/starttranscodesessionrequest.md + - docs/sdk/models/operations/starttranscodesessionresponse.md + - docs/sdk/models/operations/starttranscodesessionsubtitles.md + - docs/sdk/models/operations/stopallrefreshesresponse.md + - docs/sdk/models/operations/stopdvrreloadglobals.md + - docs/sdk/models/operations/stopdvrreloadrequest.md + - docs/sdk/models/operations/stopdvrreloadresponse.md + - docs/sdk/models/operations/stopscanglobals.md + - docs/sdk/models/operations/stopscanrequest.md + - docs/sdk/models/operations/stopscanresponse.md + - docs/sdk/models/operations/stoptaskglobals.md - docs/sdk/models/operations/stoptaskrequest.md - docs/sdk/models/operations/stoptaskresponse.md - - docs/sdk/models/operations/stoptranscodesessionrequest.md - - docs/sdk/models/operations/stoptranscodesessionresponse.md - - docs/sdk/models/operations/stream.md - - docs/sdk/models/operations/subscription.md - - docs/sdk/models/operations/tag.md - - docs/sdk/models/operations/taskname.md - - docs/sdk/models/operations/tonight.md - - docs/sdk/models/operations/transcodesession.md - - docs/sdk/models/operations/trials.md - - docs/sdk/models/operations/type.md - - docs/sdk/models/operations/ultrablurcolors.md + - docs/sdk/models/operations/stoptasksresponse.md + - docs/sdk/models/operations/stoptasktask.md + - docs/sdk/models/operations/subscriptiontemplate.md + - docs/sdk/models/operations/terminatesessionglobals.md + - docs/sdk/models/operations/terminatesessionrequest.md + - docs/sdk/models/operations/terminatesessionresponse.md + - docs/sdk/models/operations/transcodeimageglobals.md + - docs/sdk/models/operations/transcodeimagerequest.md + - docs/sdk/models/operations/transcodeimageresponse.md + - docs/sdk/models/operations/transcodejob.md + - docs/sdk/models/operations/transcodesubtitlesglobals.md + - docs/sdk/models/operations/transcodesubtitleslocation.md + - docs/sdk/models/operations/transcodesubtitlesprotocol.md + - docs/sdk/models/operations/transcodesubtitlesrequest.md + - docs/sdk/models/operations/transcodesubtitlesresponse.md + - docs/sdk/models/operations/transcodesubtitlessubtitles.md + - docs/sdk/models/operations/triggerfallbackglobals.md + - docs/sdk/models/operations/triggerfallbackrequest.md + - docs/sdk/models/operations/triggerfallbackresponse.md + - docs/sdk/models/operations/tunechannelglobals.md + - docs/sdk/models/operations/tunechannelrequest.md + - docs/sdk/models/operations/tunechannelresponse.md + - docs/sdk/models/operations/ultrablurcolor.md + - docs/sdk/models/operations/unmatchglobals.md + - docs/sdk/models/operations/unmatchrequest.md + - docs/sdk/models/operations/unmatchresponse.md + - docs/sdk/models/operations/unscrobbleglobals.md + - docs/sdk/models/operations/unscrobblerequest.md + - docs/sdk/models/operations/unscrobbleresponse.md + - docs/sdk/models/operations/unshuffleglobals.md + - docs/sdk/models/operations/unshufflerequest.md + - docs/sdk/models/operations/unshuffleresponse.md + - docs/sdk/models/operations/updatehubvisibilityglobals.md + - docs/sdk/models/operations/updatehubvisibilityrequest.md + - docs/sdk/models/operations/updatehubvisibilityresponse.md + - docs/sdk/models/operations/updateitemartworkelement.md + - docs/sdk/models/operations/updateitemartworkglobals.md + - docs/sdk/models/operations/updateitemartworkrequest.md + - docs/sdk/models/operations/updateitemartworkresponse.md + - docs/sdk/models/operations/updateitemsglobals.md + - docs/sdk/models/operations/updateitemsrequest.md + - docs/sdk/models/operations/updateitemsresponse.md + - docs/sdk/models/operations/updateplaylistglobals.md - docs/sdk/models/operations/updateplaylistrequest.md - docs/sdk/models/operations/updateplaylistresponse.md - - docs/sdk/models/operations/updateplayprogressrequest.md - - docs/sdk/models/operations/updateplayprogressresponse.md + - docs/sdk/models/operations/uploadplaylistglobals.md - docs/sdk/models/operations/uploadplaylistrequest.md - docs/sdk/models/operations/uploadplaylistresponse.md - - docs/sdk/models/operations/upscale.md - - docs/sdk/models/operations/user.md - - docs/sdk/models/operations/userprofile.md - - docs/sdk/models/operations/watchedindicator.md - - docs/sdk/models/operations/writer.md + - docs/sdk/models/operations/voicesearchhubsglobals.md + - docs/sdk/models/operations/voicesearchhubsmediacontainer.md + - docs/sdk/models/operations/voicesearchhubsrequest.md + - docs/sdk/models/operations/voicesearchhubsresponse.md + - docs/sdk/models/operations/voicesearchhubsresponsebody.md + - docs/sdk/models/operations/writelogresponse.md + - docs/sdk/models/operations/writemessageglobals.md + - docs/sdk/models/operations/writemessagelevel.md + - docs/sdk/models/operations/writemessagerequest.md + - docs/sdk/models/operations/writemessageresponse.md + - docs/sdk/models/shared/advancedsubtitles.md + - docs/sdk/models/shared/airingstype.md + - docs/sdk/models/shared/boolint.md + - docs/sdk/models/shared/channel.md + - docs/sdk/models/shared/channelmapping.md + - docs/sdk/models/shared/composite.md + - docs/sdk/models/shared/crop.md + - docs/sdk/models/shared/decision.md + - docs/sdk/models/shared/default.md + - docs/sdk/models/shared/defaultdirection.md + - docs/sdk/models/shared/defaultenum.md + - docs/sdk/models/shared/device.md + - docs/sdk/models/shared/directory.md + - docs/sdk/models/shared/directorypivot.md + - docs/sdk/models/shared/directoryresponse.md + - docs/sdk/models/shared/dvr.md + - docs/sdk/models/shared/dvrrequesthandlerslashgetresponses200.md + - docs/sdk/models/shared/dvrrequesthandlerslashgetresponses200mediacontainer.md + - docs/sdk/models/shared/dvrrequesthandlerslashgetresponses200mediacontainermediacontainer.md + - docs/sdk/models/shared/filter.md + - docs/sdk/models/shared/filterpivot.md + - docs/sdk/models/shared/format.md + - docs/sdk/models/shared/getresponses200.md + - docs/sdk/models/shared/getresponses200mediacontainer.md + - docs/sdk/models/shared/historyallgetresponses200.md + - docs/sdk/models/shared/historyallgetresponses200mediacontainer.md + - docs/sdk/models/shared/homevisibility.md + - docs/sdk/models/shared/hub.md + - docs/sdk/models/shared/hubresponse.md + - docs/sdk/models/shared/image.md + - docs/sdk/models/shared/imagetype.md + - docs/sdk/models/shared/items.md + - docs/sdk/models/shared/librarysection.md + - docs/sdk/models/shared/librarysectionlocation.md + - docs/sdk/models/shared/lineup.md + - docs/sdk/models/shared/lineuptype.md + - docs/sdk/models/shared/locationparameter.md + - docs/sdk/models/shared/media.md + - docs/sdk/models/shared/mediacontainer.md + - docs/sdk/models/shared/mediacontainerwithartwork.md + - docs/sdk/models/shared/mediacontainerwithartworkmediacontainer.md + - docs/sdk/models/shared/mediacontainerwithartworkmetadatum.md + - docs/sdk/models/shared/mediacontainerwithartworktype.md + - docs/sdk/models/shared/mediacontainerwithdecision.md + - docs/sdk/models/shared/mediacontainerwithdecisionlocation.md + - docs/sdk/models/shared/mediacontainerwithdecisionmedia.md + - docs/sdk/models/shared/mediacontainerwithdecisionmediacontainer.md + - docs/sdk/models/shared/mediacontainerwithdecisionmetadatum.md + - docs/sdk/models/shared/mediacontainerwithdecisionpart.md + - docs/sdk/models/shared/mediacontainerwithdecisionstream.md + - docs/sdk/models/shared/mediacontainerwithdevice.md + - docs/sdk/models/shared/mediacontainerwithdevicedevice.md + - docs/sdk/models/shared/mediacontainerwithdevicemediacontainer.md + - docs/sdk/models/shared/mediacontainerwithdirectory.md + - docs/sdk/models/shared/mediacontainerwithdirectorymediacontainer.md + - docs/sdk/models/shared/mediacontainerwithhubs.md + - docs/sdk/models/shared/mediacontainerwithhubsmediacontainer.md + - docs/sdk/models/shared/mediacontainerwithlineup.md + - docs/sdk/models/shared/mediacontainerwithlineupmediacontainer.md + - docs/sdk/models/shared/mediacontainerwithmetadata.md + - docs/sdk/models/shared/mediacontainerwithmetadatamediacontainer.md + - docs/sdk/models/shared/mediacontainerwithnestedmetadata.md + - docs/sdk/models/shared/mediacontainerwithnestedmetadatamediacontainer.md + - docs/sdk/models/shared/mediacontainerwithplaylistmetadata.md + - docs/sdk/models/shared/mediacontainerwithplaylistmetadatamediacontainer.md + - docs/sdk/models/shared/mediacontainerwithplaylistmetadatametadatum.md + - docs/sdk/models/shared/mediacontainerwithsettings.md + - docs/sdk/models/shared/mediacontainerwithsettingsmediacontainer.md + - docs/sdk/models/shared/mediacontainerwithsubscription.md + - docs/sdk/models/shared/mediacontainerwithsubscriptionmediacontainer.md + - docs/sdk/models/shared/mediaenum.md + - docs/sdk/models/shared/mediagraboperation.md + - docs/sdk/models/shared/mediaquery.md + - docs/sdk/models/shared/mediasubscription.md + - docs/sdk/models/shared/metadata.md + - docs/sdk/models/shared/metadataitem.md + - docs/sdk/models/shared/metadatumresponse.md + - docs/sdk/models/shared/part.md + - docs/sdk/models/shared/player.md + - docs/sdk/models/shared/playlisttype.md + - docs/sdk/models/shared/postresponses200.md + - docs/sdk/models/shared/postresponses200mediacontainer.md + - docs/sdk/models/shared/protocol.md + - docs/sdk/models/shared/recommendationsvisibility.md + - docs/sdk/models/shared/requesthandlerslashgetresponses200.md + - docs/sdk/models/shared/requesthandlerslashgetresponses200mediacontainer.md - docs/sdk/models/shared/security.md + - docs/sdk/models/shared/session.md + - docs/sdk/models/shared/sessionlocation.md + - docs/sdk/models/shared/setting.md + - docs/sdk/models/shared/settingtype.md + - docs/sdk/models/shared/slashgetresponses200.md + - docs/sdk/models/shared/slashgetresponses200mediacontainer.md + - docs/sdk/models/shared/sort.md + - docs/sdk/models/shared/sortpivot.md + - docs/sdk/models/shared/status.md + - docs/sdk/models/shared/stream.md + - docs/sdk/models/shared/streamdecision.md + - docs/sdk/models/shared/subtitles.md + - docs/sdk/models/shared/tag.md + - docs/sdk/models/shared/transcodesession.md + - docs/sdk/models/shared/transcodetype.md + - docs/sdk/models/shared/typeresponse.md + - docs/sdk/models/shared/user.md + - docs/sdk/models/shared/value.md - docs/sdks/activities/README.md - - docs/sdks/authentication/README.md - docs/sdks/butler/README.md + - docs/sdks/collections/README.md + - docs/sdks/content/README.md + - docs/sdks/devices/README.md + - docs/sdks/downloadqueue/README.md + - docs/sdks/dvrs/README.md + - docs/sdks/epg/README.md + - docs/sdks/events/README.md + - docs/sdks/general/README.md - docs/sdks/hubs/README.md - docs/sdks/library/README.md + - docs/sdks/librarycollections/README.md + - docs/sdks/libraryplaylists/README.md + - docs/sdks/livetv/README.md - docs/sdks/log/README.md - - docs/sdks/media/README.md - - docs/sdks/playlists/README.md - - docs/sdks/plex/README.md - - docs/sdks/plexapi/README.md + - docs/sdks/playlist/README.md + - docs/sdks/playqueue/README.md + - docs/sdks/preferences/README.md + - docs/sdks/provider/README.md + - docs/sdks/rate/README.md - docs/sdks/search/README.md - - docs/sdks/server/README.md - - docs/sdks/sessions/README.md - - docs/sdks/statistics/README.md + - docs/sdks/status/README.md + - docs/sdks/subscriptions/README.md + - docs/sdks/timeline/README.md + - docs/sdks/transcoder/README.md + - docs/sdks/ultrablur/README.md - docs/sdks/updater/README.md - - docs/sdks/users/README.md - - docs/sdks/video/README.md - - docs/sdks/watchlist/README.md - - docs/types/rfcdate.md - eslint.config.mjs - examples/.env.template - examples/README.md + - examples/generalGetServerInfo.example.ts - examples/package.json - - examples/serverGetServerCapabilities.example.ts - jsr.json - package.json - src/core.ts - - src/funcs/activitiesCancelServerActivities.ts - - src/funcs/activitiesGetServerActivities.ts - - src/funcs/authenticationGetSourceConnectionInformation.ts - - src/funcs/authenticationGetTokenDetails.ts - - src/funcs/authenticationGetTransientToken.ts - - src/funcs/authenticationPostUsersSignInData.ts - - src/funcs/butlerGetButlerTasks.ts - - src/funcs/butlerStartAllTasks.ts + - src/funcs/activitiesCancelActivity.ts + - src/funcs/activitiesListActivities.ts + - src/funcs/butlerGetTasks.ts - src/funcs/butlerStartTask.ts - - src/funcs/butlerStopAllTasks.ts + - src/funcs/butlerStartTasks.ts - src/funcs/butlerStopTask.ts - - src/funcs/hubsGetGlobalHubs.ts - - src/funcs/hubsGetLibraryHubs.ts - - src/funcs/hubsGetRecentlyAdded.ts - - src/funcs/libraryDeleteLibrary.ts - - src/funcs/libraryGetActorsLibrary.ts - - src/funcs/libraryGetAllLibraries.ts - - src/funcs/libraryGetCountriesLibrary.ts - - src/funcs/libraryGetFileHash.ts - - src/funcs/libraryGetGenresLibrary.ts + - src/funcs/butlerStopTasks.ts + - src/funcs/collectionsCreateCollection.ts + - src/funcs/contentGetAlbums.ts + - src/funcs/contentGetAllLeaves.ts + - src/funcs/contentGetArts.ts + - src/funcs/contentGetCategories.ts + - src/funcs/contentGetCluster.ts + - src/funcs/contentGetCollectionImage.ts + - src/funcs/contentGetCollectionItems.ts + - src/funcs/contentGetFolders.ts + - src/funcs/contentGetMetadataItem.ts + - src/funcs/contentGetSonicPath.ts + - src/funcs/contentGetSonicallySimilar.ts + - src/funcs/contentListContent.ts + - src/funcs/contentListMoments.ts + - src/funcs/devicesAddDevice.ts + - src/funcs/devicesDiscoverDevices.ts + - src/funcs/devicesGetAvailableGrabbers.ts + - src/funcs/devicesGetDeviceDetails.ts + - src/funcs/devicesGetDevicesChannels.ts + - src/funcs/devicesGetThumb.ts + - src/funcs/devicesListDevices.ts + - src/funcs/devicesModifyDevice.ts + - src/funcs/devicesRemoveDevice.ts + - src/funcs/devicesScan.ts + - src/funcs/devicesSetChannelmap.ts + - src/funcs/devicesSetDevicePreferences.ts + - src/funcs/devicesStopScan.ts + - src/funcs/downloadQueueAddDownloadQueueItems.ts + - src/funcs/downloadQueueCreateDownloadQueue.ts + - src/funcs/downloadQueueGetDownloadQueue.ts + - src/funcs/downloadQueueGetDownloadQueueItems.ts + - src/funcs/downloadQueueGetDownloadQueueMedia.ts + - src/funcs/downloadQueueGetItemDecision.ts + - src/funcs/downloadQueueListDownloadQueueItems.ts + - src/funcs/downloadQueueRemoveDownloadQueueItems.ts + - src/funcs/downloadQueueRestartProcessingDownloadQueueItems.ts + - src/funcs/dvRsAddDeviceToDVR.ts + - src/funcs/dvRsAddLineup.ts + - src/funcs/dvRsCreateDVR.ts + - src/funcs/dvRsDeleteDVR.ts + - src/funcs/dvRsDeleteLineup.ts + - src/funcs/dvRsGetDVR.ts + - src/funcs/dvRsListDVRs.ts + - src/funcs/dvRsReloadGuide.ts + - src/funcs/dvRsRemoveDeviceFromDVR.ts + - src/funcs/dvRsSetDVRPreferences.ts + - src/funcs/dvRsStopDVRReload.ts + - src/funcs/dvRsTuneChannel.ts + - src/funcs/epgComputeChannelMap.ts + - src/funcs/epgGetAllLanguages.ts + - src/funcs/epgGetChannels.ts + - src/funcs/epgGetCountries.ts + - src/funcs/epgGetCountriesLineups.ts + - src/funcs/epgGetCountryRegions.ts + - src/funcs/epgGetLineup.ts + - src/funcs/epgGetLineupChannels.ts + - src/funcs/epgListLineups.ts + - src/funcs/eventsConnectWebSocket.ts + - src/funcs/eventsGetNotifications.ts + - src/funcs/generalGetIdentity.ts + - src/funcs/generalGetServerInfo.ts + - src/funcs/generalGetSourceConnectionInformation.ts + - src/funcs/generalGetTransientToken.ts + - src/funcs/hubsCreateCustomHub.ts + - src/funcs/hubsDeleteCustomHub.ts + - src/funcs/hubsGetAllHubs.ts + - src/funcs/hubsGetContinueWatching.ts + - src/funcs/hubsGetHubItems.ts + - src/funcs/hubsGetMetadataHubs.ts + - src/funcs/hubsGetPostplayHubs.ts + - src/funcs/hubsGetPromotedHubs.ts + - src/funcs/hubsGetRelatedHubs.ts + - src/funcs/hubsGetSectionHubs.ts + - src/funcs/hubsListHubs.ts + - src/funcs/hubsMoveHub.ts + - src/funcs/hubsResetSectionDefaults.ts + - src/funcs/hubsUpdateHubVisibility.ts + - src/funcs/libraryAddExtras.ts + - src/funcs/libraryAddSection.ts + - src/funcs/libraryAddSubtitles.ts + - src/funcs/libraryAnalyzeMetadata.ts + - src/funcs/libraryAutocomplete.ts + - src/funcs/libraryCancelRefresh.ts + - src/funcs/libraryCleanBundles.ts + - src/funcs/libraryCollectionsAddCollectionItems.ts + - src/funcs/libraryCollectionsDeleteCollectionItem.ts + - src/funcs/libraryCollectionsMoveCollectionItem.ts + - src/funcs/libraryCreateMarker.ts + - src/funcs/libraryDeleteCaches.ts + - src/funcs/libraryDeleteCollection.ts + - src/funcs/libraryDeleteIndexes.ts + - src/funcs/libraryDeleteIntros.ts + - src/funcs/libraryDeleteLibrarySection.ts + - src/funcs/libraryDeleteMarker.ts + - src/funcs/libraryDeleteMediaItem.ts + - src/funcs/libraryDeleteMetadataItem.ts + - src/funcs/libraryDeleteStream.ts + - src/funcs/libraryDetectAds.ts + - src/funcs/libraryDetectCredits.ts + - src/funcs/libraryDetectIntros.ts + - src/funcs/libraryDetectVoiceActivity.ts + - src/funcs/libraryEditMarker.ts + - src/funcs/libraryEditMetadataItem.ts + - src/funcs/libraryEditSection.ts + - src/funcs/libraryEmptyTrash.ts + - src/funcs/libraryGenerateThumbs.ts + - src/funcs/libraryGetAllItemLeaves.ts + - src/funcs/libraryGetAugmentationStatus.ts + - src/funcs/libraryGetAvailableSorts.ts + - src/funcs/libraryGetChapterImage.ts + - src/funcs/libraryGetCollections.ts + - src/funcs/libraryGetCommon.ts + - src/funcs/libraryGetExtras.ts + - src/funcs/libraryGetFile.ts + - src/funcs/libraryGetFirstCharacters.ts + - src/funcs/libraryGetImageFromBif.ts + - src/funcs/libraryGetItemArtwork.ts + - src/funcs/libraryGetItemTree.ts - src/funcs/libraryGetLibraryDetails.ts - src/funcs/libraryGetLibraryItems.ts - - src/funcs/libraryGetLibrarySectionsAll.ts - - src/funcs/libraryGetMediaArts.ts - - src/funcs/libraryGetMediaMetaData.ts - - src/funcs/libraryGetMediaPosters.ts - - src/funcs/libraryGetMetadataChildren.ts - - src/funcs/libraryGetRecentlyAddedLibrary.ts - - src/funcs/libraryGetRefreshLibraryMetadata.ts - - src/funcs/libraryGetSearchAllLibraries.ts - - src/funcs/libraryGetSearchLibrary.ts - - src/funcs/libraryGetTopWatchedContent.ts - - src/funcs/libraryPostMediaArts.ts - - src/funcs/libraryPostMediaPoster.ts - - src/funcs/logEnablePaperTrail.ts - - src/funcs/logLogLine.ts - - src/funcs/logLogMultiLine.ts - - src/funcs/mediaGetBannerImage.ts - - src/funcs/mediaGetThumbImage.ts - - src/funcs/mediaMarkPlayed.ts - - src/funcs/mediaMarkUnplayed.ts - - src/funcs/mediaUpdatePlayProgress.ts - - src/funcs/playlistsAddPlaylistContents.ts - - src/funcs/playlistsClearPlaylistContents.ts - - src/funcs/playlistsCreatePlaylist.ts - - src/funcs/playlistsDeletePlaylist.ts - - src/funcs/playlistsGetPlaylist.ts - - src/funcs/playlistsGetPlaylistContents.ts - - src/funcs/playlistsGetPlaylists.ts - - src/funcs/playlistsUpdatePlaylist.ts - - src/funcs/playlistsUploadPlaylist.ts - - src/funcs/plexGetCompanionsData.ts - - src/funcs/plexGetGeoData.ts - - src/funcs/plexGetHomeData.ts - - src/funcs/plexGetPin.ts - - src/funcs/plexGetServerResources.ts - - src/funcs/plexGetTokenByPinId.ts - - src/funcs/plexGetUserFriends.ts - - src/funcs/searchGetSearchResults.ts - - src/funcs/searchPerformSearch.ts - - src/funcs/searchPerformVoiceSearch.ts - - src/funcs/serverGetAvailableClients.ts - - src/funcs/serverGetDevices.ts - - src/funcs/serverGetMediaProviders.ts - - src/funcs/serverGetMyPlexAccount.ts - - src/funcs/serverGetResizedPhoto.ts - - src/funcs/serverGetServerCapabilities.ts - - src/funcs/serverGetServerIdentity.ts - - src/funcs/serverGetServerList.ts - - src/funcs/serverGetServerPreferences.ts - - src/funcs/sessionsGetSessionHistory.ts - - src/funcs/sessionsGetSessions.ts - - src/funcs/sessionsGetTranscodeSessions.ts - - src/funcs/sessionsStopTranscodeSession.ts - - src/funcs/statisticsGetBandwidthStatistics.ts - - src/funcs/statisticsGetResourcesStatistics.ts - - src/funcs/statisticsGetStatistics.ts + - src/funcs/libraryGetLibraryMatches.ts + - src/funcs/libraryGetMediaPart.ts + - src/funcs/libraryGetPartIndex.ts + - src/funcs/libraryGetPerson.ts + - src/funcs/libraryGetRandomArtwork.ts + - src/funcs/libraryGetRelatedItems.ts + - src/funcs/libraryGetSectionFilters.ts + - src/funcs/libraryGetSectionImage.ts + - src/funcs/libraryGetSectionPreferences.ts + - src/funcs/libraryGetSections.ts + - src/funcs/libraryGetSectionsPrefs.ts + - src/funcs/libraryGetStream.ts + - src/funcs/libraryGetStreamLevels.ts + - src/funcs/libraryGetStreamLoudness.ts + - src/funcs/libraryGetTags.ts + - src/funcs/libraryIngestTransientItem.ts + - src/funcs/libraryListMatches.ts + - src/funcs/libraryListPersonMedia.ts + - src/funcs/libraryListSimilar.ts + - src/funcs/libraryListSonicallySimilar.ts + - src/funcs/libraryListTopUsers.ts + - src/funcs/libraryMatchItem.ts + - src/funcs/libraryMergeItems.ts + - src/funcs/libraryOptimizeDatabase.ts + - src/funcs/libraryPlaylistsAddPlaylistItems.ts + - src/funcs/libraryPlaylistsClearPlaylistItems.ts + - src/funcs/libraryPlaylistsCreatePlaylist.ts + - src/funcs/libraryPlaylistsDeletePlaylist.ts + - src/funcs/libraryPlaylistsDeletePlaylistItem.ts + - src/funcs/libraryPlaylistsGetPlaylistGenerator.ts + - src/funcs/libraryPlaylistsGetPlaylistGeneratorItems.ts + - src/funcs/libraryPlaylistsGetPlaylistGenerators.ts + - src/funcs/libraryPlaylistsModifyPlaylistGenerator.ts + - src/funcs/libraryPlaylistsMovePlaylistItem.ts + - src/funcs/libraryPlaylistsRefreshPlaylist.ts + - src/funcs/libraryPlaylistsUpdatePlaylist.ts + - src/funcs/libraryPlaylistsUploadPlaylist.ts + - src/funcs/libraryRefreshItemsMetadata.ts + - src/funcs/libraryRefreshSection.ts + - src/funcs/libraryRefreshSectionsMetadata.ts + - src/funcs/librarySetItemArtwork.ts + - src/funcs/librarySetItemPreferences.ts + - src/funcs/librarySetSectionPreferences.ts + - src/funcs/librarySetStreamOffset.ts + - src/funcs/librarySetStreamSelection.ts + - src/funcs/librarySplitItem.ts + - src/funcs/libraryStartAnalysis.ts + - src/funcs/libraryStartBifGeneration.ts + - src/funcs/libraryStopAllRefreshes.ts + - src/funcs/libraryUnmatch.ts + - src/funcs/libraryUpdateItemArtwork.ts + - src/funcs/libraryUpdateItems.ts + - src/funcs/liveTVGetLiveTVSession.ts + - src/funcs/liveTVGetSessionPlaylistIndex.ts + - src/funcs/liveTVGetSessionSegment.ts + - src/funcs/liveTVGetSessions.ts + - src/funcs/logEnablePapertrail.ts + - src/funcs/logWriteLog.ts + - src/funcs/logWriteMessage.ts + - src/funcs/playQueueAddToPlayQueue.ts + - src/funcs/playQueueClearPlayQueue.ts + - src/funcs/playQueueCreatePlayQueue.ts + - src/funcs/playQueueDeletePlayQueueItem.ts + - src/funcs/playQueueGetPlayQueue.ts + - src/funcs/playQueueMovePlayQueueItem.ts + - src/funcs/playQueueResetPlayQueue.ts + - src/funcs/playQueueShuffle.ts + - src/funcs/playQueueUnshuffle.ts + - src/funcs/playlistGetPlaylist.ts + - src/funcs/playlistGetPlaylistItems.ts + - src/funcs/playlistListPlaylists.ts + - src/funcs/preferencesGetAllPreferences.ts + - src/funcs/preferencesGetPreference.ts + - src/funcs/preferencesSetPreferences.ts + - src/funcs/providerAddProvider.ts + - src/funcs/providerDeleteMediaProvider.ts + - src/funcs/providerListProviders.ts + - src/funcs/providerRefreshProviders.ts + - src/funcs/rateSetRating.ts + - src/funcs/searchSearchHubs.ts + - src/funcs/searchVoiceSearchHubs.ts + - src/funcs/statusDeleteHistory.ts + - src/funcs/statusGetBackgroundTasks.ts + - src/funcs/statusGetHistoryItem.ts + - src/funcs/statusListPlaybackHistory.ts + - src/funcs/statusListSessions.ts + - src/funcs/statusTerminateSession.ts + - src/funcs/subscriptionsCancelGrab.ts + - src/funcs/subscriptionsCreateSubscription.ts + - src/funcs/subscriptionsDeleteSubscription.ts + - src/funcs/subscriptionsEditSubscriptionPreferences.ts + - src/funcs/subscriptionsGetAllSubscriptions.ts + - src/funcs/subscriptionsGetScheduledRecordings.ts + - src/funcs/subscriptionsGetSubscription.ts + - src/funcs/subscriptionsGetTemplate.ts + - src/funcs/subscriptionsProcessSubscriptions.ts + - src/funcs/subscriptionsReorderSubscription.ts + - src/funcs/timelineMarkPlayed.ts + - src/funcs/timelineReport.ts + - src/funcs/timelineUnscrobble.ts + - src/funcs/transcoderMakeDecision.ts + - src/funcs/transcoderStartTranscodeSession.ts + - src/funcs/transcoderTranscodeImage.ts + - src/funcs/transcoderTranscodeSubtitles.ts + - src/funcs/transcoderTriggerFallback.ts + - src/funcs/ultraBlurGetColors.ts + - src/funcs/ultraBlurGetImage.ts - src/funcs/updaterApplyUpdates.ts - - src/funcs/updaterCheckForUpdates.ts - - src/funcs/updaterGetUpdateStatus.ts - - src/funcs/usersGetUsers.ts - - src/funcs/videoGetTimeline.ts - - src/funcs/videoStartUniversalTranscode.ts - - src/funcs/watchlistGetWatchList.ts + - src/funcs/updaterCheckUpdates.ts + - src/funcs/updaterGetUpdatesStatus.ts - src/hooks/hooks.ts - src/hooks/index.ts - src/hooks/types.ts @@ -1086,192 +1341,328 @@ generatedFiles: - src/lib/security.ts - src/lib/url.ts - src/sdk/activities.ts - - src/sdk/authentication.ts - src/sdk/butler.ts + - src/sdk/collections.ts + - src/sdk/content.ts + - src/sdk/devices.ts + - src/sdk/downloadqueue.ts + - src/sdk/dvrs.ts + - src/sdk/epg.ts + - src/sdk/events.ts + - src/sdk/general.ts - src/sdk/hubs.ts - src/sdk/index.ts - src/sdk/library.ts + - src/sdk/librarycollections.ts + - src/sdk/libraryplaylists.ts + - src/sdk/livetv.ts - src/sdk/log.ts - - src/sdk/media.ts - - src/sdk/models/errors/addplaylistcontents.ts - - src/sdk/models/errors/applyupdates.ts - - src/sdk/models/errors/cancelserveractivities.ts - - src/sdk/models/errors/checkforupdates.ts - - src/sdk/models/errors/clearplaylistcontents.ts - - src/sdk/models/errors/createplaylist.ts - - src/sdk/models/errors/deletelibrary.ts - - src/sdk/models/errors/deleteplaylist.ts - - src/sdk/models/errors/enablepapertrail.ts - - src/sdk/models/errors/getactorslibrary.ts - - src/sdk/models/errors/getalllibraries.ts - - src/sdk/models/errors/getavailableclients.ts - - src/sdk/models/errors/getbandwidthstatistics.ts - - src/sdk/models/errors/getbannerimage.ts - - src/sdk/models/errors/getbutlertasks.ts - - src/sdk/models/errors/getcompanionsdata.ts - - src/sdk/models/errors/getcountrieslibrary.ts - - src/sdk/models/errors/getdevices.ts - - src/sdk/models/errors/getfilehash.ts - - src/sdk/models/errors/getgenreslibrary.ts - - src/sdk/models/errors/getgeodata.ts - - src/sdk/models/errors/getglobalhubs.ts - - src/sdk/models/errors/gethomedata.ts - - src/sdk/models/errors/getlibrarydetails.ts - - src/sdk/models/errors/getlibraryhubs.ts - - src/sdk/models/errors/getlibraryitems.ts - - src/sdk/models/errors/getlibrarysectionsall.ts - - src/sdk/models/errors/getmediametadata.ts - - src/sdk/models/errors/getmediaproviders.ts - - src/sdk/models/errors/getmetadatachildren.ts - - src/sdk/models/errors/getmyplexaccount.ts - - src/sdk/models/errors/getpin.ts - - src/sdk/models/errors/getplaylist.ts - - src/sdk/models/errors/getplaylistcontents.ts - - src/sdk/models/errors/getplaylists.ts - - src/sdk/models/errors/getrecentlyaddedlibrary.ts - - src/sdk/models/errors/getrefreshlibrarymetadata.ts - - src/sdk/models/errors/getresizedphoto.ts - - src/sdk/models/errors/getresourcesstatistics.ts - - src/sdk/models/errors/getsearchalllibraries.ts - - src/sdk/models/errors/getsearchlibrary.ts - - src/sdk/models/errors/getsearchresults.ts - - src/sdk/models/errors/getserveractivities.ts - - src/sdk/models/errors/getservercapabilities.ts - - src/sdk/models/errors/getserveridentity.ts - - src/sdk/models/errors/getserverlist.ts - - src/sdk/models/errors/getserverpreferences.ts - - src/sdk/models/errors/getserverresources.ts - - src/sdk/models/errors/getsessionhistory.ts - - src/sdk/models/errors/getsessions.ts - - src/sdk/models/errors/getsourceconnectioninformation.ts - - src/sdk/models/errors/getstatistics.ts - - 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/getuserfriends.ts - - src/sdk/models/errors/getusers.ts - - src/sdk/models/errors/getwatchlist.ts - src/sdk/models/errors/httpclienterrors.ts - src/sdk/models/errors/index.ts - - src/sdk/models/errors/logline.ts - - src/sdk/models/errors/logmultiline.ts - - src/sdk/models/errors/markplayed.ts - - src/sdk/models/errors/markunplayed.ts - - src/sdk/models/errors/performsearch.ts - - src/sdk/models/errors/performvoicesearch.ts - src/sdk/models/errors/plexapierror.ts - - src/sdk/models/errors/postuserssignindata.ts - src/sdk/models/errors/responsevalidationerror.ts - src/sdk/models/errors/sdkerror.ts - src/sdk/models/errors/sdkvalidationerror.ts - - src/sdk/models/errors/startalltasks.ts - - src/sdk/models/errors/starttask.ts - - src/sdk/models/errors/startuniversaltranscode.ts - - src/sdk/models/errors/stopalltasks.ts - - src/sdk/models/errors/stoptask.ts - - src/sdk/models/errors/stoptranscodesession.ts - - src/sdk/models/errors/updateplaylist.ts - - src/sdk/models/errors/updateplayprogress.ts - - src/sdk/models/errors/uploadplaylist.ts - - src/sdk/models/operations/addplaylistcontents.ts + - src/sdk/models/operations/addcollectionitems.ts + - src/sdk/models/operations/adddevice.ts + - src/sdk/models/operations/adddevicetodvr.ts + - src/sdk/models/operations/adddownloadqueueitems.ts + - src/sdk/models/operations/addextras.ts + - src/sdk/models/operations/addlineup.ts + - src/sdk/models/operations/addplaylistitems.ts + - src/sdk/models/operations/addprovider.ts + - src/sdk/models/operations/addsection.ts + - src/sdk/models/operations/addsubtitles.ts + - src/sdk/models/operations/addtoplayqueue.ts + - src/sdk/models/operations/analyzemetadata.ts - src/sdk/models/operations/applyupdates.ts - - src/sdk/models/operations/cancelserveractivities.ts - - src/sdk/models/operations/checkforupdates.ts - - src/sdk/models/operations/clearplaylistcontents.ts + - src/sdk/models/operations/autocomplete.ts + - src/sdk/models/operations/cancelactivity.ts + - src/sdk/models/operations/cancelgrab.ts + - src/sdk/models/operations/cancelrefresh.ts + - src/sdk/models/operations/checkupdates.ts + - src/sdk/models/operations/cleanbundles.ts + - src/sdk/models/operations/clearplaylistitems.ts + - src/sdk/models/operations/clearplayqueue.ts + - src/sdk/models/operations/computechannelmap.ts + - src/sdk/models/operations/connectwebsocket.ts + - src/sdk/models/operations/createcollection.ts + - src/sdk/models/operations/createcustomhub.ts + - src/sdk/models/operations/createdownloadqueue.ts + - src/sdk/models/operations/createdvr.ts + - src/sdk/models/operations/createmarker.ts - src/sdk/models/operations/createplaylist.ts - - src/sdk/models/operations/deletelibrary.ts + - src/sdk/models/operations/createplayqueue.ts + - src/sdk/models/operations/createsubscription.ts + - src/sdk/models/operations/deletecaches.ts + - src/sdk/models/operations/deletecollection.ts + - src/sdk/models/operations/deletecollectionitem.ts + - src/sdk/models/operations/deletecustomhub.ts + - src/sdk/models/operations/deletedvr.ts + - src/sdk/models/operations/deletehistory.ts + - src/sdk/models/operations/deleteindexes.ts + - src/sdk/models/operations/deleteintros.ts + - src/sdk/models/operations/deletelibrarysection.ts + - src/sdk/models/operations/deletelineup.ts + - src/sdk/models/operations/deletemarker.ts + - src/sdk/models/operations/deletemediaitem.ts + - src/sdk/models/operations/deletemediaprovider.ts + - src/sdk/models/operations/deletemetadataitem.ts - src/sdk/models/operations/deleteplaylist.ts + - src/sdk/models/operations/deleteplaylistitem.ts + - src/sdk/models/operations/deleteplayqueueitem.ts + - src/sdk/models/operations/deletestream.ts + - src/sdk/models/operations/deletesubscription.ts + - src/sdk/models/operations/detectads.ts + - src/sdk/models/operations/detectcredits.ts + - src/sdk/models/operations/detectintros.ts + - src/sdk/models/operations/detectvoiceactivity.ts + - src/sdk/models/operations/discoverdevices.ts + - src/sdk/models/operations/editmarker.ts + - src/sdk/models/operations/editmetadataitem.ts + - src/sdk/models/operations/editsection.ts + - src/sdk/models/operations/editsubscriptionpreferences.ts + - src/sdk/models/operations/emptytrash.ts - src/sdk/models/operations/enablepapertrail.ts - - src/sdk/models/operations/getactorslibrary.ts - - src/sdk/models/operations/getalllibraries.ts - - src/sdk/models/operations/getavailableclients.ts - - src/sdk/models/operations/getbandwidthstatistics.ts - - src/sdk/models/operations/getbannerimage.ts - - src/sdk/models/operations/getbutlertasks.ts - - src/sdk/models/operations/getcompanionsdata.ts - - src/sdk/models/operations/getcountrieslibrary.ts - - src/sdk/models/operations/getdevices.ts - - src/sdk/models/operations/getfilehash.ts - - src/sdk/models/operations/getgenreslibrary.ts - - src/sdk/models/operations/getgeodata.ts - - src/sdk/models/operations/getglobalhubs.ts - - src/sdk/models/operations/gethomedata.ts + - src/sdk/models/operations/generatethumbs.ts + - src/sdk/models/operations/getalbums.ts + - src/sdk/models/operations/getallhubs.ts + - src/sdk/models/operations/getallitemleaves.ts + - src/sdk/models/operations/getalllanguages.ts + - src/sdk/models/operations/getallleaves.ts + - src/sdk/models/operations/getallpreferences.ts + - src/sdk/models/operations/getallsubscriptions.ts + - src/sdk/models/operations/getarts.ts + - src/sdk/models/operations/getaugmentationstatus.ts + - src/sdk/models/operations/getavailablegrabbers.ts + - src/sdk/models/operations/getavailablesorts.ts + - src/sdk/models/operations/getbackgroundtasks.ts + - src/sdk/models/operations/getcategories.ts + - src/sdk/models/operations/getchannels.ts + - src/sdk/models/operations/getchapterimage.ts + - src/sdk/models/operations/getcluster.ts + - src/sdk/models/operations/getcollectionimage.ts + - src/sdk/models/operations/getcollectionitems.ts + - src/sdk/models/operations/getcollections.ts + - src/sdk/models/operations/getcolors.ts + - src/sdk/models/operations/getcommon.ts + - src/sdk/models/operations/getcontinuewatching.ts + - src/sdk/models/operations/getcountries.ts + - src/sdk/models/operations/getcountrieslineups.ts + - src/sdk/models/operations/getcountryregions.ts + - src/sdk/models/operations/getdevicedetails.ts + - src/sdk/models/operations/getdeviceschannels.ts + - src/sdk/models/operations/getdownloadqueue.ts + - src/sdk/models/operations/getdownloadqueueitems.ts + - src/sdk/models/operations/getdownloadqueuemedia.ts + - src/sdk/models/operations/getdvr.ts + - src/sdk/models/operations/getextras.ts + - src/sdk/models/operations/getfile.ts + - src/sdk/models/operations/getfirstcharacters.ts + - src/sdk/models/operations/getfolders.ts + - src/sdk/models/operations/gethistoryitem.ts + - src/sdk/models/operations/gethubitems.ts + - src/sdk/models/operations/getidentity.ts + - src/sdk/models/operations/getimage.ts + - src/sdk/models/operations/getimagefrombif.ts + - src/sdk/models/operations/getitemartwork.ts + - src/sdk/models/operations/getitemdecision.ts + - src/sdk/models/operations/getitemtree.ts - src/sdk/models/operations/getlibrarydetails.ts - - src/sdk/models/operations/getlibraryhubs.ts - src/sdk/models/operations/getlibraryitems.ts - - src/sdk/models/operations/getlibrarysectionsall.ts - - src/sdk/models/operations/getmediaarts.ts - - src/sdk/models/operations/getmediametadata.ts - - src/sdk/models/operations/getmediaposters.ts - - src/sdk/models/operations/getmediaproviders.ts - - src/sdk/models/operations/getmetadatachildren.ts - - src/sdk/models/operations/getmyplexaccount.ts - - src/sdk/models/operations/getpin.ts + - src/sdk/models/operations/getlibrarymatches.ts + - src/sdk/models/operations/getlineup.ts + - src/sdk/models/operations/getlineupchannels.ts + - src/sdk/models/operations/getlivetvsession.ts + - src/sdk/models/operations/getmediapart.ts + - src/sdk/models/operations/getmetadatahubs.ts + - src/sdk/models/operations/getmetadataitem.ts + - src/sdk/models/operations/getnotifications.ts + - src/sdk/models/operations/getpartindex.ts + - src/sdk/models/operations/getperson.ts - src/sdk/models/operations/getplaylist.ts - - src/sdk/models/operations/getplaylistcontents.ts - - src/sdk/models/operations/getplaylists.ts - - src/sdk/models/operations/getrecentlyadded.ts - - src/sdk/models/operations/getrecentlyaddedlibrary.ts - - src/sdk/models/operations/getrefreshlibrarymetadata.ts - - src/sdk/models/operations/getresizedphoto.ts - - src/sdk/models/operations/getresourcesstatistics.ts - - src/sdk/models/operations/getsearchalllibraries.ts - - src/sdk/models/operations/getsearchlibrary.ts - - src/sdk/models/operations/getsearchresults.ts - - src/sdk/models/operations/getserveractivities.ts - - src/sdk/models/operations/getservercapabilities.ts - - src/sdk/models/operations/getserveridentity.ts - - src/sdk/models/operations/getserverlist.ts - - src/sdk/models/operations/getserverpreferences.ts - - src/sdk/models/operations/getserverresources.ts - - src/sdk/models/operations/getsessionhistory.ts + - src/sdk/models/operations/getplaylistgenerator.ts + - src/sdk/models/operations/getplaylistgeneratoritems.ts + - src/sdk/models/operations/getplaylistgenerators.ts + - src/sdk/models/operations/getplaylistitems.ts + - src/sdk/models/operations/getplayqueue.ts + - src/sdk/models/operations/getpostplayhubs.ts + - src/sdk/models/operations/getpreference.ts + - src/sdk/models/operations/getpromotedhubs.ts + - src/sdk/models/operations/getrandomartwork.ts + - src/sdk/models/operations/getrelatedhubs.ts + - src/sdk/models/operations/getrelateditems.ts + - src/sdk/models/operations/getscheduledrecordings.ts + - src/sdk/models/operations/getsectionfilters.ts + - src/sdk/models/operations/getsectionhubs.ts + - src/sdk/models/operations/getsectionimage.ts + - src/sdk/models/operations/getsectionpreferences.ts + - src/sdk/models/operations/getsections.ts + - src/sdk/models/operations/getsectionsprefs.ts + - src/sdk/models/operations/getserverinfo.ts + - src/sdk/models/operations/getsessionplaylistindex.ts - src/sdk/models/operations/getsessions.ts + - src/sdk/models/operations/getsessionsegment.ts + - src/sdk/models/operations/getsonicallysimilar.ts + - src/sdk/models/operations/getsonicpath.ts - src/sdk/models/operations/getsourceconnectioninformation.ts - - src/sdk/models/operations/getstatistics.ts - - 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/getstream.ts + - src/sdk/models/operations/getstreamlevels.ts + - src/sdk/models/operations/getstreamloudness.ts + - src/sdk/models/operations/getsubscription.ts + - src/sdk/models/operations/gettags.ts + - src/sdk/models/operations/gettasks.ts + - src/sdk/models/operations/gettemplate.ts + - src/sdk/models/operations/getthumb.ts - src/sdk/models/operations/gettransienttoken.ts - - src/sdk/models/operations/getupdatestatus.ts - - src/sdk/models/operations/getuserfriends.ts - - src/sdk/models/operations/getusers.ts - - src/sdk/models/operations/getwatchlist.ts + - src/sdk/models/operations/getupdatesstatus.ts - src/sdk/models/operations/index.ts - - src/sdk/models/operations/logline.ts - - src/sdk/models/operations/logmultiline.ts + - src/sdk/models/operations/ingesttransientitem.ts + - src/sdk/models/operations/listactivities.ts + - src/sdk/models/operations/listcontent.ts + - src/sdk/models/operations/listdevices.ts + - src/sdk/models/operations/listdownloadqueueitems.ts + - src/sdk/models/operations/listdvrs.ts + - src/sdk/models/operations/listhubs.ts + - src/sdk/models/operations/listlineups.ts + - src/sdk/models/operations/listmatches.ts + - src/sdk/models/operations/listmoments.ts + - src/sdk/models/operations/listpersonmedia.ts + - src/sdk/models/operations/listplaybackhistory.ts + - src/sdk/models/operations/listplaylists.ts + - src/sdk/models/operations/listproviders.ts + - src/sdk/models/operations/listsessions.ts + - src/sdk/models/operations/listsimilar.ts + - src/sdk/models/operations/listsonicallysimilar.ts + - src/sdk/models/operations/listtopusers.ts + - src/sdk/models/operations/makedecision.ts - src/sdk/models/operations/markplayed.ts - - src/sdk/models/operations/markunplayed.ts - - src/sdk/models/operations/performsearch.ts - - src/sdk/models/operations/performvoicesearch.ts - - src/sdk/models/operations/postmediaarts.ts - - src/sdk/models/operations/postmediaposter.ts - - src/sdk/models/operations/postuserssignindata.ts - - src/sdk/models/operations/startalltasks.ts + - src/sdk/models/operations/matchitem.ts + - src/sdk/models/operations/mergeitems.ts + - src/sdk/models/operations/modifydevice.ts + - src/sdk/models/operations/modifyplaylistgenerator.ts + - src/sdk/models/operations/movecollectionitem.ts + - src/sdk/models/operations/movehub.ts + - src/sdk/models/operations/moveplaylistitem.ts + - src/sdk/models/operations/moveplayqueueitem.ts + - src/sdk/models/operations/optimizedatabase.ts + - src/sdk/models/operations/processsubscriptions.ts + - src/sdk/models/operations/refreshitemsmetadata.ts + - src/sdk/models/operations/refreshplaylist.ts + - src/sdk/models/operations/refreshproviders.ts + - src/sdk/models/operations/refreshsection.ts + - src/sdk/models/operations/refreshsectionsmetadata.ts + - src/sdk/models/operations/reloadguide.ts + - src/sdk/models/operations/removedevice.ts + - src/sdk/models/operations/removedevicefromdvr.ts + - src/sdk/models/operations/removedownloadqueueitems.ts + - src/sdk/models/operations/reordersubscription.ts + - src/sdk/models/operations/report.ts + - src/sdk/models/operations/resetplayqueue.ts + - src/sdk/models/operations/resetsectiondefaults.ts + - src/sdk/models/operations/restartprocessingdownloadqueueitems.ts + - src/sdk/models/operations/scan.ts + - src/sdk/models/operations/searchhubs.ts + - src/sdk/models/operations/setchannelmap.ts + - src/sdk/models/operations/setdevicepreferences.ts + - src/sdk/models/operations/setdvrpreferences.ts + - src/sdk/models/operations/setitemartwork.ts + - src/sdk/models/operations/setitempreferences.ts + - src/sdk/models/operations/setpreferences.ts + - src/sdk/models/operations/setrating.ts + - src/sdk/models/operations/setsectionpreferences.ts + - src/sdk/models/operations/setstreamoffset.ts + - src/sdk/models/operations/setstreamselection.ts + - src/sdk/models/operations/shuffle.ts + - src/sdk/models/operations/splititem.ts + - src/sdk/models/operations/startanalysis.ts + - src/sdk/models/operations/startbifgeneration.ts - src/sdk/models/operations/starttask.ts - - src/sdk/models/operations/startuniversaltranscode.ts - - src/sdk/models/operations/stopalltasks.ts + - src/sdk/models/operations/starttasks.ts + - src/sdk/models/operations/starttranscodesession.ts + - src/sdk/models/operations/stopallrefreshes.ts + - src/sdk/models/operations/stopdvrreload.ts + - src/sdk/models/operations/stopscan.ts - src/sdk/models/operations/stoptask.ts - - src/sdk/models/operations/stoptranscodesession.ts + - src/sdk/models/operations/stoptasks.ts + - src/sdk/models/operations/terminatesession.ts + - src/sdk/models/operations/transcodeimage.ts + - src/sdk/models/operations/transcodesubtitles.ts + - src/sdk/models/operations/triggerfallback.ts + - src/sdk/models/operations/tunechannel.ts + - src/sdk/models/operations/unmatch.ts + - src/sdk/models/operations/unscrobble.ts + - src/sdk/models/operations/unshuffle.ts + - src/sdk/models/operations/updatehubvisibility.ts + - src/sdk/models/operations/updateitemartwork.ts + - src/sdk/models/operations/updateitems.ts - src/sdk/models/operations/updateplaylist.ts - - src/sdk/models/operations/updateplayprogress.ts - src/sdk/models/operations/uploadplaylist.ts + - src/sdk/models/operations/voicesearchhubs.ts + - src/sdk/models/operations/writelog.ts + - src/sdk/models/operations/writemessage.ts + - src/sdk/models/shared/advancedsubtitles.ts + - src/sdk/models/shared/boolint.ts + - src/sdk/models/shared/channel.ts + - src/sdk/models/shared/channelmapping.ts + - src/sdk/models/shared/composite.ts + - src/sdk/models/shared/device.ts + - src/sdk/models/shared/directory.ts + - src/sdk/models/shared/dvrrequesthandlerslashgetresponses200.ts + - src/sdk/models/shared/filter.ts + - src/sdk/models/shared/getresponses200.ts + - src/sdk/models/shared/historyallgetresponses200.ts + - src/sdk/models/shared/hub.ts + - src/sdk/models/shared/image.ts - src/sdk/models/shared/index.ts + - src/sdk/models/shared/items.ts + - src/sdk/models/shared/librarysection.ts + - src/sdk/models/shared/lineup.ts + - src/sdk/models/shared/locationparameter.ts + - src/sdk/models/shared/media.ts + - src/sdk/models/shared/mediacontainer.ts + - src/sdk/models/shared/mediacontainerwithartwork.ts + - src/sdk/models/shared/mediacontainerwithdecision.ts + - src/sdk/models/shared/mediacontainerwithdevice.ts + - src/sdk/models/shared/mediacontainerwithdirectory.ts + - src/sdk/models/shared/mediacontainerwithhubs.ts + - src/sdk/models/shared/mediacontainerwithlineup.ts + - src/sdk/models/shared/mediacontainerwithmetadata.ts + - src/sdk/models/shared/mediacontainerwithnestedmetadata.ts + - src/sdk/models/shared/mediacontainerwithplaylistmetadata.ts + - src/sdk/models/shared/mediacontainerwithsettings.ts + - src/sdk/models/shared/mediacontainerwithsubscription.ts + - src/sdk/models/shared/mediagraboperation.ts + - src/sdk/models/shared/mediaquery.ts + - src/sdk/models/shared/mediasubscription.ts + - src/sdk/models/shared/metadata.ts + - src/sdk/models/shared/part.ts + - src/sdk/models/shared/player.ts + - src/sdk/models/shared/postresponses200.ts + - src/sdk/models/shared/protocol.ts + - src/sdk/models/shared/requesthandlerslashgetresponses200.ts - src/sdk/models/shared/security.ts - - src/sdk/playlists.ts - - src/sdk/plex.ts + - src/sdk/models/shared/session.ts + - src/sdk/models/shared/setting.ts + - src/sdk/models/shared/slashgetresponses200.ts + - src/sdk/models/shared/sort.ts + - src/sdk/models/shared/stream.ts + - src/sdk/models/shared/subtitles.ts + - src/sdk/models/shared/tag.ts + - src/sdk/models/shared/transcodesession.ts + - src/sdk/models/shared/transcodetype.ts + - src/sdk/models/shared/user.ts + - src/sdk/playlist.ts + - src/sdk/playqueue.ts + - src/sdk/preferences.ts + - src/sdk/provider.ts + - src/sdk/rate.ts - src/sdk/sdk.ts - src/sdk/search.ts - - src/sdk/server.ts - - src/sdk/sessions.ts - - src/sdk/statistics.ts + - src/sdk/status.ts + - src/sdk/subscriptions.ts + - src/sdk/timeline.ts + - src/sdk/transcoder.ts - src/sdk/types/async.ts - src/sdk/types/blobs.ts - src/sdk/types/constdatetime.ts @@ -1281,10 +1672,8 @@ generatedFiles: - src/sdk/types/operations.ts - src/sdk/types/rfcdate.ts - src/sdk/types/streams.ts + - src/sdk/ultrablur.ts - src/sdk/updater.ts - - src/sdk/users.ts - - src/sdk/video.ts - - src/sdk/watchlist.ts - tsconfig.json examples: getServerCapabilities: @@ -1381,6 +1770,18 @@ examples: parameters: query: key: 59398 + identifier: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" responses: "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} @@ -1599,6 +2000,18 @@ examples: parameters: path: taskName: "RefreshPeriodicMetadata" + task: "RefreshLocalMedia" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" responses: "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} @@ -1609,6 +2022,18 @@ examples: parameters: path: taskName: "CleanOldCacheFiles" + task: "CleanOldBundles" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" responses: "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} @@ -2175,9 +2600,20 @@ examples: type: "audio" smart: 1 uri: "https://short-term-disconnection.name/" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" responses: "200": - application/json: {"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}]}} + application/json: {"MediaContainer": {"Metadata": [{"composite": "/playlists/96/composite/1705724593", "duration": 141000, "key": "/playlists/96/items", "leafCount": 1, "playlistType": "video", "smart": false, "title": "A Great Playlist", "type": "playlist", "addedAt": 1705719589, "lastViewedAt": 1705719589, "ratingKey": "96", "summary": "What a great playlist", "updatedAt": 1705724593, "viewCount": 1, "guid": "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55", "icon": "playlist://image.smart"}]}} "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": @@ -2196,9 +2632,21 @@ examples: parameters: path: playlistID: 8419.53 + playlistId: 841953 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" responses: "200": - application/json: {"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}]}} + application/json: {"MediaContainer": {"Metadata": [{"composite": "/playlists/95/composite/1705717387", "duration": 282000, "key": "/playlists/95/items", "leafCount": 2, "playlistType": "video", "smart": true, "title": "Smart Movie Playlist", "type": "playlist", "addedAt": 1705716493, "ratingKey": "95", "summary": "", "updatedAt": 1705717387, "content": "library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1", "guid": "com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91", "icon": "playlist://image.smart"}]}} "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": @@ -2208,6 +2656,18 @@ examples: parameters: path: playlistID: 3432.93 + playlistId: 343293 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" responses: "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} @@ -2218,6 +2678,18 @@ examples: parameters: path: playlistID: 1579.66 + playlistId: 157966 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" responses: "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} @@ -2269,6 +2741,17 @@ examples: path: "/home/barkley/playlist.m3u" force: 1 sectionID: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" responses: "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} @@ -2280,21 +2763,48 @@ examples: query: type: "delegation" scope: "all" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" responses: "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} + "200": + application/json: {} getSourceConnectionInformation: speakeasy-default-get-source-connection-information: parameters: query: source: "server://client-identifier" + refresh: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" responses: "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} + "200": + application/json: {} getTokenDetails: speakeasy-default-get-token-details: responses: @@ -2412,7 +2922,7 @@ examples: speakeasy-default-get-sessions: responses: "200": - application/json: {"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", "originalTitle": "The American Dream Is Killing Me", "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"}}]}} + application/json: {"MediaContainer": {"Metadata": [{"title": "The American Dream Is Killing Me", "type": "track", "addedAt": 1705543312, "art": "/library/metadata/39904/art/1705310687", "duration": 186240, "grandparentArt": "/library/metadata/39904/art/1705310687", "grandparentKey": "/library/metadata/39904", "grandparentRatingKey": "39904", "grandparentThumb": "/library/metadata/39904/thumb/1705310687", "grandparentTitle": "Green Day", "index": 1, "key": "/library/metadata/67085", "Media": [{"audioChannels": 2, "audioCodec": "flac", "bitrate": 1014, "container": "flac", "duration": 186240, "id": 130355, "Part": [{"container": "flac", "duration": 186240, "file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", "id": 130625, "key": "/library/parts/130625/1705543268/file.flac", "size": 23644000, "Stream": [{"audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "codec": "flac", "displayTitle": "FLAC (Stereo)", "id": 352487, "index": 0, "samplingRate": 44100, "selected": true, "streamType": 2, "albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "channels": 2, "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "location": "direct"}], "hasThumbnail": "1", "decision": "directplay", "selected": true}], "selected": true}], "originalTitle": "The American Dream Is Killing Me", "parentIndex": 1, "parentKey": "/library/metadata/67084", "parentRatingKey": "67084", "parentThumb": "/library/metadata/67084/thumb/1705543314", "parentTitle": "Saviors", "ratingCount": 45885, "ratingKey": "67085", "thumb": "/library/metadata/67084/thumb/1705543314", "titleSort": "American Dream Is Killing Me", "updatedAt": 1705543314, "viewOffset": 1000, "grandparentGuid": "plex://artist/5d07bbfd403c6402904a6480", "guid": "plex://track/6535834f71f22f36f71a8e8f", "librarySectionID": "3", "librarySectionKey": "/library/sections/3", "librarySectionTitle": "Music", "musicAnalysisVersion": "1", "parentGuid": "plex://album/65394d6d472b8ab03ef47f12", "parentStudio": "Reprise Records", "parentYear": 2024, "sessionKey": "203", "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"}}]}} "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": @@ -2576,6 +3086,17 @@ examples: query: tonight: 1 skip: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" responses: "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} @@ -2628,5 +3149,4179 @@ examples: application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} + getServerInfo: + speakeasy-default-get-server-info: + parameters: + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getIdentity: + speakeasy-default-get-identity: + responses: + "200": + application/json: {} + getNotifications: + speakeasy-default-get-notifications: + parameters: + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/octet-stream: "x-file: example.file" + connectWebSocket: + speakeasy-default-connect-web-socket: + parameters: + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/octet-stream: "x-file: example.file" + getAllPreferences: + speakeasy-default-get-all-preferences: + responses: + "200": + application/json: {} + setPreferences: + speakeasy-default-set-preferences: + parameters: + query: + prefs: {} + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getPreference: + speakeasy-default-get-preference: + parameters: + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + setRating: + speakeasy-default-set-rating: + parameters: + query: + identifier: "" + key: "" + rating: 8722.46 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + report: + speakeasy-default-report: + parameters: + query: + key: "/foo" + ratingKey: "xyz" + state: "playing" + playQueueItemID: "123" + time: 0 + duration: 10000 + continuing: 1 + updated: 14200000 + offline: 1 + timeToFirstFrame: 1000 + timeStalled: 1000 + bandwidth: 100 + bufferedTime: 100 + bufferedSize: 1024 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"livetv": 7, "machineIdentifier": "0123456789abcdef0123456789abcdef012345678", "musicAnalysis": 2, "myPlexMappingState": "mapped", "myPlexSigninState": "ok", "offlineTranscode": 1}} + unscrobble: + speakeasy-default-unscrobble: + parameters: + query: + identifier: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + listActivities: + speakeasy-default-list-activities: + responses: + "200": + application/json: {} + cancelActivity: + speakeasy-default-cancel-activity: + parameters: + path: + activityId: "d6199ba1-fb5e-4cae-bf17-1a5369c1cf1e" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + stopTasks: {} + getTasks: + speakeasy-default-get-tasks: + responses: + "200": + application/json: {} + startTasks: {} + createDownloadQueue: + speakeasy-default-create-download-queue: + responses: + "200": + application/json: {} + getDownloadQueue: + speakeasy-default-get-download-queue: + parameters: + path: + queueId: 922802 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + addDownloadQueueItems: + speakeasy-default-add-download-queue-items: + parameters: + path: + queueId: 984925 + query: + keys: ["/library/metadata/3", "/library/metadata/6"] + advancedSubtitles: "burn" + audioBoost: 50 + audioChannelCount: 5 + autoAdjustQuality: 1 + autoAdjustSubtitle: 1 + directPlay: 1 + directStream: 1 + directStreamAudio: 1 + disableResolutionRotation: 1 + hasMDE: 1 + location: "wan" + mediaBufferSize: 102400 + mediaIndex: 0 + musicBitrate: 5000 + offset: 90.5 + partIndex: 0 + path: "/library/metadata/151671" + peakBitrate: 12000 + photoResolution: "1080x1080" + protocol: "dash" + secondsPerSegment: 5 + subtitleSize: 50 + subtitles: "segmented" + videoBitrate: 12000 + videoQuality: 50 + videoResolution: "1080x1080" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + listDownloadQueueItems: + speakeasy-default-list-download-queue-items: + parameters: + path: + queueId: 524138 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getItemDecision: + speakeasy-default-get-item-decision: + parameters: + path: + queueId: 231605 + itemId: 32 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getDownloadQueueMedia: + speakeasy-default-get-download-queue-media: + parameters: + path: + queueId: 663184 + itemId: 32 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + removeDownloadQueueItems: + speakeasy-default-remove-download-queue-items: + parameters: + path: + queueId: 946275 + itemId: [32, 345, 23] + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getDownloadQueueItems: + speakeasy-default-get-download-queue-items: + parameters: + path: + queueId: 809886 + itemId: [32, 345, 23] + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + restartProcessingDownloadQueueItems: + speakeasy-default-restart-processing-download-queue-items: + parameters: + path: + queueId: 713001 + itemId: [32, 345, 23] + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getAllHubs: + speakeasy-default-get-all-hubs: + parameters: + query: + onlyTransient: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Hub": [{"type": "track", "context": "hub.home.onDeck", "hubIdentifier": "home.onDeck", "key": "/hubs/sections/home/onDeck", "Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}], "size": 1, "subtype": "podcast", "totalSize": 8}]}} + getContinueWatching: + speakeasy-default-get-continue-watching: + parameters: + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Hub": [{"type": "track", "context": "hub.home.onDeck", "hubIdentifier": "home.onDeck", "key": "/hubs/sections/home/onDeck", "Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}], "size": 1, "subtype": "podcast", "totalSize": 8}]}} + getHubItems: + speakeasy-default-get-hub-items: + parameters: + query: + identifier: ["", "", ""] + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getPromotedHubs: + speakeasy-default-get-promoted-hubs: + parameters: + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Hub": [{"type": "track", "context": "hub.home.onDeck", "hubIdentifier": "home.onDeck", "key": "/hubs/sections/home/onDeck", "Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}], "size": 1, "subtype": "podcast", "totalSize": 8}]}} + getMetadataHubs: + speakeasy-default-get-metadata-hubs: + parameters: + path: + metadataId: 605482 + query: + onlyTransient: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Hub": [{"type": "track", "context": "hub.home.onDeck", "hubIdentifier": "home.onDeck", "key": "/hubs/sections/home/onDeck", "Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}], "size": 1, "subtype": "podcast", "totalSize": 8}]}} + getPostplayHubs: + speakeasy-default-get-postplay-hubs: + parameters: + path: + metadataId: 441419 + query: + onlyTransient: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Hub": [{"type": "track", "context": "hub.home.onDeck", "hubIdentifier": "home.onDeck", "key": "/hubs/sections/home/onDeck", "Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}], "size": 1, "subtype": "podcast", "totalSize": 8}]}} + getRelatedHubs: + speakeasy-default-get-related-hubs: + parameters: + path: + metadataId: 8858 + query: + onlyTransient: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Hub": [{"type": "track", "context": "hub.home.onDeck", "hubIdentifier": "home.onDeck", "key": "/hubs/sections/home/onDeck", "Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}], "size": 1, "subtype": "podcast", "totalSize": 8}]}} + getSectionHubs: + speakeasy-default-get-section-hubs: + parameters: + path: + sectionId: 336924 + query: + onlyTransient: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Hub": [{"type": "track", "context": "hub.home.onDeck", "hubIdentifier": "home.onDeck", "key": "/hubs/sections/home/onDeck", "Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}], "size": 1, "subtype": "podcast", "totalSize": 8}]}} + resetSectionDefaults: + speakeasy-default-reset-section-defaults: + parameters: + path: + sectionId: 383022 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + listHubs: + speakeasy-default-list-hubs: + parameters: + path: + sectionId: 442546 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + createCustomHub: + speakeasy-default-create-custom-hub: + parameters: + path: + sectionId: 869922 + query: + metadataItemId: 703843 + promotedToRecommended: 1 + promotedToOwnHome: 1 + promotedToSharedHome: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + moveHub: + speakeasy-default-move-hub: + parameters: + path: + sectionId: 755710 + query: + identifier: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + deleteCustomHub: + speakeasy-default-delete-custom-hub: + parameters: + path: + sectionId: 625677 + identifier: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + updateHubVisibility: + speakeasy-default-update-hub-visibility: + parameters: + path: + sectionId: 341650 + identifier: "" + query: + promotedToRecommended: 1 + promotedToOwnHome: 1 + promotedToSharedHome: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + searchHubs: + speakeasy-default-search-hubs: + parameters: + query: + query: "" + sectionId: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Hub": [{"type": "track", "context": "hub.home.onDeck", "hubIdentifier": "home.onDeck", "key": "/hubs/sections/home/onDeck", "Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}], "size": 1, "subtype": "podcast", "totalSize": 8}]}} + voiceSearchHubs: + speakeasy-default-voice-search-hubs: + parameters: + query: + query: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Hub": [{"type": "track", "context": "hub.home.onDeck", "hubIdentifier": "home.onDeck", "key": "/hubs/sections/home/onDeck", "Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}], "size": 1, "subtype": "podcast", "totalSize": 8}]}} + getLibraryItems: + speakeasy-default-get-library-items: + parameters: + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + deleteCaches: {} + cleanBundles: {} + ingestTransientItem: + speakeasy-default-ingest-transient-item: + parameters: + query: + url: "file:///storage%2Femulated%2F0%2FArcher-S01E01.mkv" + virtualFilePath: "/Avatar.mkv" + computeHashes: 1 + ingestNonMatches: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getLibraryMatches: + speakeasy-default-get-library-matches: + parameters: + query: + includeFullMetadata: 1 + includeAncestorMetadata: 1 + includeAlternateMetadataSources: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + optimizeDatabase: + speakeasy-default-optimize-database: + parameters: + query: + async: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getRandomArtwork: + speakeasy-default-get-random-artwork: + parameters: + query: + sections: [5, 6] + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getSections: + speakeasy-default-get-sections: + responses: + "200": + application/json: {} + addSection: + speakeasy-default-add-section: + parameters: + query: + name: "" + type: 39544 + agent: "" + language: "" + locations: ["O:\\fatboy\\Media\\Ripped\\Music", "O:\\fatboy\\Media\\My Music"] + prefs: {} + relative: 1 + importFromiTunes: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Directory": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + stopAllRefreshes: + speakeasy-default-stop-all-refreshes: + responses: + "200": + application/json: {"MediaContainer": {"livetv": 7, "machineIdentifier": "0123456789abcdef0123456789abcdef012345678", "musicAnalysis": 2, "myPlexMappingState": "mapped", "myPlexSigninState": "ok", "offlineTranscode": 1}} + getSectionsPrefs: + speakeasy-default-get-sections-prefs: + parameters: + query: + type: 460221 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"livetv": 7, "machineIdentifier": "0123456789abcdef0123456789abcdef012345678", "musicAnalysis": 2, "myPlexMappingState": "mapped", "myPlexSigninState": "ok", "offlineTranscode": 1}} + refreshSectionsMetadata: + speakeasy-default-refresh-sections-metadata: + parameters: + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getTags: + speakeasy-default-get-tags: + parameters: + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + deleteMetadataItem: + speakeasy-default-delete-metadata-item: + parameters: + path: + ids: "" + query: + proxy: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + editMetadataItem: + speakeasy-default-edit-metadata-item: + parameters: + path: + ids: ["", ""] + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + detectAds: + speakeasy-default-detect-ads: + parameters: + path: + ids: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getAllItemLeaves: + speakeasy-default-get-all-item-leaves: + parameters: + path: + ids: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + analyzeMetadata: + speakeasy-default-analyze-metadata: + parameters: + path: + ids: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + generateThumbs: + speakeasy-default-generate-thumbs: + parameters: + path: + ids: "" + query: + force: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + detectCredits: + speakeasy-default-detect-credits: + parameters: + path: + ids: "" + query: + force: 1 + manual: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getExtras: + speakeasy-default-get-extras: + parameters: + path: + ids: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + addExtras: + speakeasy-default-add-extras: + parameters: + path: + ids: "" + query: + url: "https://super-mortise.biz/" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getFile: + speakeasy-default-get-file: + parameters: + path: + ids: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + audio/mpeg3: "x-file: example.file" + image/jpeg: "x-file: example.file" + startBifGeneration: + speakeasy-default-start-bif-generation: + parameters: + path: + ids: "" + query: + force: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + detectIntros: + speakeasy-default-detect-intros: + parameters: + path: + ids: "" + query: + force: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + createMarker: + speakeasy-default-create-marker: + parameters: + path: + ids: "" + query: + type: 248391 + startTimeOffset: 535191 + attributes: {} + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + matchItem: + speakeasy-default-match-item: + parameters: + path: + ids: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + listMatches: + speakeasy-default-list-matches: + parameters: + path: + ids: "" + query: + manual: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + mergeItems: + speakeasy-default-merge-items: + parameters: + path: + ids: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + listSonicallySimilar: + speakeasy-default-list-sonically-similar: + parameters: + path: + ids: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + setItemPreferences: + speakeasy-default-set-item-preferences: + parameters: + path: + ids: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + refreshItemsMetadata: + speakeasy-default-refresh-items-metadata: + parameters: + path: + ids: "" + query: + markUpdated: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getRelatedItems: + speakeasy-default-get-related-items: + parameters: + path: + ids: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Hub": [{"type": "track", "context": "hub.home.onDeck", "hubIdentifier": "home.onDeck", "key": "/hubs/sections/home/onDeck", "Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}], "size": 1, "subtype": "podcast", "totalSize": 8}]}} + listSimilar: + speakeasy-default-list-similar: + parameters: + path: + ids: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + splitItem: + speakeasy-default-split-item: + parameters: + path: + ids: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + addSubtitles: + speakeasy-default-add-subtitles: + parameters: + path: + ids: "" + query: + forced: 1 + hearingImpaired: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getItemTree: + speakeasy-default-get-item-tree: + parameters: + path: + ids: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"MetadataItem": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "MetadataItem": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}]}} + unmatch: + speakeasy-default-unmatch: + parameters: + path: + ids: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + listTopUsers: + speakeasy-default-list-top-users: + parameters: + path: + ids: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + detectVoiceActivity: + speakeasy-default-detect-voice-activity: + parameters: + path: + ids: "" + query: + force: 1 + manual: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getAugmentationStatus: + speakeasy-default-get-augmentation-status: + parameters: + path: + augmentationId: "" + query: + wait: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + setStreamSelection: + speakeasy-default-set-stream-selection: + parameters: + path: + partId: 360489 + query: + allParts: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getPerson: + speakeasy-default-get-person: + parameters: + path: + personId: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Directory": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}} + listPersonMedia: + speakeasy-default-list-person-media: + parameters: + path: + personId: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + deleteLibrarySection: + speakeasy-default-delete-library-section: + parameters: + path: + sectionId: "" + query: + async: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getLibraryDetails: + speakeasy-default-get-library-details: + parameters: + path: + sectionId: "" + query: + includeDetails: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Directory": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + editSection: + speakeasy-default-edit-section: + parameters: + path: + sectionId: "" + query: + agent: "" + locations: ["O:\\fatboy\\Media\\Ripped\\Music", "O:\\fatboy\\Media\\My Music"] + prefs: {} + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + updateItems: + speakeasy-default-update-items: + parameters: + path: + sectionId: "" + query: + field.locked: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + startAnalysis: + speakeasy-default-start-analysis: + parameters: + path: + sectionId: 158829 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + autocomplete: + speakeasy-default-autocomplete: + parameters: + path: + sectionId: 942007 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getCollections: + speakeasy-default-get-collections: + parameters: + path: + sectionId: 348838 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getCommon: + speakeasy-default-get-common: + parameters: + path: + sectionId: 298154 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + emptyTrash: + speakeasy-default-empty-trash: + parameters: + path: + sectionId: 30052 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getSectionFilters: + speakeasy-default-get-section-filters: + parameters: + path: + sectionId: 380557 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getFirstCharacters: + speakeasy-default-get-first-characters: + parameters: + path: + sectionId: 3947 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + deleteIndexes: + speakeasy-default-delete-indexes: + parameters: + path: + sectionId: 588437 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + deleteIntros: + speakeasy-default-delete-intros: + parameters: + path: + sectionId: 498656 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getSectionPreferences: + speakeasy-default-get-section-preferences: + parameters: + path: + sectionId: 754869 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + setSectionPreferences: + speakeasy-default-set-section-preferences: + parameters: + path: + sectionId: 349936 + query: + prefs: {} + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + cancelRefresh: + speakeasy-default-cancel-refresh: + parameters: + path: + sectionId: 326852 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + refreshSection: + speakeasy-default-refresh-section: + parameters: + path: + sectionId: 450300 + query: + force: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getAvailableSorts: + speakeasy-default-get-available-sorts: + parameters: + path: + sectionId: 212498 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getStreamLevels: + speakeasy-default-get-stream-levels: + parameters: + path: + streamId: 447611 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getStreamLoudness: + speakeasy-default-get-stream-loudness: + parameters: + path: + streamId: 277271 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + text/plain: "" + getChapterImage: + speakeasy-default-get-chapter-image: + parameters: + path: + mediaId: 892563 + chapter: 48348 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + image/jpeg: "x-file: example.file" + setItemArtwork: + speakeasy-default-set-item-artwork: + parameters: + path: + ids: "" + element: "banner" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + updateItemArtwork: + speakeasy-default-update-item-artwork: + parameters: + path: + ids: "" + element: "clearLogo" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + deleteMarker: + speakeasy-default-delete-marker: + parameters: + path: + ids: "" + marker: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + editMarker: + speakeasy-default-edit-marker: + parameters: + path: + ids: "" + marker: "" + query: + type: 884347 + startTimeOffset: 517251 + attributes: {} + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + deleteMediaItem: + speakeasy-default-delete-media-item: + parameters: + path: + ids: "" + mediaItem: "" + query: + proxy: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getPartIndex: + speakeasy-default-get-part-index: + parameters: + path: + partId: 724750 + index: "sd" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/octet-stream: "x-file: example.file" + deleteCollection: + speakeasy-default-delete-collection: + parameters: + path: + sectionId: 283619 + collectionId: 680895 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getSectionImage: + speakeasy-default-get-section-image: + parameters: + path: + sectionId: 925611 + updatedAt: 117413 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + deleteStream: + speakeasy-default-delete-stream: + parameters: + path: + streamId: 841510 + ext: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getStream: + speakeasy-default-get-stream: + parameters: + path: + streamId: 314506 + ext: "" + query: + autoAdjustSubtitle: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + setStreamOffset: + speakeasy-default-set-stream-offset: + parameters: + path: + streamId: 606295 + ext: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getItemArtwork: + speakeasy-default-get-item-artwork: + parameters: + path: + ids: "" + element: "poster" + timestamp: 999555 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + audio/mpeg3: "x-file: example.file" + image/jpeg: "x-file: example.file" + getMediaPart: + speakeasy-default-get-media-part: + parameters: + path: + partId: 877105 + changestamp: 970622 + filename: "example.file" + query: + download: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getImageFromBif: + speakeasy-default-get-image-from-bif: + parameters: + path: + partId: 304273 + index: "sd" + offset: 939569 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + image/jpeg: "x-file: example.file" + createCollection: + speakeasy-default-create-collection: + parameters: + query: + sectionId: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + listDVRs: + speakeasy-default-list-DV-rs: + responses: + "200": + application/json: {} + createDVR: + speakeasy-default-create-DVR: + parameters: + query: + lineup: "lineup://tv.plex.providers.epg.onconnect/USA-HI51418-DEFAULT" + device: ["device[]=device://tv.plex.grabbers.hdhomerun/1053C0CA"] + language: "eng" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + deleteDVR: + speakeasy-default-delete-DVR: + parameters: + path: + dvrId: 855088 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getDVR: + speakeasy-default-get-DVR: + parameters: + path: + dvrId: 973518 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + deleteLineup: + speakeasy-default-delete-lineup: + parameters: + path: + dvrId: 454470 + query: + lineup: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + addLineup: + speakeasy-default-add-lineup: + parameters: + path: + dvrId: 945235 + query: + lineup: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + setDVRPreferences: + speakeasy-default-set-DVR-preferences: + parameters: + path: + dvrId: 116357 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + stopDVRReload: + speakeasy-default-stop-DVR-reload: + parameters: + path: + dvrId: 348053 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + reloadGuide: + speakeasy-default-reload-guide: + parameters: + path: + dvrId: 140753 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + tuneChannel: + speakeasy-default-tune-channel: + parameters: + path: + dvrId: 834281 + channel: "2.1" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + removeDeviceFromDVR: + speakeasy-default-remove-device-from-DVR: + parameters: + path: + dvrId: 945416 + deviceId: 260761 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + addDeviceToDVR: + speakeasy-default-add-device-to-DVR: + parameters: + path: + dvrId: 334755 + deviceId: 852930 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + computeChannelMap: + speakeasy-default-compute-channel-map: + parameters: + query: + device: "Mobile" + lineup: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getChannels: + speakeasy-default-get-channels: + parameters: + query: + lineup: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getCountries: + speakeasy-default-get-countries: + responses: + "200": + application/json: {} + getAllLanguages: + speakeasy-default-get-all-languages: + responses: + "200": + application/json: {} + getLineup: + speakeasy-default-get-lineup: + parameters: + query: + device: "Desktop" + lineupGroup: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getLineupChannels: + speakeasy-default-get-lineup-channels: + parameters: + query: + lineup: ["", ""] + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getCountriesLineups: + speakeasy-default-get-countries-lineups: + parameters: + path: + country: "Malawi" + epgId: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getCountryRegions: + speakeasy-default-get-country-regions: + parameters: + path: + country: "Morocco" + epgId: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + listLineups: + speakeasy-default-list-lineups: + parameters: + path: + country: "Vanuatu" + epgId: "" + region: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getLiveTVSession: + speakeasy-default-get-live-TV-session: + parameters: + path: + sessionId: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getSessionPlaylistIndex: + speakeasy-default-get-session-playlist-index: + parameters: + path: + sessionId: "" + consumerId: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getSessionSegment: + speakeasy-default-get-session-segment: + parameters: + path: + sessionId: "" + consumerId: "" + segmentId: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + writeLog: + speakeasy-default-write-log: + requestBody: + text/plain: "x-file: example.file" + writeMessage: + speakeasy-default-write-message: + parameters: + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + enablePapertrail: + speakeasy-default-enable-papertrail: + parameters: + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getAvailableGrabbers: + speakeasy-default-get-available-grabbers: + parameters: + query: + protocol: "livetv" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + listDevices: + speakeasy-default-list-devices: + responses: + "200": + application/json: {} + addDevice: + speakeasy-default-add-device: + parameters: + query: + uri: "http://10.0.0.5" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + discoverDevices: + speakeasy-default-discover-devices: + responses: + "200": + application/json: {} + removeDevice: + speakeasy-default-remove-device: + parameters: + path: + deviceId: 685908 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getDeviceDetails: + speakeasy-default-get-device-details: + parameters: + path: + deviceId: 170949 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + modifyDevice: + speakeasy-default-modify-device: + parameters: + path: + deviceId: 879135 + query: + enabled: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + setChannelmap: + speakeasy-default-set-channelmap: + parameters: + path: + deviceId: 937661 + query: + channelMapping: {} + channelMappingByKey: {} + channelsEnabled: ["46.1,44.1,45.1"] + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getDevicesChannels: + speakeasy-default-get-devices-channels: + parameters: + path: + deviceId: 517209 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + setDevicePreferences: + speakeasy-default-set-device-preferences: + parameters: + path: + deviceId: 420973 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + stopScan: + speakeasy-default-stop-scan: + parameters: + path: + deviceId: 576494 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + scan: + speakeasy-default-scan: + parameters: + path: + deviceId: 57391 + query: + source: "Cable" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getThumb: + speakeasy-default-get-thumb: + parameters: + path: + deviceId: 960617 + version: 1025 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + listProviders: + speakeasy-default-list-providers: + responses: + "200": + application/json: {"MediaContainer": {"livetv": 7, "machineIdentifier": "0123456789abcdef0123456789abcdef012345678", "musicAnalysis": 2, "myPlexMappingState": "mapped", "myPlexSigninState": "ok", "offlineTranscode": 1}} + addProvider: + speakeasy-default-add-provider: + parameters: + query: + url: "https://steep-obedience.name/" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + refreshProviders: {} + deleteMediaProvider: + speakeasy-default-delete-media-provider: + parameters: + path: + provider: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getAllSubscriptions: + speakeasy-default-get-all-subscriptions: + parameters: + query: + includeGrabs: 1 + includeStorage: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"MediaSubscription": [{"MediaGrabOperation": [{"Metadata": {"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}}]}]}} + createSubscription: + speakeasy-default-create-subscription: + parameters: + query: + targetLibrarySectionID: 1 + targetSectionLocationID: 3 + type: 2 + hints: {} + prefs: {} + params: {} + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"MediaSubscription": [{"MediaGrabOperation": [{"Metadata": {"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}}]}]}} + processSubscriptions: {} + getScheduledRecordings: + speakeasy-default-get-scheduled-recordings: + responses: + "200": + application/json: {"MediaContainer": {"MediaGrabOperation": [{"Metadata": {"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}}]}} + getTemplate: + speakeasy-default-get-template: + parameters: + query: + guid: "plex://episode/5fc70265c40548002d539d23" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"SubscriptionTemplate": [{"MediaSubscription": [{"title": "This Episode", "MediaGrabOperation": [{"Metadata": {"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}}]}]}]}} + cancelGrab: + speakeasy-default-cancel-grab: + parameters: + path: + operationId: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + deleteSubscription: + speakeasy-default-delete-subscription: + parameters: + path: + subscriptionId: 974618 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getSubscription: + speakeasy-default-get-subscription: + parameters: + path: + subscriptionId: 186713 + query: + includeGrabs: 1 + includeStorage: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"MediaSubscription": [{"MediaGrabOperation": [{"Metadata": {"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}}]}]}} + editSubscriptionPreferences: + speakeasy-default-edit-subscription-preferences: + parameters: + path: + subscriptionId: 673918 + query: + prefs: {} + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"MediaSubscription": [{"MediaGrabOperation": [{"Metadata": {"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}}]}]}} + reorderSubscription: + speakeasy-default-reorder-subscription: + parameters: + path: + subscriptionId: 440634 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"MediaSubscription": [{"MediaGrabOperation": [{"Metadata": {"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}}]}]}} + transcodeImage: + speakeasy-default-transcode-image: + parameters: + query: + url: "/library/metadata/265/thumb/1715112705" + background: "#ff5522" + upscale: 1 + minSize: 1 + rotate: 1 + blendColor: "#ff5522" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + image/jpeg: "x-file: example.file" + image/png: "x-file: example.file" + image/x-portable-pixmap: "x-file: example.file" + makeDecision: + speakeasy-default-make-decision: + parameters: + path: + transcodeType: "music" + query: + advancedSubtitles: "burn" + audioBoost: 50 + audioChannelCount: 5 + autoAdjustQuality: 1 + autoAdjustSubtitle: 1 + directPlay: 1 + directStream: 1 + directStreamAudio: 1 + disableResolutionRotation: 1 + hasMDE: 1 + location: "wan" + mediaBufferSize: 102400 + mediaIndex: 0 + musicBitrate: 5000 + offset: 90.5 + partIndex: 0 + path: "/library/metadata/151671" + peakBitrate: 12000 + photoResolution: "1080x1080" + protocol: "dash" + secondsPerSegment: 5 + subtitleSize: 50 + subtitles: "none" + videoBitrate: 12000 + videoQuality: 50 + videoResolution: "1080x1080" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + X-Plex-Client-Profile-Extra: "add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)" + X-Plex-Client-Profile-Name: "generic" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + triggerFallback: + speakeasy-default-trigger-fallback: + parameters: + path: + transcodeType: "audio" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + transcodeSubtitles: + speakeasy-default-transcode-subtitles: + parameters: + path: + transcodeType: "audio" + query: + advancedSubtitles: "burn" + audioBoost: 50 + audioChannelCount: 5 + autoAdjustQuality: 1 + autoAdjustSubtitle: 1 + directPlay: 1 + directStream: 1 + directStreamAudio: 1 + disableResolutionRotation: 1 + hasMDE: 1 + location: "wan" + mediaBufferSize: 102400 + mediaIndex: 0 + musicBitrate: 5000 + offset: 90.5 + partIndex: 0 + path: "/library/metadata/151671" + peakBitrate: 12000 + photoResolution: "1080x1080" + protocol: "dash" + secondsPerSegment: 5 + subtitleSize: 50 + subtitles: "embedded" + videoBitrate: 12000 + videoQuality: 50 + videoResolution: "1080x1080" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + X-Plex-Client-Profile-Extra: "add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)" + X-Plex-Client-Profile-Name: "generic" + startTranscodeSession: + speakeasy-default-start-transcode-session: + parameters: + path: + transcodeType: "music" + extension: "mpd" + query: + advancedSubtitles: "burn" + audioBoost: 50 + audioChannelCount: 5 + autoAdjustQuality: 1 + autoAdjustSubtitle: 1 + directPlay: 1 + directStream: 1 + directStreamAudio: 1 + disableResolutionRotation: 1 + hasMDE: 1 + location: "wan" + mediaBufferSize: 102400 + mediaIndex: 0 + musicBitrate: 5000 + offset: 90.5 + partIndex: 0 + path: "/library/metadata/151671" + peakBitrate: 12000 + photoResolution: "1080x1080" + protocol: "dash" + secondsPerSegment: 5 + subtitleSize: 50 + subtitles: "none" + videoBitrate: 12000 + videoQuality: 50 + videoResolution: "1080x1080" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + X-Plex-Client-Profile-Extra: "add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)" + X-Plex-Client-Profile-Name: "generic" + responses: + "200": + video/x-matroska: "x-file: example.file" + listPlaylists: + speakeasy-default-list-playlists: + parameters: + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getPlaylistItems: + speakeasy-default-get-playlist-items: + parameters: + path: + playlistId: 118195 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getPlaylistGenerators: + speakeasy-default-get-playlist-generators: + parameters: + path: + playlistId: 162342 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + clearPlaylistItems: + speakeasy-default-clear-playlist-items: + parameters: + path: + playlistId: 552140 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + addPlaylistItems: + speakeasy-default-add-playlist-items: + parameters: + path: + playlistId: 533723 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + deletePlaylistItem: + speakeasy-default-delete-playlist-item: + parameters: + path: + playlistId: 981646 + generatorId: 194010 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getPlaylistGenerator: + speakeasy-default-get-playlist-generator: + parameters: + path: + playlistId: 744880 + generatorId: 322168 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + modifyPlaylistGenerator: + speakeasy-default-modify-playlist-generator: + parameters: + path: + playlistId: 972007 + generatorId: 208334 + query: + Item: {"Location": {"uri": "library://82503060-0d68-4603-b594-8b071d54819e/item/%2Flibrary%2Fmetadata%2F146"}, "locationID": -1, "Policy": {"value": null, "scope": "all", "unwatched": 0}, "target": "", "targetTagID": 1, "title": "Jack-Jack Attack", "type": 42} + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getPlaylistGeneratorItems: + speakeasy-default-get-playlist-generator-items: + parameters: + path: + playlistId: 77230 + generatorId: 979714 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": {"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}}} + movePlaylistItem: + speakeasy-default-move-playlist-item: + parameters: + path: + playlistId: 940298 + playlistItemId: 375626 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + refreshPlaylist: + speakeasy-default-refresh-playlist: + parameters: + path: + playlistId: 895314 + generatorId: 629742 + metadataId: 724422 + action: "disable" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + createPlayQueue: + speakeasy-default-create-play-queue: + parameters: + query: + type: "audio" + shuffle: 1 + repeat: 1 + continuous: 1 + recursive: 1 + onDeck: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getPlayQueue: + speakeasy-default-get-play-queue: + parameters: + path: + playQueueId: 210646 + query: + own: 1 + includeBefore: 1 + includeAfter: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + addToPlayQueue: + speakeasy-default-add-to-play-queue: + parameters: + path: + playQueueId: 919248 + query: + next: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + clearPlayQueue: + speakeasy-default-clear-play-queue: + parameters: + path: + playQueueId: 86357 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + resetPlayQueue: + speakeasy-default-reset-play-queue: + parameters: + path: + playQueueId: 581891 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + shuffle: + speakeasy-default-shuffle: + parameters: + path: + playQueueId: 316150 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + unshuffle: + speakeasy-default-unshuffle: + parameters: + path: + playQueueId: 484388 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + deletePlayQueueItem: + speakeasy-default-delete-play-queue-item: + parameters: + path: + playQueueId: 285738 + playQueueItemId: 464354 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + movePlayQueueItem: + speakeasy-default-move-play-queue-item: + parameters: + path: + playQueueId: 31341 + playQueueItemId: 495865 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getColors: + speakeasy-default-get-colors: + parameters: + query: + url: "/library/metadata/217745/art/1718931408" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getImage: + speakeasy-default-get-image: + parameters: + query: + topLeft: "3f280a" + topRight: "6b4713" + bottomRight: "0f2a43" + bottomLeft: "1c425d" + width: 1920 + height: 1080 + noise: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + image/png: "x-file: example.file" + listSessions: + speakeasy-default-list-sessions: + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getBackgroundTasks: + speakeasy-default-get-background-tasks: + responses: + "200": + application/json: {} + listPlaybackHistory: + speakeasy-default-list-playback-history: + parameters: + query: + sort: ["viewedAt:desc,accountID"] + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + terminateSession: + speakeasy-default-terminate-session: + parameters: + query: + sessionId: "cdefghijklmnopqrstuvwxyz" + reason: "Stop Playing" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + deleteHistory: + speakeasy-default-delete-history: + parameters: + path: + historyId: 953579 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getHistoryItem: + speakeasy-default-get-history-item: + parameters: + path: + historyId: 832213 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + checkUpdates: + speakeasy-default-check-updates: + parameters: + query: + download: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + getUpdatesStatus: + speakeasy-default-get-updates-status: + responses: + "200": + application/json: {} + getCollectionItems: + speakeasy-default-get-collection-items: + parameters: + path: + collectionId: 314585 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getMetadataItem: + speakeasy-default-get-metadata-item: + parameters: + path: + ids: [] + query: + asyncCheckFiles: 1 + asyncRefreshLocalMediaAgent: 1 + asyncRefreshAnalysis: 1 + checkFiles: 1 + skipRefresh: 1 + checkFileAvailability: 1 + asyncAugmentMetadata: 1 + augmentCount: 1 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getAlbums: + speakeasy-default-get-albums: + parameters: + path: + sectionId: 817133 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + listContent: + speakeasy-default-list-content: + parameters: + path: + sectionId: "" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getAllLeaves: + speakeasy-default-get-all-leaves: + parameters: + path: + sectionId: 633197 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getArts: + speakeasy-default-get-arts: + parameters: + path: + sectionId: 859200 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getCategories: + speakeasy-default-get-categories: + parameters: + path: + sectionId: 21841 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getCluster: + speakeasy-default-get-cluster: + parameters: + path: + sectionId: 138560 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getSonicPath: + speakeasy-default-get-sonic-path: + parameters: + path: + sectionId: 914549 + query: + startID: 629990 + endID: 687740 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getFolders: + speakeasy-default-get-folders: + parameters: + path: + sectionId: 892532 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + listMoments: + speakeasy-default-list-moments: + parameters: + path: + sectionId: 403239 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {} + getSonicallySimilar: + speakeasy-default-get-sonically-similar: + parameters: + path: + sectionId: 525956 + query: + values: [] + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + getCollectionImage: + speakeasy-default-get-collection-image: + parameters: + path: + collectionId: 474227 + updatedAt: 759379 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + image/jpeg: "x-file: example.file" + addCollectionItems: + speakeasy-default-add-collection-items: + parameters: + path: + collectionId: 338144 + query: + uri: "https://expensive-bakeware.com" + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + deleteCollectionItem: + speakeasy-default-delete-collection-item: + parameters: + path: + collectionId: 320928 + itemId: 406983 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} + moveCollectionItem: + speakeasy-default-move-collection-item: + parameters: + path: + collectionId: 239532 + itemId: 513864 + header: + X-Plex-Client-Identifier: "abc123" + X-Plex-Product: "Plex for Roku" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Device: "Roku 3" + X-Plex-Model: "4200X" + X-Plex-Device-Vendor: "Roku" + X-Plex-Device-Name: "Living Room TV" + X-Plex-Marketplace: "googlePlay" + responses: + "200": + application/json: {"MediaContainer": {"Metadata": [{"Autotag": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Country": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Director": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Genre": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Guid": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Media": [{"aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 5612, "container": "mov", "duration": 150192, "has64bitOffsets": false, "hasVoiceActivity": true, "height": 544, "id": 1, "optimizedForStreaming": false, "Part": [{"audioProfile": "lc", "container": "mov", "duration": 150192, "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", "has64bitOffsets": false, "id": 1, "key": "/library/parts/1/1531779263/file.mov", "optimizedForStreaming": false, "size": 105355654, "Stream": [{"default": true, "audioChannelLayout": "stereo", "bitDepth": 8, "bitrate": 5466, "canAutoSync": true, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codec": "h264", "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "displayTitle": "English (H.264 Main)", "frameRate": 23.976, "hasScalingMatrix": false, "height": 544, "id": 1, "index": 0, "key": "/library/streams/1", "language": "English", "languageCode": "eng", "level": 31, "profile": "main", "refFrames": 2, "samplingRate": 48000, "streamIdentifier": 1, "streamType": 1, "width": 1280}], "videoProfile": "main"}], "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "main", "videoResolution": "720", "width": 1280}], "Rating": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Role": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}], "Writer": [{"filter": "actor=49", "role": "Secretary", "tag": "Shaun Lawton", "tagKey": "5d3ee12c4cde6a001c3e0b27", "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"}]}]}} examplesVersion: 1.0.2 -generatedTests: {} +generatedTests: + getServerInfo: "2025-10-12T05:25:28Z" + getIdentity: "2025-10-12T05:25:28Z" + getSourceConnectionInformation: "2025-10-12T05:25:28Z" + getTransientToken: "2025-10-12T05:25:28Z" + getNotifications: "2025-10-12T05:25:28Z" + connectWebSocket: "2025-10-12T05:25:28Z" + getAllPreferences: "2025-10-12T05:25:28Z" + getPreference: "2025-10-12T05:25:28Z" + report: "2025-10-12T05:25:28Z" + listActivities: "2025-10-12T05:25:28Z" + getTasks: "2025-10-12T05:25:28Z" + stopTask: "2025-10-12T05:25:28Z" + startTask: "2025-10-12T05:25:28Z" + createDownloadQueue: "2025-10-12T05:25:28Z" + getDownloadQueue: "2025-10-12T05:25:28Z" + addDownloadQueueItems: "2025-10-12T05:25:28Z" + listDownloadQueueItems: "2025-10-12T05:25:28Z" + getItemDecision: "2025-10-12T05:25:28Z" + getDownloadQueueItems: "2025-10-12T05:25:28Z" + getAllHubs: "2025-10-12T05:25:28Z" + getContinueWatching: "2025-10-12T05:25:28Z" + getHubItems: "2025-10-12T05:25:28Z" + getPromotedHubs: "2025-10-12T05:25:28Z" + getMetadataHubs: "2025-10-12T05:25:28Z" + getPostplayHubs: "2025-10-12T05:25:28Z" + getRelatedHubs: "2025-10-12T05:25:28Z" + getSectionHubs: "2025-10-12T05:25:28Z" + listHubs: "2025-10-12T05:25:28Z" + moveHub: "2025-10-12T05:25:28Z" + searchHubs: "2025-10-12T05:25:28Z" + voiceSearchHubs: "2025-10-12T05:25:28Z" + getLibraryItems: "2025-10-12T05:25:28Z" + ingestTransientItem: "2025-10-12T05:25:28Z" + getLibraryMatches: "2025-10-12T05:25:28Z" + getRandomArtwork: "2025-10-12T05:25:28Z" + getSections: "2025-10-12T05:25:28Z" + addSection: "2025-10-12T05:25:28Z" + stopAllRefreshes: "2025-10-12T05:25:28Z" + getSectionsPrefs: "2025-10-12T05:25:28Z" + getTags: "2025-10-12T05:25:28Z" + getAllItemLeaves: "2025-10-12T05:25:28Z" + getExtras: "2025-10-12T05:25:28Z" + getFile: "2025-10-12T05:25:28Z" + createMarker: "2025-10-12T05:25:28Z" + listMatches: "2025-10-12T05:25:28Z" + listSonicallySimilar: "2025-10-12T05:25:28Z" + getRelatedItems: "2025-10-12T05:25:28Z" + listSimilar: "2025-10-12T05:25:28Z" + getItemTree: "2025-10-12T05:25:28Z" + listTopUsers: "2025-10-12T05:25:28Z" + getPerson: "2025-10-12T05:25:28Z" + listPersonMedia: "2025-10-12T05:25:28Z" + getLibraryDetails: "2025-10-12T05:25:28Z" + autocomplete: "2025-10-12T05:25:28Z" + getCollections: "2025-10-12T05:25:28Z" + getCommon: "2025-10-12T05:25:28Z" + getSectionFilters: "2025-10-12T05:25:28Z" + getFirstCharacters: "2025-10-12T05:25:28Z" + getSectionPreferences: "2025-10-12T05:25:28Z" + getAvailableSorts: "2025-10-12T05:25:28Z" + getStreamLevels: "2025-10-12T05:25:28Z" + getStreamLoudness: "2025-10-12T05:25:28Z" + getChapterImage: "2025-10-12T05:25:28Z" + editMarker: "2025-10-12T05:25:28Z" + getPartIndex: "2025-10-12T05:25:28Z" + getItemArtwork: "2025-10-12T05:25:28Z" + getImageFromBif: "2025-10-12T05:25:28Z" + createCollection: "2025-10-12T05:25:28Z" + listDVRs: "2025-10-12T05:25:28Z" + createDVR: "2025-10-12T05:25:28Z" + getDVR: "2025-10-12T05:25:28Z" + deleteLineup: "2025-10-12T05:25:28Z" + addLineup: "2025-10-12T05:25:28Z" + setDVRPreferences: "2025-10-12T05:25:28Z" + tuneChannel: "2025-10-12T05:25:28Z" + removeDeviceFromDVR: "2025-10-12T05:25:28Z" + addDeviceToDVR: "2025-10-12T05:25:28Z" + computeChannelMap: "2025-10-12T05:25:28Z" + getChannels: "2025-10-12T05:25:28Z" + getCountries: "2025-10-12T05:25:28Z" + getAllLanguages: "2025-10-12T05:25:28Z" + getLineupChannels: "2025-10-12T05:25:28Z" + getCountriesLineups: "2025-10-12T05:25:28Z" + getCountryRegions: "2025-10-12T05:25:28Z" + listLineups: "2025-10-12T05:25:28Z" + getSessions: "2025-10-12T05:25:28Z" + getLiveTVSession: "2025-10-12T05:25:28Z" + getAvailableGrabbers: "2025-10-12T05:25:28Z" + listDevices: "2025-10-12T05:25:28Z" + addDevice: "2025-10-12T05:25:28Z" + discoverDevices: "2025-10-12T05:25:28Z" + removeDevice: "2025-10-12T05:25:28Z" + getDeviceDetails: "2025-10-12T05:25:28Z" + modifyDevice: "2025-10-12T05:25:28Z" + setChannelmap: "2025-10-12T05:25:28Z" + getDevicesChannels: "2025-10-12T05:25:28Z" + stopScan: "2025-10-12T05:25:28Z" + scan: "2025-10-12T05:25:28Z" + listProviders: "2025-10-12T05:25:28Z" + getAllSubscriptions: "2025-10-12T05:25:28Z" + createSubscription: "2025-10-12T05:25:28Z" + getScheduledRecordings: "2025-10-12T05:25:28Z" + getTemplate: "2025-10-12T05:25:28Z" + getSubscription: "2025-10-12T05:25:28Z" + editSubscriptionPreferences: "2025-10-12T05:25:28Z" + reorderSubscription: "2025-10-12T05:25:28Z" + transcodeImage: "2025-10-12T05:25:28Z" + makeDecision: "2025-10-12T05:25:28Z" + startTranscodeSession: "2025-10-12T05:25:28Z" + listPlaylists: "2025-10-12T05:25:28Z" + getPlaylist: "2025-10-12T05:25:28Z" + getPlaylistItems: "2025-10-12T05:25:28Z" + createPlaylist: "2025-10-12T05:25:28Z" + uploadPlaylist: "2025-10-12T05:25:28Z" + deletePlaylist: "2025-10-12T05:25:28Z" + updatePlaylist: "2025-10-12T05:25:28Z" + getPlaylistGenerators: "2025-10-12T05:25:28Z" + clearPlaylistItems: "2025-10-12T05:25:28Z" + addPlaylistItems: "2025-10-12T05:25:28Z" + deletePlaylistItem: "2025-10-12T05:25:28Z" + getPlaylistGenerator: "2025-10-12T05:25:28Z" + modifyPlaylistGenerator: "2025-10-12T05:25:28Z" + getPlaylistGeneratorItems: "2025-10-12T05:25:28Z" + movePlaylistItem: "2025-10-12T05:25:28Z" + createPlayQueue: "2025-10-12T05:25:28Z" + getPlayQueue: "2025-10-12T05:25:28Z" + addToPlayQueue: "2025-10-12T05:25:28Z" + clearPlayQueue: "2025-10-12T05:25:28Z" + resetPlayQueue: "2025-10-12T05:25:28Z" + shuffle: "2025-10-12T05:25:28Z" + unshuffle: "2025-10-12T05:25:28Z" + deletePlayQueueItem: "2025-10-12T05:25:28Z" + movePlayQueueItem: "2025-10-12T05:25:28Z" + getColors: "2025-10-12T05:25:28Z" + getImage: "2025-10-12T05:25:28Z" + listSessions: "2025-10-12T05:25:28Z" + getBackgroundTasks: "2025-10-12T05:25:28Z" + listPlaybackHistory: "2025-10-12T05:25:28Z" + deleteHistory: "2025-10-12T05:25:28Z" + getHistoryItem: "2025-10-12T05:25:28Z" + getUpdatesStatus: "2025-10-12T05:25:28Z" + getCollectionItems: "2025-10-12T05:25:28Z" + getMetadataItem: "2025-10-12T05:25:28Z" + getAlbums: "2025-10-12T05:25:28Z" + listContent: "2025-10-12T05:25:28Z" + getAllLeaves: "2025-10-12T05:25:28Z" + getArts: "2025-10-12T05:25:28Z" + getCategories: "2025-10-12T05:25:28Z" + getCluster: "2025-10-12T05:25:28Z" + getSonicPath: "2025-10-12T05:25:28Z" + getFolders: "2025-10-12T05:25:28Z" + listMoments: "2025-10-12T05:25:28Z" + getSonicallySimilar: "2025-10-12T05:25:28Z" + getCollectionImage: "2025-10-12T05:25:28Z" + addCollectionItems: "2025-10-12T05:25:28Z" + deleteCollectionItem: "2025-10-12T05:25:28Z" + moveCollectionItem: "2025-10-12T05:25:28Z" +releaseNotes: "## Typescript SDK Changes Detected:\n* `plex-api.butler.startTask()`: \n * `request` **Changed** **Breaking** :warning:\n * `error` **Changed** **Breaking** :warning:\n* `plex-api.butler.stopTask()`: \n * `request` **Changed** **Breaking** :warning:\n * `error` **Changed** **Breaking** :warning:\n* `plex-api.updater.applyUpdates()`: \n * `request` **Changed** **Breaking** :warning:\n * `error` **Changed** **Breaking** :warning:\n* `plex-api.general.getServerInfo()`: **Added**\n* `plex-api.general.getIdentity()`: **Added**\n* `plex-api.general.getSourceConnectionInformation()`: **Added**\n* `plex-api.general.getTransientToken()`: **Added**\n* `plex-api.events.getNotifications()`: **Added**\n* `plex-api.events.connectWebSocket()`: **Added**\n* `plex-api.preferences.getAllPreferences()`: **Added**\n* `plex-api.preferences.setPreferences()`: **Added**\n* `plex-api.preferences.getPreference()`: **Added**\n* `plex-api.rate.setRating()`: **Added**\n* `plex-api.timeline.markPlayed()`: **Added**\n* `plex-api.timeline.report()`: **Added**\n* `plex-api.timeline.unscrobble()`: **Added**\n* `plex-api.activities.listActivities()`: **Added**\n* `plex-api.activities.cancelActivity()`: **Added**\n* `plex-api.butler.stopTasks()`: **Added**\n* `plex-api.butler.getTasks()`: **Added**\n* `plex-api.butler.startTasks()`: **Added**\n* `plex-api.downloadQueue.createDownloadQueue()`: **Added**\n* `plex-api.downloadQueue.getDownloadQueue()`: **Added**\n* `plex-api.downloadQueue.addDownloadQueueItems()`: **Added**\n* `plex-api.downloadQueue.listDownloadQueueItems()`: **Added**\n* `plex-api.downloadQueue.getItemDecision()`: **Added**\n* `plex-api.downloadQueue.getDownloadQueueMedia()`: **Added**\n* `plex-api.downloadQueue.removeDownloadQueueItems()`: **Added**\n* `plex-api.downloadQueue.getDownloadQueueItems()`: **Added**\n* `plex-api.downloadQueue.restartProcessingDownloadQueueItems()`: **Added**\n* `plex-api.hubs.getAllHubs()`: **Added**\n* `plex-api.hubs.getContinueWatching()`: **Added**\n* `plex-api.hubs.getHubItems()`: **Added**\n* `plex-api.hubs.getPromotedHubs()`: **Added**\n* `plex-api.hubs.getMetadataHubs()`: **Added**\n* `plex-api.hubs.getPostplayHubs()`: **Added**\n* `plex-api.hubs.getRelatedHubs()`: **Added**\n* `plex-api.hubs.getSectionHubs()`: **Added**\n* `plex-api.hubs.resetSectionDefaults()`: **Added**\n* `plex-api.hubs.listHubs()`: **Added**\n* `plex-api.hubs.createCustomHub()`: **Added**\n* `plex-api.hubs.moveHub()`: **Added**\n* `plex-api.hubs.deleteCustomHub()`: **Added**\n* `plex-api.hubs.updateHubVisibility()`: **Added**\n* `plex-api.search.searchHubs()`: **Added**\n* `plex-api.search.voiceSearchHubs()`: **Added**\n* `plex-api.library.getLibraryItems()`: **Added**\n* `plex-api.library.deleteCaches()`: **Added**\n* `plex-api.library.cleanBundles()`: **Added**\n* `plex-api.library.ingestTransientItem()`: **Added**\n* `plex-api.library.getLibraryMatches()`: **Added**\n* `plex-api.library.optimizeDatabase()`: **Added**\n* `plex-api.library.getRandomArtwork()`: **Added**\n* `plex-api.library.getSections()`: **Added**\n* `plex-api.library.addSection()`: **Added**\n* `plex-api.library.stopAllRefreshes()`: **Added**\n* `plex-api.library.getSectionsPrefs()`: **Added**\n* `plex-api.library.refreshSectionsMetadata()`: **Added**\n* `plex-api.library.getTags()`: **Added**\n* `plex-api.library.deleteMetadataItem()`: **Added**\n* `plex-api.library.editMetadataItem()`: **Added**\n* `plex-api.library.detectAds()`: **Added**\n* `plex-api.library.getAllItemLeaves()`: **Added**\n* `plex-api.library.analyzeMetadata()`: **Added**\n* `plex-api.library.generateThumbs()`: **Added**\n* `plex-api.library.detectCredits()`: **Added**\n* `plex-api.library.getExtras()`: **Added**\n* `plex-api.library.addExtras()`: **Added**\n* `plex-api.library.getFile()`: **Added**\n* `plex-api.library.startBifGeneration()`: **Added**\n* `plex-api.library.detectIntros()`: **Added**\n* `plex-api.library.createMarker()`: **Added**\n* `plex-api.library.matchItem()`: **Added**\n* `plex-api.library.listMatches()`: **Added**\n* `plex-api.library.mergeItems()`: **Added**\n* `plex-api.library.listSonicallySimilar()`: **Added**\n* `plex-api.library.setItemPreferences()`: **Added**\n* `plex-api.library.refreshItemsMetadata()`: **Added**\n* `plex-api.library.getRelatedItems()`: **Added**\n* `plex-api.library.listSimilar()`: **Added**\n* `plex-api.library.splitItem()`: **Added**\n* `plex-api.library.addSubtitles()`: **Added**\n* `plex-api.library.getItemTree()`: **Added**\n* `plex-api.library.unmatch()`: **Added**\n* `plex-api.library.listTopUsers()`: **Added**\n* `plex-api.library.detectVoiceActivity()`: **Added**\n* `plex-api.library.getAugmentationStatus()`: **Added**\n* `plex-api.library.setStreamSelection()`: **Added**\n* `plex-api.library.getPerson()`: **Added**\n* `plex-api.library.listPersonMedia()`: **Added**\n* `plex-api.library.deleteLibrarySection()`: **Added**\n* `plex-api.library.getLibraryDetails()`: **Added**\n* `plex-api.library.editSection()`: **Added**\n* `plex-api.library.updateItems()`: **Added**\n* `plex-api.library.startAnalysis()`: **Added**\n* `plex-api.library.autocomplete()`: **Added**\n* `plex-api.library.getCollections()`: **Added**\n* `plex-api.library.getCommon()`: **Added**\n* `plex-api.library.emptyTrash()`: **Added**\n* `plex-api.library.getSectionFilters()`: **Added**\n* `plex-api.library.getFirstCharacters()`: **Added**\n* `plex-api.library.deleteIndexes()`: **Added**\n* `plex-api.library.deleteIntros()`: **Added**\n* `plex-api.library.getSectionPreferences()`: **Added**\n* `plex-api.library.setSectionPreferences()`: **Added**\n* `plex-api.library.cancelRefresh()`: **Added**\n* `plex-api.library.refreshSection()`: **Added**\n* `plex-api.library.getAvailableSorts()`: **Added**\n* `plex-api.library.getStreamLevels()`: **Added**\n* `plex-api.library.getStreamLoudness()`: **Added**\n* `plex-api.library.getChapterImage()`: **Added**\n* `plex-api.library.setItemArtwork()`: **Added**\n* `plex-api.library.updateItemArtwork()`: **Added**\n* `plex-api.library.deleteMarker()`: **Added**\n* `plex-api.library.editMarker()`: **Added**\n* `plex-api.library.deleteMediaItem()`: **Added**\n* `plex-api.library.getPartIndex()`: **Added**\n* `plex-api.library.deleteCollection()`: **Added**\n* `plex-api.library.getSectionImage()`: **Added**\n* `plex-api.library.deleteStream()`: **Added**\n* `plex-api.library.getStream()`: **Added**\n* `plex-api.library.setStreamOffset()`: **Added**\n* `plex-api.library.getItemArtwork()`: **Added**\n* `plex-api.library.getMediaPart()`: **Added**\n* `plex-api.library.getImageFromBif()`: **Added**\n* `plex-api.collections.createCollection()`: **Added**\n* `plex-api.dvRs.listDvRs()`: **Added**\n* `plex-api.dvRs.createDvr()`: **Added**\n* `plex-api.dvRs.deleteDvr()`: **Added**\n* `plex-api.dvRs.getDvr()`: **Added**\n* `plex-api.dvRs.deleteLineup()`: **Added**\n* `plex-api.dvRs.addLineup()`: **Added**\n* `plex-api.dvRs.setDvrPreferences()`: **Added**\n* `plex-api.dvRs.stopDvrReload()`: **Added**\n* `plex-api.dvRs.reloadGuide()`: **Added**\n* `plex-api.dvRs.tuneChannel()`: **Added**\n* `plex-api.dvRs.removeDeviceFromDvr()`: **Added**\n* `plex-api.dvRs.addDeviceToDvr()`: **Added**\n* `plex-api.epg.computeChannelMap()`: **Added**\n* `plex-api.epg.getChannels()`: **Added**\n* `plex-api.epg.getCountries()`: **Added**\n* `plex-api.epg.getAllLanguages()`: **Added**\n* `plex-api.epg.getLineup()`: **Added**\n* `plex-api.epg.getLineupChannels()`: **Added**\n* `plex-api.epg.getCountriesLineups()`: **Added**\n* `plex-api.epg.getCountryRegions()`: **Added**\n* `plex-api.epg.listLineups()`: **Added**\n* `plex-api.liveTv.getSessions()`: **Added**\n* `plex-api.liveTv.getLiveTvSession()`: **Added**\n* `plex-api.liveTv.getSessionPlaylistIndex()`: **Added**\n* `plex-api.liveTv.getSessionSegment()`: **Added**\n* `plex-api.log.writeLog()`: **Added**\n* `plex-api.log.writeMessage()`: **Added**\n* `plex-api.log.enablePapertrail()`: **Added**\n* `plex-api.devices.getAvailableGrabbers()`: **Added**\n* `plex-api.devices.listDevices()`: **Added**\n* `plex-api.devices.addDevice()`: **Added**\n* `plex-api.devices.discoverDevices()`: **Added**\n* `plex-api.devices.removeDevice()`: **Added**\n* `plex-api.devices.getDeviceDetails()`: **Added**\n* `plex-api.devices.modifyDevice()`: **Added**\n* `plex-api.devices.setChannelmap()`: **Added**\n* `plex-api.devices.getDevicesChannels()`: **Added**\n* `plex-api.devices.setDevicePreferences()`: **Added**\n* `plex-api.devices.stopScan()`: **Added**\n* `plex-api.devices.scan()`: **Added**\n* `plex-api.devices.getThumb()`: **Added**\n* `plex-api.provider.listProviders()`: **Added**\n* `plex-api.provider.addProvider()`: **Added**\n* `plex-api.provider.refreshProviders()`: **Added**\n* `plex-api.provider.deleteMediaProvider()`: **Added**\n* `plex-api.subscriptions.getAllSubscriptions()`: **Added**\n* `plex-api.subscriptions.createSubscription()`: **Added**\n* `plex-api.subscriptions.processSubscriptions()`: **Added**\n* `plex-api.subscriptions.getScheduledRecordings()`: **Added**\n* `plex-api.subscriptions.getTemplate()`: **Added**\n* `plex-api.subscriptions.cancelGrab()`: **Added**\n* `plex-api.subscriptions.deleteSubscription()`: **Added**\n* `plex-api.subscriptions.getSubscription()`: **Added**\n* `plex-api.subscriptions.editSubscriptionPreferences()`: **Added**\n* `plex-api.subscriptions.reorderSubscription()`: **Added**\n* `plex-api.transcoder.transcodeImage()`: **Added**\n* `plex-api.transcoder.makeDecision()`: **Added**\n* `plex-api.transcoder.triggerFallback()`: **Added**\n* `plex-api.transcoder.transcodeSubtitles()`: **Added**\n* `plex-api.transcoder.startTranscodeSession()`: **Added**\n* `plex-api.playlist.listPlaylists()`: **Added**\n* `plex-api.playlist.getPlaylist()`: **Added**\n* `plex-api.playlist.getPlaylistItems()`: **Added**\n* `plex-api.libraryPlaylists.createPlaylist()`: **Added**\n* `plex-api.libraryPlaylists.uploadPlaylist()`: **Added**\n* `plex-api.libraryPlaylists.deletePlaylist()`: **Added**\n* `plex-api.libraryPlaylists.updatePlaylist()`: **Added**\n* `plex-api.libraryPlaylists.getPlaylistGenerators()`: **Added**\n* `plex-api.libraryPlaylists.clearPlaylistItems()`: **Added**\n* `plex-api.libraryPlaylists.addPlaylistItems()`: **Added**\n* `plex-api.libraryPlaylists.deletePlaylistItem()`: **Added**\n* `plex-api.libraryPlaylists.getPlaylistGenerator()`: **Added**\n* `plex-api.libraryPlaylists.modifyPlaylistGenerator()`: **Added**\n* `plex-api.libraryPlaylists.getPlaylistGeneratorItems()`: **Added**\n* `plex-api.libraryPlaylists.movePlaylistItem()`: **Added**\n* `plex-api.libraryPlaylists.refreshPlaylist()`: **Added**\n* `plex-api.playQueue.createPlayQueue()`: **Added**\n* `plex-api.playQueue.getPlayQueue()`: **Added**\n* `plex-api.playQueue.addToPlayQueue()`: **Added**\n* `plex-api.playQueue.clearPlayQueue()`: **Added**\n* `plex-api.playQueue.resetPlayQueue()`: **Added**\n* `plex-api.playQueue.shuffle()`: **Added**\n* `plex-api.playQueue.unshuffle()`: **Added**\n* `plex-api.playQueue.deletePlayQueueItem()`: **Added**\n* `plex-api.playQueue.movePlayQueueItem()`: **Added**\n* `plex-api.ultraBlur.getColors()`: **Added**\n* `plex-api.ultraBlur.getImage()`: **Added**\n* `plex-api.status.listSessions()`: **Added**\n* `plex-api.status.getBackgroundTasks()`: **Added**\n* `plex-api.status.listPlaybackHistory()`: **Added**\n* `plex-api.status.terminateSession()`: **Added**\n* `plex-api.status.deleteHistory()`: **Added**\n* `plex-api.status.getHistoryItem()`: **Added**\n* `plex-api.updater.checkUpdates()`: **Added**\n* `plex-api.updater.getUpdatesStatus()`: **Added**\n* `plex-api.content.getCollectionItems()`: **Added**\n* `plex-api.content.getMetadataItem()`: **Added**\n* `plex-api.content.getAlbums()`: **Added**\n* `plex-api.content.listContent()`: **Added**\n* `plex-api.content.getAllLeaves()`: **Added**\n* `plex-api.content.getArts()`: **Added**\n* `plex-api.content.getCategories()`: **Added**\n* `plex-api.content.getCluster()`: **Added**\n* `plex-api.content.getSonicPath()`: **Added**\n* `plex-api.content.getFolders()`: **Added**\n* `plex-api.content.listMoments()`: **Added**\n* `plex-api.content.getSonicallySimilar()`: **Added**\n* `plex-api.content.getCollectionImage()`: **Added**\n* `plex-api.libraryCollections.addCollectionItems()`: **Added**\n* `plex-api.libraryCollections.deleteCollectionItem()`: **Added**\n* `plex-api.libraryCollections.moveCollectionItem()`: **Added**\n* `plex-api.server.getServerCapabilities()`: **Deleted** **Breaking** :warning:\n* `plex-api.server.getServerPreferences()`: **Deleted** **Breaking** :warning:\n* `plex-api.server.getAvailableClients()`: **Deleted** **Breaking** :warning:\n* `plex-api.server.getDevices()`: **Deleted** **Breaking** :warning:\n* `plex-api.server.getServerIdentity()`: **Deleted** **Breaking** :warning:\n* `plex-api.server.getMyPlexAccount()`: **Deleted** **Breaking** :warning:\n* `plex-api.server.getResizedPhoto()`: **Deleted** **Breaking** :warning:\n* `plex-api.server.getMediaProviders()`: **Deleted** **Breaking** :warning:\n* `plex-api.server.getServerList()`: **Deleted** **Breaking** :warning:\n* `plex-api.media.markPlayed()`: **Deleted** **Breaking** :warning:\n* `plex-api.media.markUnplayed()`: **Deleted** **Breaking** :warning:\n* `plex-api.media.updatePlayProgress()`: **Deleted** **Breaking** :warning:\n* `plex-api.media.getBannerImage()`: **Deleted** **Breaking** :warning:\n* `plex-api.media.getThumbImage()`: **Deleted** **Breaking** :warning:\n* `plex-api.video.getTimeline()`: **Deleted** **Breaking** :warning:\n* `plex-api.video.startUniversalTranscode()`: **Deleted** **Breaking** :warning:\n* `plex-api.activities.getServerActivities()`: **Deleted** **Breaking** :warning:\n* `plex-api.activities.cancelServerActivities()`: **Deleted** **Breaking** :warning:\n* `plex-api.butler.getButlerTasks()`: **Deleted** **Breaking** :warning:\n* `plex-api.butler.startAllTasks()`: **Deleted** **Breaking** :warning:\n* `plex-api.butler.stopAllTasks()`: **Deleted** **Breaking** :warning:\n* `plex-api.plex.getCompanionsData()`: **Deleted** **Breaking** :warning:\n* `plex-api.plex.getUserFriends()`: **Deleted** **Breaking** :warning:\n* `plex-api.plex.getGeoData()`: **Deleted** **Breaking** :warning:\n* `plex-api.plex.getHomeData()`: **Deleted** **Breaking** :warning:\n* `plex-api.plex.getServerResources()`: **Deleted** **Breaking** :warning:\n* `plex-api.plex.getPin()`: **Deleted** **Breaking** :warning:\n* `plex-api.plex.getTokenByPinId()`: **Deleted** **Breaking** :warning:\n* `plex-api.hubs.getGlobalHubs()`: **Deleted** **Breaking** :warning:\n* `plex-api.hubs.getRecentlyAdded()`: **Deleted** **Breaking** :warning:\n* `plex-api.hubs.getLibraryHubs()`: **Deleted** **Breaking** :warning:\n* `plex-api.search.performSearch()`: **Deleted** **Breaking** :warning:\n* `plex-api.search.performVoiceSearch()`: **Deleted** **Breaking** :warning:\n* `plex-api.search.getSearchResults()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getFileHash()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getRecentlyAddedLibrary()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getAllLibraries()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getLibraryDetails()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.deleteLibrary()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getLibraryItems()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getLibrarySectionsAll()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getRefreshLibraryMetadata()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getSearchLibrary()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getGenresLibrary()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getCountriesLibrary()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getActorsLibrary()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getSearchAllLibraries()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getMediaMetaData()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getMediaArts()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.postMediaArts()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getMediaPosters()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.postMediaPoster()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getMetadataChildren()`: **Deleted** **Breaking** :warning:\n* `plex-api.library.getTopWatchedContent()`: **Deleted** **Breaking** :warning:\n* `plex-api.watchlist.getWatchList()`: **Deleted** **Breaking** :warning:\n* `plex-api.log.logLine()`: **Deleted** **Breaking** :warning:\n* `plex-api.log.logMultiLine()`: **Deleted** **Breaking** :warning:\n* `plex-api.log.enablePaperTrail()`: **Deleted** **Breaking** :warning:\n* `plex-api.playlists.createPlaylist()`: **Deleted** **Breaking** :warning:\n* `plex-api.playlists.getPlaylists()`: **Deleted** **Breaking** :warning:\n* `plex-api.playlists.getPlaylist()`: **Deleted** **Breaking** :warning:\n* `plex-api.playlists.deletePlaylist()`: **Deleted** **Breaking** :warning:\n* `plex-api.playlists.updatePlaylist()`: **Deleted** **Breaking** :warning:\n* `plex-api.playlists.getPlaylistContents()`: **Deleted** **Breaking** :warning:\n* `plex-api.playlists.clearPlaylistContents()`: **Deleted** **Breaking** :warning:\n* `plex-api.playlists.addPlaylistContents()`: **Deleted** **Breaking** :warning:\n* `plex-api.playlists.uploadPlaylist()`: **Deleted** **Breaking** :warning:\n* `plex-api.authentication.getTransientToken()`: **Deleted** **Breaking** :warning:\n* `plex-api.authentication.getSourceConnectionInformation()`: **Deleted** **Breaking** :warning:\n* `plex-api.authentication.getTokenDetails()`: **Deleted** **Breaking** :warning:\n* `plex-api.authentication.postUsersSignInData()`: **Deleted** **Breaking** :warning:\n* `plex-api.statistics.getStatistics()`: **Deleted** **Breaking** :warning:\n* `plex-api.statistics.getResourcesStatistics()`: **Deleted** **Breaking** :warning:\n* `plex-api.statistics.getBandwidthStatistics()`: **Deleted** **Breaking** :warning:\n* `plex-api.sessions.getSessions()`: **Deleted** **Breaking** :warning:\n* `plex-api.sessions.getSessionHistory()`: **Deleted** **Breaking** :warning:\n* `plex-api.sessions.getTranscodeSessions()`: **Deleted** **Breaking** :warning:\n* `plex-api.sessions.stopTranscodeSession()`: **Deleted** **Breaking** :warning:\n* `plex-api.updater.getUpdateStatus()`: **Deleted** **Breaking** :warning:\n* `plex-api.updater.checkForUpdates()`: **Deleted** **Breaking** :warning:\n* `plex-api.users.getUsers()`: **Deleted** **Breaking** :warning:\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 8f874874..20f54198 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -22,7 +22,8 @@ generation: generateNewTests: true skipResponseBodyAssertions: false typescript: - version: 0.40.3 + version: 0.41.0 + acceptHeaderEnum: true additionalDependencies: dependencies: {} devDependencies: {} @@ -52,6 +53,7 @@ typescript: jsonpath: legacy maxMethodParams: 4 methodArguments: require-security-and-request + modelPropertyCasing: camel moduleFormat: commonjs outputModelSuffix: output packageName: '@lukehagar/plexjs' diff --git a/.speakeasy/tests.arazzo.yaml b/.speakeasy/tests.arazzo.yaml new file mode 100644 index 00000000..f51812b1 --- /dev/null +++ b/.speakeasy/tests.arazzo.yaml @@ -0,0 +1,17212 @@ +arazzo: 1.0.1 +info: + title: Test Suite + summary: Created from /github/workspace/repo/.speakeasy/temp/registry_8ba0f1.yaml + version: 0.0.1 +sourceDescriptions: + - name: /github/workspace/repo/.speakeasy/temp/registry_8ba0f1.yaml + url: https://TBD.com + type: openapi +workflows: + - workflowId: getServerInfo + steps: + - stepId: test + operationId: getServerInfo + parameters: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: General + x-speakeasy-test-rebuild: true + - workflowId: getIdentity + steps: + - stepId: test + operationId: getIdentity + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: General + x-speakeasy-test-rebuild: true + - workflowId: getSourceConnectionInformation + steps: + - stepId: test + operationId: getSourceConnectionInformation + parameters: + - name: source + in: query + value: server://client-identifier + - name: refresh + in: query + value: 1 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: General + x-speakeasy-test-rebuild: true + - workflowId: getTransientToken + steps: + - stepId: test + operationId: getTransientToken + parameters: + - name: type + in: query + value: delegation + - name: scope + in: query + value: all + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: General + x-speakeasy-test-rebuild: true + - workflowId: getNotifications + steps: + - stepId: test + operationId: getNotifications + parameters: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/octet-stream + - context: $response.body + condition: | + "x-file: example.file" + type: simple + x-speakeasy-test-group: Events + x-speakeasy-test-rebuild: true + - workflowId: connectWebSocket + steps: + - stepId: test + operationId: connectWebSocket + parameters: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/octet-stream + - context: $response.body + condition: | + "x-file: example.file" + type: simple + x-speakeasy-test-group: Events + x-speakeasy-test-rebuild: true + - workflowId: getAllPreferences + steps: + - stepId: test + operationId: getAllPreferences + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Preferences + x-speakeasy-test-rebuild: true + - workflowId: getPreference + steps: + - stepId: test + operationId: getPreference + parameters: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Preferences + x-speakeasy-test-rebuild: true + - workflowId: report + steps: + - stepId: test + operationId: report + parameters: + - name: key + in: query + value: /foo + - name: ratingKey + in: query + value: xyz + - name: state + in: query + value: playing + - name: playQueueItemID + in: query + value: "123" + - name: time + in: query + value: 0 + - name: duration + in: query + value: 10000 + - name: continuing + in: query + value: 1 + - name: updated + in: query + value: 14200000 + - name: offline + in: query + value: 1 + - name: timeToFirstFrame + in: query + value: 1000 + - name: timeStalled + in: query + value: 1000 + - name: bandwidth + in: query + value: 100 + - name: bufferedTime + in: query + value: 100 + - name: bufferedSize + in: query + value: 1024 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "livetv": 7, + "machineIdentifier": "0123456789abcdef0123456789abcdef012345678", + "musicAnalysis": 2, + "myPlexMappingState": "mapped", + "myPlexSigninState": "ok", + "offlineTranscode": 1 + } + } + type: simple + x-speakeasy-test-group: Timeline + x-speakeasy-test-rebuild: true + - workflowId: listActivities + steps: + - stepId: test + operationId: listActivities + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Activities + x-speakeasy-test-rebuild: true + - workflowId: getTasks + steps: + - stepId: test + operationId: getTasks + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Butler + x-speakeasy-test-rebuild: true + - workflowId: stopTask + steps: + - stepId: test + operationId: stopTask + parameters: + - name: task + in: path + value: CleanOldBundles + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + x-speakeasy-test-group: Butler + x-speakeasy-test-rebuild: true + - workflowId: startTask + steps: + - stepId: test + operationId: startTask + parameters: + - name: task + in: path + value: RefreshLocalMedia + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + x-speakeasy-test-group: Butler + x-speakeasy-test-rebuild: true + - workflowId: createDownloadQueue + steps: + - stepId: test + operationId: createDownloadQueue + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Download Queue + x-speakeasy-test-rebuild: true + - workflowId: getDownloadQueue + steps: + - stepId: test + operationId: getDownloadQueue + parameters: + - name: queueId + in: path + value: 922802 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Download Queue + x-speakeasy-test-rebuild: true + - workflowId: addDownloadQueueItems + steps: + - stepId: test + operationId: addDownloadQueueItems + parameters: + - name: queueId + in: path + value: 984925 + - name: keys + in: query + value: + - /library/metadata/3 + - /library/metadata/6 + - name: advancedSubtitles + in: query + value: burn + - name: audioBoost + in: query + value: 50 + - name: audioChannelCount + in: query + value: 5 + - name: autoAdjustQuality + in: query + value: 1 + - name: autoAdjustSubtitle + in: query + value: 1 + - name: directPlay + in: query + value: 1 + - name: directStream + in: query + value: 1 + - name: directStreamAudio + in: query + value: 1 + - name: disableResolutionRotation + in: query + value: 1 + - name: hasMDE + in: query + value: 1 + - name: location + in: query + value: wan + - name: mediaBufferSize + in: query + value: 102400 + - name: mediaIndex + in: query + value: 0 + - name: musicBitrate + in: query + value: 5000 + - name: offset + in: query + value: 90.5 + - name: partIndex + in: query + value: 0 + - name: path + in: query + value: /library/metadata/151671 + - name: peakBitrate + in: query + value: 12000 + - name: photoResolution + in: query + value: 1080x1080 + - name: protocol + in: query + value: dash + - name: secondsPerSegment + in: query + value: 5 + - name: subtitleSize + in: query + value: 50 + - name: subtitles + in: query + value: segmented + - name: videoBitrate + in: query + value: 12000 + - name: videoQuality + in: query + value: 50 + - name: videoResolution + in: query + value: 1080x1080 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Download Queue + x-speakeasy-test-rebuild: true + - workflowId: listDownloadQueueItems + steps: + - stepId: test + operationId: listDownloadQueueItems + parameters: + - name: queueId + in: path + value: 524138 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Download Queue + x-speakeasy-test-rebuild: true + - workflowId: getItemDecision + steps: + - stepId: test + operationId: getItemDecision + parameters: + - name: queueId + in: path + value: 231605 + - name: itemId + in: path + value: 32 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Download Queue + x-speakeasy-test-rebuild: true + - workflowId: getDownloadQueueItems + steps: + - stepId: test + operationId: getDownloadQueueItems + parameters: + - name: queueId + in: path + value: 809886 + - name: itemId + in: path + value: + - 32 + - 345 + - 23 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Download Queue + x-speakeasy-test-rebuild: true + - workflowId: getAllHubs + steps: + - stepId: test + operationId: getAllHubs + parameters: + - name: onlyTransient + in: query + value: 1 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Hub": [ + { + "type": "track", + "context": "hub.home.onDeck", + "hubIdentifier": "home.onDeck", + "key": "/hubs/sections/home/onDeck", + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ], + "size": 1, + "subtype": "podcast", + "totalSize": 8 + } + ] + } + } + type: simple + x-speakeasy-test-group: Hubs + x-speakeasy-test-rebuild: true + - workflowId: getContinueWatching + steps: + - stepId: test + operationId: getContinueWatching + parameters: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Hub": [ + { + "type": "track", + "context": "hub.home.onDeck", + "hubIdentifier": "home.onDeck", + "key": "/hubs/sections/home/onDeck", + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ], + "size": 1, + "subtype": "podcast", + "totalSize": 8 + } + ] + } + } + type: simple + x-speakeasy-test-group: Hubs + x-speakeasy-test-rebuild: true + - workflowId: getHubItems + steps: + - stepId: test + operationId: getHubItems + parameters: + - name: identifier + in: query + value: + - + - + - + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Hubs + x-speakeasy-test-rebuild: true + - workflowId: getPromotedHubs + steps: + - stepId: test + operationId: getPromotedHubs + parameters: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Hub": [ + { + "type": "track", + "context": "hub.home.onDeck", + "hubIdentifier": "home.onDeck", + "key": "/hubs/sections/home/onDeck", + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ], + "size": 1, + "subtype": "podcast", + "totalSize": 8 + } + ] + } + } + type: simple + x-speakeasy-test-group: Hubs + x-speakeasy-test-rebuild: true + - workflowId: getMetadataHubs + steps: + - stepId: test + operationId: getMetadataHubs + parameters: + - name: metadataId + in: path + value: 605482 + - name: onlyTransient + in: query + value: 1 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Hub": [ + { + "type": "track", + "context": "hub.home.onDeck", + "hubIdentifier": "home.onDeck", + "key": "/hubs/sections/home/onDeck", + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ], + "size": 1, + "subtype": "podcast", + "totalSize": 8 + } + ] + } + } + type: simple + x-speakeasy-test-group: Hubs + x-speakeasy-test-rebuild: true + - workflowId: getPostplayHubs + steps: + - stepId: test + operationId: getPostplayHubs + parameters: + - name: metadataId + in: path + value: 441419 + - name: onlyTransient + in: query + value: 1 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Hub": [ + { + "type": "track", + "context": "hub.home.onDeck", + "hubIdentifier": "home.onDeck", + "key": "/hubs/sections/home/onDeck", + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ], + "size": 1, + "subtype": "podcast", + "totalSize": 8 + } + ] + } + } + type: simple + x-speakeasy-test-group: Hubs + x-speakeasy-test-rebuild: true + - workflowId: getRelatedHubs + steps: + - stepId: test + operationId: getRelatedHubs + parameters: + - name: metadataId + in: path + value: 8858 + - name: onlyTransient + in: query + value: 1 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Hub": [ + { + "type": "track", + "context": "hub.home.onDeck", + "hubIdentifier": "home.onDeck", + "key": "/hubs/sections/home/onDeck", + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ], + "size": 1, + "subtype": "podcast", + "totalSize": 8 + } + ] + } + } + type: simple + x-speakeasy-test-group: Hubs + x-speakeasy-test-rebuild: true + - workflowId: getSectionHubs + steps: + - stepId: test + operationId: getSectionHubs + parameters: + - name: sectionId + in: path + value: 336924 + - name: onlyTransient + in: query + value: 1 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Hub": [ + { + "type": "track", + "context": "hub.home.onDeck", + "hubIdentifier": "home.onDeck", + "key": "/hubs/sections/home/onDeck", + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ], + "size": 1, + "subtype": "podcast", + "totalSize": 8 + } + ] + } + } + type: simple + x-speakeasy-test-group: Hubs + x-speakeasy-test-rebuild: true + - workflowId: listHubs + steps: + - stepId: test + operationId: listHubs + parameters: + - name: sectionId + in: path + value: 442546 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Hubs + x-speakeasy-test-rebuild: true + - workflowId: moveHub + steps: + - stepId: test + operationId: moveHub + parameters: + - name: sectionId + in: path + value: 755710 + - name: identifier + in: query + value: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Hubs + x-speakeasy-test-rebuild: true + - workflowId: searchHubs + steps: + - stepId: test + operationId: searchHubs + parameters: + - name: query + in: query + value: + - name: sectionId + in: query + value: 1 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Hub": [ + { + "type": "track", + "context": "hub.home.onDeck", + "hubIdentifier": "home.onDeck", + "key": "/hubs/sections/home/onDeck", + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ], + "size": 1, + "subtype": "podcast", + "totalSize": 8 + } + ] + } + } + type: simple + x-speakeasy-test-group: Search + x-speakeasy-test-rebuild: true + - workflowId: voiceSearchHubs + steps: + - stepId: test + operationId: voiceSearchHubs + parameters: + - name: query + in: query + value: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Hub": [ + { + "type": "track", + "context": "hub.home.onDeck", + "hubIdentifier": "home.onDeck", + "key": "/hubs/sections/home/onDeck", + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ], + "size": 1, + "subtype": "podcast", + "totalSize": 8 + } + ] + } + } + type: simple + x-speakeasy-test-group: Search + x-speakeasy-test-rebuild: true + - workflowId: getLibraryItems + steps: + - stepId: test + operationId: getLibraryItems + parameters: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: ingestTransientItem + steps: + - stepId: test + operationId: ingestTransientItem + parameters: + - name: url + in: query + value: file:///storage%2Femulated%2F0%2FArcher-S01E01.mkv + - name: virtualFilePath + in: query + value: /Avatar.mkv + - name: computeHashes + in: query + value: 1 + - name: ingestNonMatches + in: query + value: 1 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getLibraryMatches + steps: + - stepId: test + operationId: getLibraryMatches + parameters: + - name: includeFullMetadata + in: query + value: 1 + - name: includeAncestorMetadata + in: query + value: 1 + - name: includeAlternateMetadataSources + in: query + value: 1 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getRandomArtwork + steps: + - stepId: test + operationId: getRandomArtwork + parameters: + - name: sections + in: query + value: + - 5 + - 6 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getSections + steps: + - stepId: test + operationId: getSections + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: addSection + steps: + - stepId: test + operationId: addSection + parameters: + - name: name + in: query + value: + - name: type + in: query + value: 39544 + - name: agent + in: query + value: + - name: language + in: query + value: + - name: locations + in: query + value: + - O:\fatboy\Media\Ripped\Music + - O:\fatboy\Media\My Music + - name: prefs + in: query + value: {} + - name: relative + in: query + value: 1 + - name: importFromiTunes + in: query + value: 1 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Directory": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: stopAllRefreshes + steps: + - stepId: test + operationId: stopAllRefreshes + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "livetv": 7, + "machineIdentifier": "0123456789abcdef0123456789abcdef012345678", + "musicAnalysis": 2, + "myPlexMappingState": "mapped", + "myPlexSigninState": "ok", + "offlineTranscode": 1 + } + } + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getSectionsPrefs + steps: + - stepId: test + operationId: getSectionsPrefs + parameters: + - name: type + in: query + value: 460221 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "livetv": 7, + "machineIdentifier": "0123456789abcdef0123456789abcdef012345678", + "musicAnalysis": 2, + "myPlexMappingState": "mapped", + "myPlexSigninState": "ok", + "offlineTranscode": 1 + } + } + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getTags + steps: + - stepId: test + operationId: getTags + parameters: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getAllItemLeaves + steps: + - stepId: test + operationId: getAllItemLeaves + parameters: + - name: ids + in: path + value: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getExtras + steps: + - stepId: test + operationId: getExtras + parameters: + - name: ids + in: path + value: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getFile + steps: + - stepId: test + operationId: getFile + parameters: + - name: ids + in: path + value: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == audio/mpeg3 + - context: $response.body + condition: | + "x-file: example.file" + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: createMarker + steps: + - stepId: test + operationId: createMarker + parameters: + - name: ids + in: path + value: + - name: type + in: query + value: 248391 + - name: startTimeOffset + in: query + value: 535191 + - name: attributes + in: query + value: {} + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: listMatches + steps: + - stepId: test + operationId: listMatches + parameters: + - name: ids + in: path + value: + - name: manual + in: query + value: 1 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: listSonicallySimilar + steps: + - stepId: test + operationId: listSonicallySimilar + parameters: + - name: ids + in: path + value: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getRelatedItems + steps: + - stepId: test + operationId: getRelatedItems + parameters: + - name: ids + in: path + value: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Hub": [ + { + "type": "track", + "context": "hub.home.onDeck", + "hubIdentifier": "home.onDeck", + "key": "/hubs/sections/home/onDeck", + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ], + "size": 1, + "subtype": "podcast", + "totalSize": 8 + } + ] + } + } + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: listSimilar + steps: + - stepId: test + operationId: listSimilar + parameters: + - name: ids + in: path + value: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getItemTree + steps: + - stepId: test + operationId: getItemTree + parameters: + - name: ids + in: path + value: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "MetadataItem": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "MetadataItem": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: listTopUsers + steps: + - stepId: test + operationId: listTopUsers + parameters: + - name: ids + in: path + value: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getPerson + steps: + - stepId: test + operationId: getPerson + parameters: + - name: personId + in: path + value: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Directory": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + } + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: listPersonMedia + steps: + - stepId: test + operationId: listPersonMedia + parameters: + - name: personId + in: path + value: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getLibraryDetails + steps: + - stepId: test + operationId: getLibraryDetails + parameters: + - name: sectionId + in: path + value: + - name: includeDetails + in: query + value: 1 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Directory": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: autocomplete + steps: + - stepId: test + operationId: autocomplete + parameters: + - name: sectionId + in: path + value: 942007 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getCollections + steps: + - stepId: test + operationId: getCollections + parameters: + - name: sectionId + in: path + value: 348838 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getCommon + steps: + - stepId: test + operationId: getCommon + parameters: + - name: sectionId + in: path + value: 298154 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getSectionFilters + steps: + - stepId: test + operationId: getSectionFilters + parameters: + - name: sectionId + in: path + value: 380557 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getFirstCharacters + steps: + - stepId: test + operationId: getFirstCharacters + parameters: + - name: sectionId + in: path + value: 3947 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getSectionPreferences + steps: + - stepId: test + operationId: getSectionPreferences + parameters: + - name: sectionId + in: path + value: 754869 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getAvailableSorts + steps: + - stepId: test + operationId: getAvailableSorts + parameters: + - name: sectionId + in: path + value: 212498 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getStreamLevels + steps: + - stepId: test + operationId: getStreamLevels + parameters: + - name: streamId + in: path + value: 447611 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getStreamLoudness + steps: + - stepId: test + operationId: getStreamLoudness + parameters: + - name: streamId + in: path + value: 277271 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == text/plain + - context: $response.body + condition: | + "\u003cvalue\u003e" + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getChapterImage + steps: + - stepId: test + operationId: getChapterImage + parameters: + - name: mediaId + in: path + value: 892563 + - name: chapter + in: path + value: 48348 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == image/jpeg + - context: $response.body + condition: | + "x-file: example.file" + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: editMarker + steps: + - stepId: test + operationId: editMarker + parameters: + - name: ids + in: path + value: + - name: marker + in: path + value: + - name: type + in: query + value: 884347 + - name: startTimeOffset + in: query + value: 517251 + - name: attributes + in: query + value: {} + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getPartIndex + steps: + - stepId: test + operationId: getPartIndex + parameters: + - name: partId + in: path + value: 724750 + - name: index + in: path + value: sd + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/octet-stream + - context: $response.body + condition: | + "x-file: example.file" + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getItemArtwork + steps: + - stepId: test + operationId: getItemArtwork + parameters: + - name: ids + in: path + value: + - name: element + in: path + value: poster + - name: timestamp + in: path + value: 999555 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == audio/mpeg3 + - context: $response.body + condition: | + "x-file: example.file" + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: getImageFromBif + steps: + - stepId: test + operationId: getImageFromBif + parameters: + - name: partId + in: path + value: 304273 + - name: index + in: path + value: sd + - name: offset + in: path + value: 939569 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == image/jpeg + - context: $response.body + condition: | + "x-file: example.file" + type: simple + x-speakeasy-test-group: Library + x-speakeasy-test-rebuild: true + - workflowId: createCollection + steps: + - stepId: test + operationId: createCollection + parameters: + - name: sectionId + in: query + value: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Collections + x-speakeasy-test-rebuild: true + - workflowId: listDVRs + steps: + - stepId: test + operationId: listDVRs + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: DVRs + x-speakeasy-test-rebuild: true + - workflowId: createDVR + steps: + - stepId: test + operationId: createDVR + parameters: + - name: lineup + in: query + value: lineup://tv.plex.providers.epg.onconnect/USA-HI51418-DEFAULT + - name: device + in: query + value: + - device[]=device://tv.plex.grabbers.hdhomerun/1053C0CA + - name: language + in: query + value: eng + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: DVRs + x-speakeasy-test-rebuild: true + - workflowId: getDVR + steps: + - stepId: test + operationId: getDVR + parameters: + - name: dvrId + in: path + value: 973518 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: DVRs + x-speakeasy-test-rebuild: true + - workflowId: deleteLineup + steps: + - stepId: test + operationId: deleteLineup + parameters: + - name: dvrId + in: path + value: 454470 + - name: lineup + in: query + value: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: DVRs + x-speakeasy-test-rebuild: true + - workflowId: addLineup + steps: + - stepId: test + operationId: addLineup + parameters: + - name: dvrId + in: path + value: 945235 + - name: lineup + in: query + value: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: DVRs + x-speakeasy-test-rebuild: true + - workflowId: setDVRPreferences + steps: + - stepId: test + operationId: setDVRPreferences + parameters: + - name: dvrId + in: path + value: 116357 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: DVRs + x-speakeasy-test-rebuild: true + - workflowId: tuneChannel + steps: + - stepId: test + operationId: tuneChannel + parameters: + - name: dvrId + in: path + value: 834281 + - name: channel + in: path + value: "2.1" + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: DVRs + x-speakeasy-test-rebuild: true + - workflowId: removeDeviceFromDVR + steps: + - stepId: test + operationId: removeDeviceFromDVR + parameters: + - name: dvrId + in: path + value: 945416 + - name: deviceId + in: path + value: 260761 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: DVRs + x-speakeasy-test-rebuild: true + - workflowId: addDeviceToDVR + steps: + - stepId: test + operationId: addDeviceToDVR + parameters: + - name: dvrId + in: path + value: 334755 + - name: deviceId + in: path + value: 852930 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: DVRs + x-speakeasy-test-rebuild: true + - workflowId: computeChannelMap + steps: + - stepId: test + operationId: computeChannelMap + parameters: + - name: device + in: query + value: Mobile + - name: lineup + in: query + value: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: EPG + x-speakeasy-test-rebuild: true + - workflowId: getChannels + steps: + - stepId: test + operationId: getChannels + parameters: + - name: lineup + in: query + value: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: EPG + x-speakeasy-test-rebuild: true + - workflowId: getCountries + steps: + - stepId: test + operationId: getCountries + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: EPG + x-speakeasy-test-rebuild: true + - workflowId: getAllLanguages + steps: + - stepId: test + operationId: getAllLanguages + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: EPG + x-speakeasy-test-rebuild: true + - workflowId: getLineupChannels + steps: + - stepId: test + operationId: getLineupChannels + parameters: + - name: lineup + in: query + value: + - + - + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: EPG + x-speakeasy-test-rebuild: true + - workflowId: getCountriesLineups + steps: + - stepId: test + operationId: getCountriesLineups + parameters: + - name: country + in: path + value: Malawi + - name: epgId + in: path + value: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: EPG + x-speakeasy-test-rebuild: true + - workflowId: getCountryRegions + steps: + - stepId: test + operationId: getCountryRegions + parameters: + - name: country + in: path + value: Morocco + - name: epgId + in: path + value: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: EPG + x-speakeasy-test-rebuild: true + - workflowId: listLineups + steps: + - stepId: test + operationId: listLineups + parameters: + - name: country + in: path + value: Vanuatu + - name: epgId + in: path + value: + - name: region + in: path + value: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: EPG + x-speakeasy-test-rebuild: true + - workflowId: getSessions + steps: + - stepId: test + operationId: getSessions + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "title": "The American Dream Is Killing Me", + "type": "track", + "addedAt": 1705543312, + "art": "/library/metadata/39904/art/1705310687", + "duration": 186240, + "grandparentArt": "/library/metadata/39904/art/1705310687", + "grandparentKey": "/library/metadata/39904", + "grandparentRatingKey": "39904", + "grandparentThumb": "/library/metadata/39904/thumb/1705310687", + "grandparentTitle": "Green Day", + "index": 1, + "key": "/library/metadata/67085", + "Media": [ + { + "audioChannels": 2, + "audioCodec": "flac", + "bitrate": 1014, + "container": "flac", + "duration": 186240, + "id": 130355, + "Part": [ + { + "container": "flac", + "duration": 186240, + "file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", + "id": 130625, + "key": "/library/parts/130625/1705543268/file.flac", + "size": 23644000, + "Stream": [ + { + "audioChannelLayout": "stereo", + "bitDepth": 16, + "bitrate": 1014, + "codec": "flac", + "displayTitle": "FLAC (Stereo)", + "id": 352487, + "index": 0, + "samplingRate": 44100, + "selected": true, + "streamType": 2, + "albumGain": "-12.94", + "albumPeak": "1.000000", + "albumRange": "4.751014", + "channels": 2, + "extendedDisplayTitle": "FLAC (Stereo)", + "gain": "-12.94", + "loudness": "-5.94", + "lra": "1.74", + "peak": "1.000000", + "location": "direct" + } + ], + "hasThumbnail": "1", + "decision": "directplay", + "selected": true + } + ], + "selected": true + } + ], + "originalTitle": "The American Dream Is Killing Me", + "parentIndex": 1, + "parentKey": "/library/metadata/67084", + "parentRatingKey": "67084", + "parentThumb": "/library/metadata/67084/thumb/1705543314", + "parentTitle": "Saviors", + "ratingCount": 45885, + "ratingKey": "67085", + "thumb": "/library/metadata/67084/thumb/1705543314", + "titleSort": "American Dream Is Killing Me", + "updatedAt": 1705543314, + "viewOffset": 1000, + "grandparentGuid": "plex://artist/5d07bbfd403c6402904a6480", + "guid": "plex://track/6535834f71f22f36f71a8e8f", + "librarySectionID": "3", + "librarySectionKey": "/library/sections/3", + "librarySectionTitle": "Music", + "musicAnalysisVersion": "1", + "parentGuid": "plex://album/65394d6d472b8ab03ef47f12", + "parentStudio": "Reprise Records", + "parentYear": 2024, + "sessionKey": "203", + "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" + } + } + ] + } + } + type: simple + x-speakeasy-test-group: Live TV + x-speakeasy-test-rebuild: true + - workflowId: getLiveTVSession + steps: + - stepId: test + operationId: getLiveTVSession + parameters: + - name: sessionId + in: path + value: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Live TV + x-speakeasy-test-rebuild: true + - workflowId: getAvailableGrabbers + steps: + - stepId: test + operationId: getAvailableGrabbers + parameters: + - name: protocol + in: query + value: livetv + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Devices + x-speakeasy-test-rebuild: true + - workflowId: listDevices + steps: + - stepId: test + operationId: listDevices + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Devices + x-speakeasy-test-rebuild: true + - workflowId: addDevice + steps: + - stepId: test + operationId: addDevice + parameters: + - name: uri + in: query + value: http://10.0.0.5 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Devices + x-speakeasy-test-rebuild: true + - workflowId: discoverDevices + steps: + - stepId: test + operationId: discoverDevices + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Devices + x-speakeasy-test-rebuild: true + - workflowId: removeDevice + steps: + - stepId: test + operationId: removeDevice + parameters: + - name: deviceId + in: path + value: 685908 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Devices + x-speakeasy-test-rebuild: true + - workflowId: getDeviceDetails + steps: + - stepId: test + operationId: getDeviceDetails + parameters: + - name: deviceId + in: path + value: 170949 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Devices + x-speakeasy-test-rebuild: true + - workflowId: modifyDevice + steps: + - stepId: test + operationId: modifyDevice + parameters: + - name: deviceId + in: path + value: 879135 + - name: enabled + in: query + value: 1 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Devices + x-speakeasy-test-rebuild: true + - workflowId: setChannelmap + steps: + - stepId: test + operationId: setChannelmap + parameters: + - name: deviceId + in: path + value: 937661 + - name: channelMapping + in: query + value: {} + - name: channelMappingByKey + in: query + value: {} + - name: channelsEnabled + in: query + value: + - 46.1,44.1,45.1 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Devices + x-speakeasy-test-rebuild: true + - workflowId: getDevicesChannels + steps: + - stepId: test + operationId: getDevicesChannels + parameters: + - name: deviceId + in: path + value: 517209 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Devices + x-speakeasy-test-rebuild: true + - workflowId: stopScan + steps: + - stepId: test + operationId: stopScan + parameters: + - name: deviceId + in: path + value: 576494 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Devices + x-speakeasy-test-rebuild: true + - workflowId: scan + steps: + - stepId: test + operationId: scan + parameters: + - name: deviceId + in: path + value: 57391 + - name: source + in: query + value: Cable + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Devices + x-speakeasy-test-rebuild: true + - workflowId: listProviders + steps: + - stepId: test + operationId: listProviders + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "livetv": 7, + "machineIdentifier": "0123456789abcdef0123456789abcdef012345678", + "musicAnalysis": 2, + "myPlexMappingState": "mapped", + "myPlexSigninState": "ok", + "offlineTranscode": 1 + } + } + type: simple + x-speakeasy-test-group: Provider + x-speakeasy-test-rebuild: true + - workflowId: getAllSubscriptions + steps: + - stepId: test + operationId: getAllSubscriptions + parameters: + - name: includeGrabs + in: query + value: 1 + - name: includeStorage + in: query + value: 1 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "MediaSubscription": [ + { + "MediaGrabOperation": [ + { + "Metadata": { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Subscriptions + x-speakeasy-test-rebuild: true + - workflowId: createSubscription + steps: + - stepId: test + operationId: createSubscription + parameters: + - name: targetLibrarySectionID + in: query + value: 1 + - name: targetSectionLocationID + in: query + value: 3 + - name: type + in: query + value: 2 + - name: hints + in: query + value: {} + - name: prefs + in: query + value: {} + - name: params + in: query + value: {} + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "MediaSubscription": [ + { + "MediaGrabOperation": [ + { + "Metadata": { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Subscriptions + x-speakeasy-test-rebuild: true + - workflowId: getScheduledRecordings + steps: + - stepId: test + operationId: getScheduledRecordings + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "MediaGrabOperation": [ + { + "Metadata": { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + } + ] + } + } + type: simple + x-speakeasy-test-group: Subscriptions + x-speakeasy-test-rebuild: true + - workflowId: getTemplate + steps: + - stepId: test + operationId: getTemplate + parameters: + - name: guid + in: query + value: plex://episode/5fc70265c40548002d539d23 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "SubscriptionTemplate": [ + { + "MediaSubscription": [ + { + "title": "This Episode", + "MediaGrabOperation": [ + { + "Metadata": { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + } + ] + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Subscriptions + x-speakeasy-test-rebuild: true + - workflowId: getSubscription + steps: + - stepId: test + operationId: getSubscription + parameters: + - name: subscriptionId + in: path + value: 186713 + - name: includeGrabs + in: query + value: 1 + - name: includeStorage + in: query + value: 1 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "MediaSubscription": [ + { + "MediaGrabOperation": [ + { + "Metadata": { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Subscriptions + x-speakeasy-test-rebuild: true + - workflowId: editSubscriptionPreferences + steps: + - stepId: test + operationId: editSubscriptionPreferences + parameters: + - name: subscriptionId + in: path + value: 673918 + - name: prefs + in: query + value: {} + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "MediaSubscription": [ + { + "MediaGrabOperation": [ + { + "Metadata": { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Subscriptions + x-speakeasy-test-rebuild: true + - workflowId: reorderSubscription + steps: + - stepId: test + operationId: reorderSubscription + parameters: + - name: subscriptionId + in: path + value: 440634 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "MediaSubscription": [ + { + "MediaGrabOperation": [ + { + "Metadata": { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Subscriptions + x-speakeasy-test-rebuild: true + - workflowId: transcodeImage + steps: + - stepId: test + operationId: transcodeImage + parameters: + - name: url + in: query + value: /library/metadata/265/thumb/1715112705 + - name: background + in: query + value: '#ff5522' + - name: upscale + in: query + value: 1 + - name: minSize + in: query + value: 1 + - name: rotate + in: query + value: 1 + - name: blendColor + in: query + value: '#ff5522' + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == image/jpeg + - context: $response.body + condition: | + "x-file: example.file" + type: simple + x-speakeasy-test-group: Transcoder + x-speakeasy-test-rebuild: true + - workflowId: makeDecision + steps: + - stepId: test + operationId: makeDecision + parameters: + - name: transcodeType + in: path + value: music + - name: advancedSubtitles + in: query + value: burn + - name: audioBoost + in: query + value: 50 + - name: audioChannelCount + in: query + value: 5 + - name: autoAdjustQuality + in: query + value: 1 + - name: autoAdjustSubtitle + in: query + value: 1 + - name: directPlay + in: query + value: 1 + - name: directStream + in: query + value: 1 + - name: directStreamAudio + in: query + value: 1 + - name: disableResolutionRotation + in: query + value: 1 + - name: hasMDE + in: query + value: 1 + - name: location + in: query + value: wan + - name: mediaBufferSize + in: query + value: 102400 + - name: mediaIndex + in: query + value: 0 + - name: musicBitrate + in: query + value: 5000 + - name: offset + in: query + value: 90.5 + - name: partIndex + in: query + value: 0 + - name: path + in: query + value: /library/metadata/151671 + - name: peakBitrate + in: query + value: 12000 + - name: photoResolution + in: query + value: 1080x1080 + - name: protocol + in: query + value: dash + - name: secondsPerSegment + in: query + value: 5 + - name: subtitleSize + in: query + value: 50 + - name: subtitles + in: query + value: none + - name: videoBitrate + in: query + value: 12000 + - name: videoQuality + in: query + value: 50 + - name: videoResolution + in: query + value: 1080x1080 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + - name: X-Plex-Client-Profile-Extra + in: header + value: add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash) + - name: X-Plex-Client-Profile-Name + in: header + value: generic + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Transcoder + x-speakeasy-test-rebuild: true + - workflowId: startTranscodeSession + steps: + - stepId: test + operationId: startTranscodeSession + parameters: + - name: transcodeType + in: path + value: music + - name: extension + in: path + value: mpd + - name: advancedSubtitles + in: query + value: burn + - name: audioBoost + in: query + value: 50 + - name: audioChannelCount + in: query + value: 5 + - name: autoAdjustQuality + in: query + value: 1 + - name: autoAdjustSubtitle + in: query + value: 1 + - name: directPlay + in: query + value: 1 + - name: directStream + in: query + value: 1 + - name: directStreamAudio + in: query + value: 1 + - name: disableResolutionRotation + in: query + value: 1 + - name: hasMDE + in: query + value: 1 + - name: location + in: query + value: wan + - name: mediaBufferSize + in: query + value: 102400 + - name: mediaIndex + in: query + value: 0 + - name: musicBitrate + in: query + value: 5000 + - name: offset + in: query + value: 90.5 + - name: partIndex + in: query + value: 0 + - name: path + in: query + value: /library/metadata/151671 + - name: peakBitrate + in: query + value: 12000 + - name: photoResolution + in: query + value: 1080x1080 + - name: protocol + in: query + value: dash + - name: secondsPerSegment + in: query + value: 5 + - name: subtitleSize + in: query + value: 50 + - name: subtitles + in: query + value: none + - name: videoBitrate + in: query + value: 12000 + - name: videoQuality + in: query + value: 50 + - name: videoResolution + in: query + value: 1080x1080 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + - name: X-Plex-Client-Profile-Extra + in: header + value: add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash) + - name: X-Plex-Client-Profile-Name + in: header + value: generic + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == video/x-matroska + - context: $response.body + condition: | + "x-file: example.file" + type: simple + x-speakeasy-test-group: Transcoder + x-speakeasy-test-rebuild: true + - workflowId: listPlaylists + steps: + - stepId: test + operationId: listPlaylists + parameters: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Playlist + x-speakeasy-test-rebuild: true + - workflowId: getPlaylist + steps: + - stepId: test + operationId: getPlaylist + parameters: + - name: playlistId + in: path + value: 841953 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "composite": "/playlists/95/composite/1705717387", + "duration": 282000, + "key": "/playlists/95/items", + "leafCount": 2, + "playlistType": "video", + "smart": true, + "title": "Smart Movie Playlist", + "type": "playlist", + "addedAt": 1705716493, + "ratingKey": "95", + "summary": "", + "updatedAt": 1705717387, + "content": "library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1", + "guid": "com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91", + "icon": "playlist://image.smart" + } + ] + } + } + type: simple + x-speakeasy-test-group: Playlist + x-speakeasy-test-rebuild: true + - workflowId: getPlaylistItems + steps: + - stepId: test + operationId: getPlaylistItems + parameters: + - name: playlistId + in: path + value: 118195 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Playlist + x-speakeasy-test-rebuild: true + - workflowId: createPlaylist + steps: + - stepId: test + operationId: createPlaylist + parameters: + - name: uri + in: query + value: https://short-term-disconnection.name/ + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "composite": "/playlists/96/composite/1705724593", + "duration": 141000, + "key": "/playlists/96/items", + "leafCount": 1, + "playlistType": "video", + "smart": false, + "title": "A Great Playlist", + "type": "playlist", + "addedAt": 1705719589, + "lastViewedAt": 1705719589, + "ratingKey": "96", + "summary": "What a great playlist", + "updatedAt": 1705724593, + "viewCount": 1, + "guid": "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55", + "icon": "playlist://image.smart" + } + ] + } + } + type: simple + x-speakeasy-test-group: Library Playlists + x-speakeasy-test-rebuild: true + - workflowId: uploadPlaylist + steps: + - stepId: test + operationId: uploadPlaylist + parameters: + - name: path + in: query + value: /home/barkley/playlist.m3u + - name: force + in: query + value: 1 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + x-speakeasy-test-group: Library Playlists + x-speakeasy-test-rebuild: true + - workflowId: deletePlaylist + steps: + - stepId: test + operationId: deletePlaylist + parameters: + - name: playlistId + in: path + value: 343293 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + x-speakeasy-test-group: Library Playlists + x-speakeasy-test-rebuild: true + - workflowId: updatePlaylist + steps: + - stepId: test + operationId: updatePlaylist + parameters: + - name: playlistId + in: path + value: 157966 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + x-speakeasy-test-group: Library Playlists + x-speakeasy-test-rebuild: true + - workflowId: getPlaylistGenerators + steps: + - stepId: test + operationId: getPlaylistGenerators + parameters: + - name: playlistId + in: path + value: 162342 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Library Playlists + x-speakeasy-test-rebuild: true + - workflowId: clearPlaylistItems + steps: + - stepId: test + operationId: clearPlaylistItems + parameters: + - name: playlistId + in: path + value: 552140 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library Playlists + x-speakeasy-test-rebuild: true + - workflowId: addPlaylistItems + steps: + - stepId: test + operationId: addPlaylistItems + parameters: + - name: playlistId + in: path + value: 533723 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library Playlists + x-speakeasy-test-rebuild: true + - workflowId: deletePlaylistItem + steps: + - stepId: test + operationId: deletePlaylistItem + parameters: + - name: playlistId + in: path + value: 981646 + - name: generatorId + in: path + value: 194010 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library Playlists + x-speakeasy-test-rebuild: true + - workflowId: getPlaylistGenerator + steps: + - stepId: test + operationId: getPlaylistGenerator + parameters: + - name: playlistId + in: path + value: 744880 + - name: generatorId + in: path + value: 322168 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Library Playlists + x-speakeasy-test-rebuild: true + - workflowId: modifyPlaylistGenerator + steps: + - stepId: test + operationId: modifyPlaylistGenerator + parameters: + - name: playlistId + in: path + value: 972007 + - name: generatorId + in: path + value: 208334 + - name: Item + in: query + value: + Location: + uri: library://82503060-0d68-4603-b594-8b071d54819e/item/%2Flibrary%2Fmetadata%2F146 + Policy: + scope: all + unwatched: 0 + value: null + locationID: -1 + target: "" + targetTagID: 1 + title: Jack-Jack Attack + type: 42 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library Playlists + x-speakeasy-test-rebuild: true + - workflowId: getPlaylistGeneratorItems + steps: + - stepId: test + operationId: getPlaylistGeneratorItems + parameters: + - name: playlistId + in: path + value: 77230 + - name: generatorId + in: path + value: 979714 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + } + } + type: simple + x-speakeasy-test-group: Library Playlists + x-speakeasy-test-rebuild: true + - workflowId: movePlaylistItem + steps: + - stepId: test + operationId: movePlaylistItem + parameters: + - name: playlistId + in: path + value: 940298 + - name: playlistItemId + in: path + value: 375626 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library Playlists + x-speakeasy-test-rebuild: true + - workflowId: createPlayQueue + steps: + - stepId: test + operationId: createPlayQueue + parameters: + - name: type + in: query + value: audio + - name: shuffle + in: query + value: 1 + - name: repeat + in: query + value: 1 + - name: continuous + in: query + value: 1 + - name: recursive + in: query + value: 1 + - name: onDeck + in: query + value: 1 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Play Queue + x-speakeasy-test-rebuild: true + - workflowId: getPlayQueue + steps: + - stepId: test + operationId: getPlayQueue + parameters: + - name: playQueueId + in: path + value: 210646 + - name: own + in: query + value: 1 + - name: includeBefore + in: query + value: 1 + - name: includeAfter + in: query + value: 1 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Play Queue + x-speakeasy-test-rebuild: true + - workflowId: addToPlayQueue + steps: + - stepId: test + operationId: addToPlayQueue + parameters: + - name: playQueueId + in: path + value: 919248 + - name: next + in: query + value: 1 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Play Queue + x-speakeasy-test-rebuild: true + - workflowId: clearPlayQueue + steps: + - stepId: test + operationId: clearPlayQueue + parameters: + - name: playQueueId + in: path + value: 86357 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Play Queue + x-speakeasy-test-rebuild: true + - workflowId: resetPlayQueue + steps: + - stepId: test + operationId: resetPlayQueue + parameters: + - name: playQueueId + in: path + value: 581891 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Play Queue + x-speakeasy-test-rebuild: true + - workflowId: shuffle + steps: + - stepId: test + operationId: shuffle + parameters: + - name: playQueueId + in: path + value: 316150 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Play Queue + x-speakeasy-test-rebuild: true + - workflowId: unshuffle + steps: + - stepId: test + operationId: unshuffle + parameters: + - name: playQueueId + in: path + value: 484388 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Play Queue + x-speakeasy-test-rebuild: true + - workflowId: deletePlayQueueItem + steps: + - stepId: test + operationId: deletePlayQueueItem + parameters: + - name: playQueueId + in: path + value: 285738 + - name: playQueueItemId + in: path + value: 464354 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Play Queue + x-speakeasy-test-rebuild: true + - workflowId: movePlayQueueItem + steps: + - stepId: test + operationId: movePlayQueueItem + parameters: + - name: playQueueId + in: path + value: 31341 + - name: playQueueItemId + in: path + value: 495865 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Play Queue + x-speakeasy-test-rebuild: true + - workflowId: getColors + steps: + - stepId: test + operationId: getColors + parameters: + - name: url + in: query + value: /library/metadata/217745/art/1718931408 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: UltraBlur + x-speakeasy-test-rebuild: true + - workflowId: getImage + steps: + - stepId: test + operationId: getImage + parameters: + - name: topLeft + in: query + value: 3f280a + - name: topRight + in: query + value: 6b4713 + - name: bottomRight + in: query + value: 0f2a43 + - name: bottomLeft + in: query + value: 1c425d + - name: width + in: query + value: 1920 + - name: height + in: query + value: 1080 + - name: noise + in: query + value: 1 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == image/png + - context: $response.body + condition: | + "x-file: example.file" + type: simple + x-speakeasy-test-group: UltraBlur + x-speakeasy-test-rebuild: true + - workflowId: listSessions + steps: + - stepId: test + operationId: listSessions + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Status + x-speakeasy-test-rebuild: true + - workflowId: getBackgroundTasks + steps: + - stepId: test + operationId: getBackgroundTasks + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Status + x-speakeasy-test-rebuild: true + - workflowId: listPlaybackHistory + steps: + - stepId: test + operationId: listPlaybackHistory + parameters: + - name: sort + in: query + value: + - viewedAt:desc,accountID + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Status + x-speakeasy-test-rebuild: true + - workflowId: deleteHistory + steps: + - stepId: test + operationId: deleteHistory + parameters: + - name: historyId + in: path + value: 953579 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Status + x-speakeasy-test-rebuild: true + - workflowId: getHistoryItem + steps: + - stepId: test + operationId: getHistoryItem + parameters: + - name: historyId + in: path + value: 832213 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Status + x-speakeasy-test-rebuild: true + - workflowId: getUpdatesStatus + steps: + - stepId: test + operationId: getUpdatesStatus + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Updater + x-speakeasy-test-rebuild: true + - workflowId: getCollectionItems + steps: + - stepId: test + operationId: getCollectionItems + parameters: + - name: collectionId + in: path + value: 314585 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Content + x-speakeasy-test-rebuild: true + - workflowId: getMetadataItem + steps: + - stepId: test + operationId: getMetadataItem + parameters: + - name: ids + in: path + value: [] + - name: asyncCheckFiles + in: query + value: 1 + - name: asyncRefreshLocalMediaAgent + in: query + value: 1 + - name: asyncRefreshAnalysis + in: query + value: 1 + - name: checkFiles + in: query + value: 1 + - name: skipRefresh + in: query + value: 1 + - name: checkFileAvailability + in: query + value: 1 + - name: asyncAugmentMetadata + in: query + value: 1 + - name: augmentCount + in: query + value: 1 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Content + x-speakeasy-test-rebuild: true + - workflowId: getAlbums + steps: + - stepId: test + operationId: getAlbums + parameters: + - name: sectionId + in: path + value: 817133 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Content + x-speakeasy-test-rebuild: true + - workflowId: listContent + steps: + - stepId: test + operationId: listContent + parameters: + - name: sectionId + in: path + value: + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Content + x-speakeasy-test-rebuild: true + - workflowId: getAllLeaves + steps: + - stepId: test + operationId: getAllLeaves + parameters: + - name: sectionId + in: path + value: 633197 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Content + x-speakeasy-test-rebuild: true + - workflowId: getArts + steps: + - stepId: test + operationId: getArts + parameters: + - name: sectionId + in: path + value: 859200 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Content + x-speakeasy-test-rebuild: true + - workflowId: getCategories + steps: + - stepId: test + operationId: getCategories + parameters: + - name: sectionId + in: path + value: 21841 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Content + x-speakeasy-test-rebuild: true + - workflowId: getCluster + steps: + - stepId: test + operationId: getCluster + parameters: + - name: sectionId + in: path + value: 138560 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Content + x-speakeasy-test-rebuild: true + - workflowId: getSonicPath + steps: + - stepId: test + operationId: getSonicPath + parameters: + - name: sectionId + in: path + value: 914549 + - name: startID + in: query + value: 629990 + - name: endID + in: query + value: 687740 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Content + x-speakeasy-test-rebuild: true + - workflowId: getFolders + steps: + - stepId: test + operationId: getFolders + parameters: + - name: sectionId + in: path + value: 892532 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Content + x-speakeasy-test-rebuild: true + - workflowId: listMoments + steps: + - stepId: test + operationId: listMoments + parameters: + - name: sectionId + in: path + value: 403239 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: Content + x-speakeasy-test-rebuild: true + - workflowId: getSonicallySimilar + steps: + - stepId: test + operationId: getSonicallySimilar + parameters: + - name: sectionId + in: path + value: 525956 + - name: values + in: query + value: [] + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Content + x-speakeasy-test-rebuild: true + - workflowId: getCollectionImage + steps: + - stepId: test + operationId: getCollectionImage + parameters: + - name: collectionId + in: path + value: 474227 + - name: updatedAt + in: path + value: 759379 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == image/jpeg + - context: $response.body + condition: | + "x-file: example.file" + type: simple + x-speakeasy-test-group: Content + x-speakeasy-test-rebuild: true + - workflowId: addCollectionItems + steps: + - stepId: test + operationId: addCollectionItems + parameters: + - name: collectionId + in: path + value: 338144 + - name: uri + in: query + value: https://expensive-bakeware.com + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library Collections + x-speakeasy-test-rebuild: true + - workflowId: deleteCollectionItem + steps: + - stepId: test + operationId: deleteCollectionItem + parameters: + - name: collectionId + in: path + value: 320928 + - name: itemId + in: path + value: 406983 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library Collections + x-speakeasy-test-rebuild: true + - workflowId: moveCollectionItem + steps: + - stepId: test + operationId: moveCollectionItem + parameters: + - name: collectionId + in: path + value: 239532 + - name: itemId + in: path + value: 513864 + - name: X-Plex-Client-Identifier + in: header + value: abc123 + - name: X-Plex-Product + in: header + value: Plex for Roku + - name: X-Plex-Version + in: header + value: 2.4.1 + - name: X-Plex-Platform + in: header + value: Roku + - name: X-Plex-Platform-Version + in: header + value: 4.3 build 1057 + - name: X-Plex-Device + in: header + value: Roku 3 + - name: X-Plex-Model + in: header + value: 4200X + - name: X-Plex-Device-Vendor + in: header + value: Roku + - name: X-Plex-Device-Name + in: header + value: Living Room TV + - name: X-Plex-Marketplace + in: header + value: googlePlay + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "MediaContainer": { + "Metadata": [ + { + "Autotag": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Country": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Director": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Genre": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Guid": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Media": [ + { + "aspectRatio": 2.35, + "audioChannels": 2, + "audioCodec": "aac", + "audioProfile": "lc", + "bitrate": 5612, + "container": "mov", + "duration": 150192, + "has64bitOffsets": false, + "hasVoiceActivity": true, + "height": 544, + "id": 1, + "optimizedForStreaming": false, + "Part": [ + { + "audioProfile": "lc", + "container": "mov", + "duration": 150192, + "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + "has64bitOffsets": false, + "id": 1, + "key": "/library/parts/1/1531779263/file.mov", + "optimizedForStreaming": false, + "size": 105355654, + "Stream": [ + { + "default": true, + "audioChannelLayout": "stereo", + "bitDepth": 8, + "bitrate": 5466, + "canAutoSync": true, + "chromaLocation": "topleft", + "chromaSubsampling": "4:2:0", + "codec": "h264", + "colorPrimaries": "bt709", + "colorRange": "tv", + "colorSpace": "bt709", + "colorTrc": "bt709", + "displayTitle": "English (H.264 Main)", + "frameRate": 23.976, + "hasScalingMatrix": false, + "height": 544, + "id": 1, + "index": 0, + "key": "/library/streams/1", + "language": "English", + "languageCode": "eng", + "level": 31, + "profile": "main", + "refFrames": 2, + "samplingRate": 48000, + "streamIdentifier": 1, + "streamType": 1, + "width": 1280 + } + ], + "videoProfile": "main" + } + ], + "videoCodec": "h264", + "videoFrameRate": "24p", + "videoProfile": "main", + "videoResolution": "720", + "width": 1280 + } + ], + "Rating": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Role": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ], + "Writer": [ + { + "filter": "actor=49", + "role": "Secretary", + "tag": "Shaun Lawton", + "tagKey": "5d3ee12c4cde6a001c3e0b27", + "thumb": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg" + } + ] + } + ] + } + } + type: simple + x-speakeasy-test-group: Library Collections + x-speakeasy-test-rebuild: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index bceee157..4fdad94e 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.615.2 +speakeasyVersion: 1.636.3 sources: my-source: sourceNamespace: my-source @@ -9,27 +9,27 @@ sources: - main plexapi: sourceNamespace: plexapi - sourceRevisionDigest: sha256:5125adfea1b0daea399c6ecf755e32795de6b4131465ae6a1f32ad73b3bc7787 - sourceBlobDigest: sha256:95cea18b6e5f7d76d35db0aba5bcb59e72cf204451a2b09a99be0e3e9ec1f4c0 + sourceRevisionDigest: sha256:d10668c0bc8779046995836bd0e5b4e681f3a1661df05ef984d3951b16891135 + sourceBlobDigest: sha256:0e84e36799922513fa9fde276e7ed24d7e8ceef23d40f347d4aa7a40fddc2257 tags: - latest - - speakeasy-sdk-regen-1757895128 - - 0.0.3 + - speakeasy-sdk-regen-1760246702 + - 1.1.1 targets: plexjs: source: plexapi sourceNamespace: plexapi - sourceRevisionDigest: sha256:5125adfea1b0daea399c6ecf755e32795de6b4131465ae6a1f32ad73b3bc7787 - sourceBlobDigest: sha256:95cea18b6e5f7d76d35db0aba5bcb59e72cf204451a2b09a99be0e3e9ec1f4c0 + sourceRevisionDigest: sha256:d10668c0bc8779046995836bd0e5b4e681f3a1661df05ef984d3951b16891135 + sourceBlobDigest: sha256:0e84e36799922513fa9fde276e7ed24d7e8ceef23d40f347d4aa7a40fddc2257 codeSamplesNamespace: code-samples-typescript-plexjs - codeSamplesRevisionDigest: sha256:1e2d6fa14f87b947de490bc7f88a36b2e43145643385bd8f728c7cdc69b56086 + codeSamplesRevisionDigest: sha256:49b6f9d7cbbdae2b95c455771f7a7e9544fa64695d7326650a4a93a255ba101b workflow: workflowVersion: 1.0.0 speakeasyVersion: latest sources: plexapi: inputs: - - location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/refs/heads/main/output/plex-media-server-spec-dereferenced.yaml + - location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/refs/heads/main/plex-api-spec.yaml registry: location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi targets: diff --git a/FUNCTIONS.md b/FUNCTIONS.md index cfa21a6f..e45bd48a 100644 --- a/FUNCTIONS.md +++ b/FUNCTIONS.md @@ -20,21 +20,30 @@ specific category of applications. ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { serverGetServerCapabilities } from "@lukehagar/plexjs/funcs/serverGetServerCapabilities.js"; +import { generalGetServerInfo } from "@lukehagar/plexjs/funcs/generalGetServerInfo.js"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. const plexAPI = new PlexAPICore({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const res = await serverGetServerCapabilities(plexAPI); + const res = await generalGetServerInfo(plexAPI, {}); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("serverGetServerCapabilities failed:", res.error); + console.log("generalGetServerInfo failed:", res.error); } } diff --git a/README.md b/README.md index d40ddf91..dc3542fd 100644 --- a/README.md +++ b/README.md @@ -10,41 +10,13 @@ ## Summary -Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server -# Plex Media Server OpenAPI Specification - -An Open Source OpenAPI Specification for Plex Media Server - -Automation and SDKs provided by [Speakeasy](https://speakeasyapi.dev/) - -## Documentation - -[API Documentation](https://plexapi.dev) - -## SDKs - -The following SDKs are generated from the OpenAPI Specification. They are automatically generated and may not be fully tested. If you find any issues, please open an issue on the [main specification Repository](https://github.com/LukeHagar/plex-api-spec). - -| Language | Repository | Releases | Other | -| --------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------- | -| Python | [GitHub](https://github.com/LukeHagar/plexpy) | [PyPI](https://pypi.org/project/plex-api-client/) | - | -| JavaScript/TypeScript | [GitHub](https://github.com/LukeHagar/plexjs) | [NPM](https://www.npmjs.com/package/@lukehagar/plexjs) \ [JSR](https://jsr.io/@lukehagar/plexjs) | - | -| Go | [GitHub](https://github.com/LukeHagar/plexgo) | [Releases](https://github.com/LukeHagar/plexgo/releases) | [GoDoc](https://pkg.go.dev/github.com/LukeHagar/plexgo) | -| Ruby | [GitHub](https://github.com/LukeHagar/plexruby) | [Releases](https://github.com/LukeHagar/plexruby/releases) | - | -| Swift | [GitHub](https://github.com/LukeHagar/plexswift) | [Releases](https://github.com/LukeHagar/plexswift/releases) | - | -| PHP | [GitHub](https://github.com/LukeHagar/plexphp) | [Releases](https://github.com/LukeHagar/plexphp/releases) | - | -| Java | [GitHub](https://github.com/LukeHagar/plexjava) | [Releases](https://github.com/LukeHagar/plexjava/releases) | - | -| C# | [GitHub](https://github.com/LukeHagar/plexcsharp) | [Releases](https://github.com/LukeHagar/plexcsharp/releases) | - ## Table of Contents * [@lukehagar/plexjs](#lukehagarplexjs) -* [Plex Media Server OpenAPI Specification](#plex-media-server-openapi-specification) - * [Documentation](#documentation) - * [SDKs](#sdks) * [SDK Installation](#sdk-installation) * [SDK Example Usage](#sdk-example-usage) * [Available Resources and Operations](#available-resources-and-operations) @@ -89,10 +61,7 @@ bun add @lukehagar/plexjs ### Yarn ```bash -yarn add @lukehagar/plexjs zod - -# Note that Yarn does not install peer dependencies automatically. You will need -# to install zod as shown above. +yarn add @lukehagar/plexjs ``` @@ -105,11 +74,20 @@ yarn add @lukehagar/plexjs zod import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.server.getServerCapabilities(); + const result = await plexAPI.general.getServerInfo({}); console.log(result); } @@ -127,139 +105,324 @@ run(); ### [activities](docs/sdks/activities/README.md) -* [getServerActivities](docs/sdks/activities/README.md#getserveractivities) - Get Server Activities -* [cancelServerActivities](docs/sdks/activities/README.md#cancelserveractivities) - Cancel Server Activities - -### [authentication](docs/sdks/authentication/README.md) - -* [getTransientToken](docs/sdks/authentication/README.md#gettransienttoken) - Get a Transient Token -* [getSourceConnectionInformation](docs/sdks/authentication/README.md#getsourceconnectioninformation) - Get Source Connection Information -* [getTokenDetails](docs/sdks/authentication/README.md#gettokendetails) - Get Token Details -* [postUsersSignInData](docs/sdks/authentication/README.md#postuserssignindata) - Get User Sign In Data +* [listActivities](docs/sdks/activities/README.md#listactivities) - Get all activities +* [cancelActivity](docs/sdks/activities/README.md#cancelactivity) - Cancel a running activity ### [butler](docs/sdks/butler/README.md) -* [getButlerTasks](docs/sdks/butler/README.md#getbutlertasks) - Get Butler tasks -* [startAllTasks](docs/sdks/butler/README.md#startalltasks) - Start all Butler tasks -* [stopAllTasks](docs/sdks/butler/README.md#stopalltasks) - Stop all Butler tasks -* [startTask](docs/sdks/butler/README.md#starttask) - Start a single Butler task +* [stopTasks](docs/sdks/butler/README.md#stoptasks) - Stop all Butler tasks +* [getTasks](docs/sdks/butler/README.md#gettasks) - Get all Butler tasks +* [startTasks](docs/sdks/butler/README.md#starttasks) - Start all Butler tasks * [stopTask](docs/sdks/butler/README.md#stoptask) - Stop a single Butler task +* [startTask](docs/sdks/butler/README.md#starttask) - Start a single Butler task + +### [collections](docs/sdks/collections/README.md) + +* [createCollection](docs/sdks/collections/README.md#createcollection) - Create collection + +### [content](docs/sdks/content/README.md) + +* [getCollectionItems](docs/sdks/content/README.md#getcollectionitems) - Get items in a collection +* [getMetadataItem](docs/sdks/content/README.md#getmetadataitem) - Get a metadata item +* [getAlbums](docs/sdks/content/README.md#getalbums) - Set section albums +* [listContent](docs/sdks/content/README.md#listcontent) - Get items in the section +* [getAllLeaves](docs/sdks/content/README.md#getallleaves) - Set section leaves +* [getArts](docs/sdks/content/README.md#getarts) - Set section artwork +* [getCategories](docs/sdks/content/README.md#getcategories) - Set section categories +* [getCluster](docs/sdks/content/README.md#getcluster) - Set section clusters +* [getSonicPath](docs/sdks/content/README.md#getsonicpath) - Similar tracks to transition from one to another +* [getFolders](docs/sdks/content/README.md#getfolders) - Get all folder locations +* [listMoments](docs/sdks/content/README.md#listmoments) - Set section moments +* [getSonicallySimilar](docs/sdks/content/README.md#getsonicallysimilar) - The nearest audio tracks +* [getCollectionImage](docs/sdks/content/README.md#getcollectionimage) - Get a collection's image + +### [devices](docs/sdks/devices/README.md) + +* [getAvailableGrabbers](docs/sdks/devices/README.md#getavailablegrabbers) - Get available grabbers +* [listDevices](docs/sdks/devices/README.md#listdevices) - Get all devices +* [addDevice](docs/sdks/devices/README.md#adddevice) - Add a device +* [discoverDevices](docs/sdks/devices/README.md#discoverdevices) - Tell grabbers to discover devices +* [removeDevice](docs/sdks/devices/README.md#removedevice) - Remove a device +* [getDeviceDetails](docs/sdks/devices/README.md#getdevicedetails) - Get device details +* [modifyDevice](docs/sdks/devices/README.md#modifydevice) - Enable or disable a device +* [setChannelmap](docs/sdks/devices/README.md#setchannelmap) - Set a device's channel mapping +* [getDevicesChannels](docs/sdks/devices/README.md#getdeviceschannels) - Get a device's channels +* [setDevicePreferences](docs/sdks/devices/README.md#setdevicepreferences) - Set device preferences +* [stopScan](docs/sdks/devices/README.md#stopscan) - Tell a device to stop scanning for channels +* [scan](docs/sdks/devices/README.md#scan) - Tell a device to scan for channels +* [getThumb](docs/sdks/devices/README.md#getthumb) - Get device thumb + +### [downloadQueue](docs/sdks/downloadqueue/README.md) + +* [createDownloadQueue](docs/sdks/downloadqueue/README.md#createdownloadqueue) - Create download queue +* [getDownloadQueue](docs/sdks/downloadqueue/README.md#getdownloadqueue) - Get a download queue +* [addDownloadQueueItems](docs/sdks/downloadqueue/README.md#adddownloadqueueitems) - Add to download queue +* [listDownloadQueueItems](docs/sdks/downloadqueue/README.md#listdownloadqueueitems) - Get download queue items +* [getItemDecision](docs/sdks/downloadqueue/README.md#getitemdecision) - Grab download queue item decision +* [getDownloadQueueMedia](docs/sdks/downloadqueue/README.md#getdownloadqueuemedia) - Grab download queue media +* [removeDownloadQueueItems](docs/sdks/downloadqueue/README.md#removedownloadqueueitems) - Delete download queue items +* [getDownloadQueueItems](docs/sdks/downloadqueue/README.md#getdownloadqueueitems) - Get download queue items +* [restartProcessingDownloadQueueItems](docs/sdks/downloadqueue/README.md#restartprocessingdownloadqueueitems) - Restart processing of items from the decision + +### [dvRs](docs/sdks/dvrs/README.md) + +* [listDVRs](docs/sdks/dvrs/README.md#listdvrs) - Get DVRs +* [createDVR](docs/sdks/dvrs/README.md#createdvr) - Create a DVR +* [deleteDVR](docs/sdks/dvrs/README.md#deletedvr) - Delete a single DVR +* [getDVR](docs/sdks/dvrs/README.md#getdvr) - Get a single DVR +* [deleteLineup](docs/sdks/dvrs/README.md#deletelineup) - Delete a DVR Lineup +* [addLineup](docs/sdks/dvrs/README.md#addlineup) - Add a DVR Lineup +* [setDVRPreferences](docs/sdks/dvrs/README.md#setdvrpreferences) - Set DVR preferences +* [stopDVRReload](docs/sdks/dvrs/README.md#stopdvrreload) - Tell a DVR to stop reloading program guide +* [reloadGuide](docs/sdks/dvrs/README.md#reloadguide) - Tell a DVR to reload program guide +* [tuneChannel](docs/sdks/dvrs/README.md#tunechannel) - Tune a channel on a DVR +* [removeDeviceFromDVR](docs/sdks/dvrs/README.md#removedevicefromdvr) - Remove a device from an existing DVR +* [addDeviceToDVR](docs/sdks/dvrs/README.md#adddevicetodvr) - Add a device to an existing DVR + +### [epg](docs/sdks/epg/README.md) + +* [computeChannelMap](docs/sdks/epg/README.md#computechannelmap) - Compute the best channel map +* [getChannels](docs/sdks/epg/README.md#getchannels) - Get channels for a lineup +* [getCountries](docs/sdks/epg/README.md#getcountries) - Get all countries +* [getAllLanguages](docs/sdks/epg/README.md#getalllanguages) - Get all languages +* [getLineup](docs/sdks/epg/README.md#getlineup) - Compute the best lineup +* [getLineupChannels](docs/sdks/epg/README.md#getlineupchannels) - Get the channels for mulitple lineups +* [getCountriesLineups](docs/sdks/epg/README.md#getcountrieslineups) - Get lineups for a country via postal code +* [getCountryRegions](docs/sdks/epg/README.md#getcountryregions) - Get regions for a country +* [listLineups](docs/sdks/epg/README.md#listlineups) - Get lineups for a region + +### [events](docs/sdks/events/README.md) + +* [getNotifications](docs/sdks/events/README.md#getnotifications) - Connect to Eventsource +* [connectWebSocket](docs/sdks/events/README.md#connectwebsocket) - Connect to WebSocket + +### [general](docs/sdks/general/README.md) + +* [getServerInfo](docs/sdks/general/README.md#getserverinfo) - Get PMS info +* [getIdentity](docs/sdks/general/README.md#getidentity) - Get PMS identity +* [getSourceConnectionInformation](docs/sdks/general/README.md#getsourceconnectioninformation) - Get Source Connection Information +* [getTransientToken](docs/sdks/general/README.md#gettransienttoken) - Get Transient Tokens ### [hubs](docs/sdks/hubs/README.md) -* [getGlobalHubs](docs/sdks/hubs/README.md#getglobalhubs) - Get Global Hubs -* [getRecentlyAdded](docs/sdks/hubs/README.md#getrecentlyadded) - Get Recently Added -* [getLibraryHubs](docs/sdks/hubs/README.md#getlibraryhubs) - Get library specific hubs +* [getAllHubs](docs/sdks/hubs/README.md#getallhubs) - Get global hubs +* [getContinueWatching](docs/sdks/hubs/README.md#getcontinuewatching) - Get the continue watching hub +* [getHubItems](docs/sdks/hubs/README.md#gethubitems) - Get a hub's items +* [getPromotedHubs](docs/sdks/hubs/README.md#getpromotedhubs) - Get the hubs which are promoted +* [getMetadataHubs](docs/sdks/hubs/README.md#getmetadatahubs) - Get hubs for section by metadata item +* [getPostplayHubs](docs/sdks/hubs/README.md#getpostplayhubs) - Get postplay hubs +* [getRelatedHubs](docs/sdks/hubs/README.md#getrelatedhubs) - Get related hubs +* [getSectionHubs](docs/sdks/hubs/README.md#getsectionhubs) - Get section hubs +* [resetSectionDefaults](docs/sdks/hubs/README.md#resetsectiondefaults) - Reset hubs to defaults +* [listHubs](docs/sdks/hubs/README.md#listhubs) - Get hubs +* [createCustomHub](docs/sdks/hubs/README.md#createcustomhub) - Create a custom hub +* [moveHub](docs/sdks/hubs/README.md#movehub) - Move Hub +* [deleteCustomHub](docs/sdks/hubs/README.md#deletecustomhub) - Delete a custom hub +* [updateHubVisibility](docs/sdks/hubs/README.md#updatehubvisibility) - Change hub visibility ### [library](docs/sdks/library/README.md) -* [getFileHash](docs/sdks/library/README.md#getfilehash) - Get Hash Value -* [getRecentlyAddedLibrary](docs/sdks/library/README.md#getrecentlyaddedlibrary) - Get Recently Added -* [getAllLibraries](docs/sdks/library/README.md#getalllibraries) - Get All Libraries -* [getLibraryDetails](docs/sdks/library/README.md#getlibrarydetails) - Get Library Details -* [deleteLibrary](docs/sdks/library/README.md#deletelibrary) - Delete Library Section -* [getLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items -* [getLibrarySectionsAll](docs/sdks/library/README.md#getlibrarysectionsall) - Get Library section media by tag ALL -* [getRefreshLibraryMetadata](docs/sdks/library/README.md#getrefreshlibrarymetadata) - Refresh Metadata Of The Library -* [getSearchLibrary](docs/sdks/library/README.md#getsearchlibrary) - Search Library -* [getGenresLibrary](docs/sdks/library/README.md#getgenreslibrary) - Get Genres of library media -* [getCountriesLibrary](docs/sdks/library/README.md#getcountrieslibrary) - Get Countries of library media -* [getActorsLibrary](docs/sdks/library/README.md#getactorslibrary) - Get Actors of library media -* [getSearchAllLibraries](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries -* [getMediaMetaData](docs/sdks/library/README.md#getmediametadata) - Get Media Metadata -* [getMediaArts](docs/sdks/library/README.md#getmediaarts) - Get Media Background Artwork -* [postMediaArts](docs/sdks/library/README.md#postmediaarts) - Upload Media Background Artwork -* [getMediaPosters](docs/sdks/library/README.md#getmediaposters) - Get Media Posters -* [postMediaPoster](docs/sdks/library/README.md#postmediaposter) - Upload Media Poster -* [getMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children -* [getTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content +* [getLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get all items in library +* [deleteCaches](docs/sdks/library/README.md#deletecaches) - Delete library caches +* [cleanBundles](docs/sdks/library/README.md#cleanbundles) - Clean bundles +* [ingestTransientItem](docs/sdks/library/README.md#ingesttransientitem) - Ingest a transient item +* [getLibraryMatches](docs/sdks/library/README.md#getlibrarymatches) - Get library matches +* [optimizeDatabase](docs/sdks/library/README.md#optimizedatabase) - Optimize the Database +* [getRandomArtwork](docs/sdks/library/README.md#getrandomartwork) - Get random artwork +* [getSections](docs/sdks/library/README.md#getsections) - Get library sections (main Media Provider Only) +* [addSection](docs/sdks/library/README.md#addsection) - Add a library section +* [stopAllRefreshes](docs/sdks/library/README.md#stopallrefreshes) - Stop refresh +* [getSectionsPrefs](docs/sdks/library/README.md#getsectionsprefs) - Get section prefs +* [refreshSectionsMetadata](docs/sdks/library/README.md#refreshsectionsmetadata) - Refresh all sections +* [getTags](docs/sdks/library/README.md#gettags) - Get all library tags of a type +* [deleteMetadataItem](docs/sdks/library/README.md#deletemetadataitem) - Delete a metadata item +* [editMetadataItem](docs/sdks/library/README.md#editmetadataitem) - Edit a metadata item +* [detectAds](docs/sdks/library/README.md#detectads) - Ad-detect an item +* [getAllItemLeaves](docs/sdks/library/README.md#getallitemleaves) - Get the leaves of an item +* [analyzeMetadata](docs/sdks/library/README.md#analyzemetadata) - Analyze an item +* [generateThumbs](docs/sdks/library/README.md#generatethumbs) - Generate thumbs of chapters for an item +* [detectCredits](docs/sdks/library/README.md#detectcredits) - Credit detect a metadata item +* [getExtras](docs/sdks/library/README.md#getextras) - Get an item's extras +* [addExtras](docs/sdks/library/README.md#addextras) - Add to an item's extras +* [getFile](docs/sdks/library/README.md#getfile) - Get a file from a metadata or media bundle +* [startBifGeneration](docs/sdks/library/README.md#startbifgeneration) - Start BIF generation of an item +* [detectIntros](docs/sdks/library/README.md#detectintros) - Intro detect an item +* [createMarker](docs/sdks/library/README.md#createmarker) - Create a marker +* [matchItem](docs/sdks/library/README.md#matchitem) - Match a metadata item +* [listMatches](docs/sdks/library/README.md#listmatches) - Get metadata matches for an item +* [mergeItems](docs/sdks/library/README.md#mergeitems) - Merge a metadata item +* [listSonicallySimilar](docs/sdks/library/README.md#listsonicallysimilar) - Get nearest tracks to metadata item +* [setItemPreferences](docs/sdks/library/README.md#setitempreferences) - Set metadata preferences +* [refreshItemsMetadata](docs/sdks/library/README.md#refreshitemsmetadata) - Refresh a metadata item +* [getRelatedItems](docs/sdks/library/README.md#getrelateditems) - Get related items +* [listSimilar](docs/sdks/library/README.md#listsimilar) - Get similar items +* [splitItem](docs/sdks/library/README.md#splititem) - Split a metadata item +* [addSubtitles](docs/sdks/library/README.md#addsubtitles) - Add subtitles +* [getItemTree](docs/sdks/library/README.md#getitemtree) - Get metadata items as a tree +* [unmatch](docs/sdks/library/README.md#unmatch) - Unmatch a metadata item +* [listTopUsers](docs/sdks/library/README.md#listtopusers) - Get metadata top users +* [detectVoiceActivity](docs/sdks/library/README.md#detectvoiceactivity) - Detect voice activity +* [getAugmentationStatus](docs/sdks/library/README.md#getaugmentationstatus) - Get augmentation status +* [setStreamSelection](docs/sdks/library/README.md#setstreamselection) - Set stream selection +* [getPerson](docs/sdks/library/README.md#getperson) - Get person details +* [listPersonMedia](docs/sdks/library/README.md#listpersonmedia) - Get media for a person +* [deleteLibrarySection](docs/sdks/library/README.md#deletelibrarysection) - Delete a library section +* [getLibraryDetails](docs/sdks/library/README.md#getlibrarydetails) - Get a library section by id +* [editSection](docs/sdks/library/README.md#editsection) - Edit a library section +* [updateItems](docs/sdks/library/README.md#updateitems) - Set the fields of the filtered items +* [startAnalysis](docs/sdks/library/README.md#startanalysis) - Analyze a section +* [autocomplete](docs/sdks/library/README.md#autocomplete) - Get autocompletions for search +* [getCollections](docs/sdks/library/README.md#getcollections) - Get collections in a section +* [getCommon](docs/sdks/library/README.md#getcommon) - Get common fields for items +* [emptyTrash](docs/sdks/library/README.md#emptytrash) - Empty section trash +* [getSectionFilters](docs/sdks/library/README.md#getsectionfilters) - Get section filters +* [getFirstCharacters](docs/sdks/library/README.md#getfirstcharacters) - Get list of first characters +* [deleteIndexes](docs/sdks/library/README.md#deleteindexes) - Delete section indexes +* [deleteIntros](docs/sdks/library/README.md#deleteintros) - Delete section intro markers +* [getSectionPreferences](docs/sdks/library/README.md#getsectionpreferences) - Get section prefs +* [setSectionPreferences](docs/sdks/library/README.md#setsectionpreferences) - Set section prefs +* [cancelRefresh](docs/sdks/library/README.md#cancelrefresh) - Cancel section refresh +* [refreshSection](docs/sdks/library/README.md#refreshsection) - Refresh section +* [getAvailableSorts](docs/sdks/library/README.md#getavailablesorts) - Get a section sorts +* [getStreamLevels](docs/sdks/library/README.md#getstreamlevels) - Get loudness about a stream in json +* [getStreamLoudness](docs/sdks/library/README.md#getstreamloudness) - Get loudness about a stream +* [getChapterImage](docs/sdks/library/README.md#getchapterimage) - Get a chapter image +* [setItemArtwork](docs/sdks/library/README.md#setitemartwork) - Set an item's artwork, theme, etc +* [updateItemArtwork](docs/sdks/library/README.md#updateitemartwork) - Set an item's artwork, theme, etc +* [deleteMarker](docs/sdks/library/README.md#deletemarker) - Delete a marker +* [editMarker](docs/sdks/library/README.md#editmarker) - Edit a marker +* [deleteMediaItem](docs/sdks/library/README.md#deletemediaitem) - Delete a media item +* [getPartIndex](docs/sdks/library/README.md#getpartindex) - Get BIF index for a part +* [deleteCollection](docs/sdks/library/README.md#deletecollection) - Delete a collection +* [getSectionImage](docs/sdks/library/README.md#getsectionimage) - Get a section composite image +* [deleteStream](docs/sdks/library/README.md#deletestream) - Delete a stream +* [getStream](docs/sdks/library/README.md#getstream) - Get a stream +* [setStreamOffset](docs/sdks/library/README.md#setstreamoffset) - Set a stream offset +* [getItemArtwork](docs/sdks/library/README.md#getitemartwork) - Get an item's artwork, theme, etc +* [getMediaPart](docs/sdks/library/README.md#getmediapart) - Get a media part +* [getImageFromBif](docs/sdks/library/README.md#getimagefrombif) - Get an image from part BIF + +### [libraryCollections](docs/sdks/librarycollections/README.md) + +* [addCollectionItems](docs/sdks/librarycollections/README.md#addcollectionitems) - Add items to a collection +* [deleteCollectionItem](docs/sdks/librarycollections/README.md#deletecollectionitem) - Delete an item from a collection +* [moveCollectionItem](docs/sdks/librarycollections/README.md#movecollectionitem) - Reorder an item in the collection + +### [libraryPlaylists](docs/sdks/libraryplaylists/README.md) + +* [createPlaylist](docs/sdks/libraryplaylists/README.md#createplaylist) - Create a Playlist +* [uploadPlaylist](docs/sdks/libraryplaylists/README.md#uploadplaylist) - Upload +* [deletePlaylist](docs/sdks/libraryplaylists/README.md#deleteplaylist) - Delete a Playlist +* [updatePlaylist](docs/sdks/libraryplaylists/README.md#updateplaylist) - Editing a Playlist +* [getPlaylistGenerators](docs/sdks/libraryplaylists/README.md#getplaylistgenerators) - Get a playlist's generators +* [clearPlaylistItems](docs/sdks/libraryplaylists/README.md#clearplaylistitems) - Clearing a playlist +* [addPlaylistItems](docs/sdks/libraryplaylists/README.md#addplaylistitems) - Adding to a Playlist +* [deletePlaylistItem](docs/sdks/libraryplaylists/README.md#deleteplaylistitem) - Delete a Generator +* [getPlaylistGenerator](docs/sdks/libraryplaylists/README.md#getplaylistgenerator) - Get a playlist generator +* [modifyPlaylistGenerator](docs/sdks/libraryplaylists/README.md#modifyplaylistgenerator) - Modify a Generator +* [getPlaylistGeneratorItems](docs/sdks/libraryplaylists/README.md#getplaylistgeneratoritems) - Get a playlist generator's items +* [movePlaylistItem](docs/sdks/libraryplaylists/README.md#moveplaylistitem) - Moving items in a playlist +* [refreshPlaylist](docs/sdks/libraryplaylists/README.md#refreshplaylist) - Reprocess a generator + +### [liveTV](docs/sdks/livetv/README.md) + +* [getSessions](docs/sdks/livetv/README.md#getsessions) - Get all sessions +* [getLiveTVSession](docs/sdks/livetv/README.md#getlivetvsession) - Get a single session +* [getSessionPlaylistIndex](docs/sdks/livetv/README.md#getsessionplaylistindex) - Get a session playlist index +* [getSessionSegment](docs/sdks/livetv/README.md#getsessionsegment) - Get a single session segment ### [log](docs/sdks/log/README.md) -* [logLine](docs/sdks/log/README.md#logline) - Logging a single line message. -* [logMultiLine](docs/sdks/log/README.md#logmultiline) - Logging a multi-line message -* [enablePaperTrail](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail +* [writeLog](docs/sdks/log/README.md#writelog) - Logging a multi-line message to the Plex Media Server log +* [writeMessage](docs/sdks/log/README.md#writemessage) - Logging a single-line message to the Plex Media Server log +* [enablePapertrail](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail -### [media](docs/sdks/media/README.md) +### [playlist](docs/sdks/playlist/README.md) -* [markPlayed](docs/sdks/media/README.md#markplayed) - Mark Media Played -* [markUnplayed](docs/sdks/media/README.md#markunplayed) - Mark Media Unplayed -* [updatePlayProgress](docs/sdks/media/README.md#updateplayprogress) - Update Media Play Progress -* [getBannerImage](docs/sdks/media/README.md#getbannerimage) - Get Banner Image -* [getThumbImage](docs/sdks/media/README.md#getthumbimage) - Get Thumb Image +* [listPlaylists](docs/sdks/playlist/README.md#listplaylists) - List playlists +* [getPlaylist](docs/sdks/playlist/README.md#getplaylist) - Retrieve Playlist +* [getPlaylistItems](docs/sdks/playlist/README.md#getplaylistitems) - Retrieve Playlist Contents -### [playlists](docs/sdks/playlists/README.md) +### [playQueue](docs/sdks/playqueue/README.md) -* [createPlaylist](docs/sdks/playlists/README.md#createplaylist) - Create a Playlist -* [getPlaylists](docs/sdks/playlists/README.md#getplaylists) - Get All Playlists -* [getPlaylist](docs/sdks/playlists/README.md#getplaylist) - Retrieve Playlist -* [deletePlaylist](docs/sdks/playlists/README.md#deleteplaylist) - Deletes a Playlist -* [updatePlaylist](docs/sdks/playlists/README.md#updateplaylist) - Update a Playlist -* [getPlaylistContents](docs/sdks/playlists/README.md#getplaylistcontents) - Retrieve Playlist Contents -* [clearPlaylistContents](docs/sdks/playlists/README.md#clearplaylistcontents) - Delete Playlist Contents -* [addPlaylistContents](docs/sdks/playlists/README.md#addplaylistcontents) - Adding to a Playlist -* [uploadPlaylist](docs/sdks/playlists/README.md#uploadplaylist) - Upload Playlist +* [createPlayQueue](docs/sdks/playqueue/README.md#createplayqueue) - Create a play queue +* [getPlayQueue](docs/sdks/playqueue/README.md#getplayqueue) - Retrieve a play queue +* [addToPlayQueue](docs/sdks/playqueue/README.md#addtoplayqueue) - Add a generator or playlist to a play queue +* [clearPlayQueue](docs/sdks/playqueue/README.md#clearplayqueue) - Clear a play queue +* [resetPlayQueue](docs/sdks/playqueue/README.md#resetplayqueue) - Reset a play queue +* [shuffle](docs/sdks/playqueue/README.md#shuffle) - Shuffle a play queue +* [unshuffle](docs/sdks/playqueue/README.md#unshuffle) - Unshuffle a play queue +* [deletePlayQueueItem](docs/sdks/playqueue/README.md#deleteplayqueueitem) - Delete an item from a play queue +* [movePlayQueueItem](docs/sdks/playqueue/README.md#moveplayqueueitem) - Move an item in a play queue -### [plex](docs/sdks/plex/README.md) +### [preferences](docs/sdks/preferences/README.md) -* [getCompanionsData](docs/sdks/plex/README.md#getcompanionsdata) - Get Companions Data -* [getUserFriends](docs/sdks/plex/README.md#getuserfriends) - Get list of friends of the user logged in -* [getGeoData](docs/sdks/plex/README.md#getgeodata) - Get Geo Data -* [getHomeData](docs/sdks/plex/README.md#gethomedata) - Get Plex Home Data -* [getServerResources](docs/sdks/plex/README.md#getserverresources) - Get Server Resources -* [getPin](docs/sdks/plex/README.md#getpin) - Get a Pin -* [getTokenByPinId](docs/sdks/plex/README.md#gettokenbypinid) - Get Access Token by PinId +* [getAllPreferences](docs/sdks/preferences/README.md#getallpreferences) - Get all preferences +* [setPreferences](docs/sdks/preferences/README.md#setpreferences) - Set preferences +* [getPreference](docs/sdks/preferences/README.md#getpreference) - Get a preferences +### [provider](docs/sdks/provider/README.md) + +* [listProviders](docs/sdks/provider/README.md#listproviders) - Get the list of available media providers +* [addProvider](docs/sdks/provider/README.md#addprovider) - Add a media provider +* [refreshProviders](docs/sdks/provider/README.md#refreshproviders) - Refresh media providers +* [deleteMediaProvider](docs/sdks/provider/README.md#deletemediaprovider) - Delete a media provider + +### [rate](docs/sdks/rate/README.md) + +* [setRating](docs/sdks/rate/README.md#setrating) - Rate an item ### [search](docs/sdks/search/README.md) -* [performSearch](docs/sdks/search/README.md#performsearch) - Perform a search -* [performVoiceSearch](docs/sdks/search/README.md#performvoicesearch) - Perform a voice search -* [getSearchResults](docs/sdks/search/README.md#getsearchresults) - Get Search Results +* [searchHubs](docs/sdks/search/README.md#searchhubs) - Search Hub +* [voiceSearchHubs](docs/sdks/search/README.md#voicesearchhubs) - Voice Search Hub -### [server](docs/sdks/server/README.md) +### [status](docs/sdks/status/README.md) -* [getServerCapabilities](docs/sdks/server/README.md#getservercapabilities) - Get Server Capabilities -* [getServerPreferences](docs/sdks/server/README.md#getserverpreferences) - Get Server Preferences -* [getAvailableClients](docs/sdks/server/README.md#getavailableclients) - Get Available Clients -* [getDevices](docs/sdks/server/README.md#getdevices) - Get Devices -* [getServerIdentity](docs/sdks/server/README.md#getserveridentity) - Get Server Identity -* [getMyPlexAccount](docs/sdks/server/README.md#getmyplexaccount) - Get MyPlex Account -* [getResizedPhoto](docs/sdks/server/README.md#getresizedphoto) - Get a Resized Photo -* [getMediaProviders](docs/sdks/server/README.md#getmediaproviders) - Get Media Providers -* [getServerList](docs/sdks/server/README.md#getserverlist) - Get Server List +* [listSessions](docs/sdks/status/README.md#listsessions) - List Sessions +* [getBackgroundTasks](docs/sdks/status/README.md#getbackgroundtasks) - Get background tasks +* [listPlaybackHistory](docs/sdks/status/README.md#listplaybackhistory) - List Playback History +* [terminateSession](docs/sdks/status/README.md#terminatesession) - Terminate a session +* [deleteHistory](docs/sdks/status/README.md#deletehistory) - Delete Single History Item +* [getHistoryItem](docs/sdks/status/README.md#gethistoryitem) - Get Single History Item -### [sessions](docs/sdks/sessions/README.md) +### [subscriptions](docs/sdks/subscriptions/README.md) -* [getSessions](docs/sdks/sessions/README.md#getsessions) - Get Active Sessions -* [getSessionHistory](docs/sdks/sessions/README.md#getsessionhistory) - Get Session History -* [getTranscodeSessions](docs/sdks/sessions/README.md#gettranscodesessions) - Get Transcode Sessions -* [stopTranscodeSession](docs/sdks/sessions/README.md#stoptranscodesession) - Stop a Transcode Session +* [getAllSubscriptions](docs/sdks/subscriptions/README.md#getallsubscriptions) - Get all subscriptions +* [createSubscription](docs/sdks/subscriptions/README.md#createsubscription) - Create a subscription +* [processSubscriptions](docs/sdks/subscriptions/README.md#processsubscriptions) - Process all subscriptions +* [getScheduledRecordings](docs/sdks/subscriptions/README.md#getscheduledrecordings) - Get all scheduled recordings +* [getTemplate](docs/sdks/subscriptions/README.md#gettemplate) - Get the subscription template +* [cancelGrab](docs/sdks/subscriptions/README.md#cancelgrab) - Cancel an existing grab +* [deleteSubscription](docs/sdks/subscriptions/README.md#deletesubscription) - Delete a subscription +* [getSubscription](docs/sdks/subscriptions/README.md#getsubscription) - Get a single subscription +* [editSubscriptionPreferences](docs/sdks/subscriptions/README.md#editsubscriptionpreferences) - Edit a subscription +* [reorderSubscription](docs/sdks/subscriptions/README.md#reordersubscription) - Re-order a subscription -### [statistics](docs/sdks/statistics/README.md) +### [timeline](docs/sdks/timeline/README.md) -* [getStatistics](docs/sdks/statistics/README.md#getstatistics) - Get Media Statistics -* [getResourcesStatistics](docs/sdks/statistics/README.md#getresourcesstatistics) - Get Resources Statistics -* [getBandwidthStatistics](docs/sdks/statistics/README.md#getbandwidthstatistics) - Get Bandwidth Statistics +* [markPlayed](docs/sdks/timeline/README.md#markplayed) - Mark an item as played +* [report](docs/sdks/timeline/README.md#report) - Report media timeline +* [unscrobble](docs/sdks/timeline/README.md#unscrobble) - Mark an item as unplayed + +### [transcoder](docs/sdks/transcoder/README.md) + +* [transcodeImage](docs/sdks/transcoder/README.md#transcodeimage) - Transcode an image +* [makeDecision](docs/sdks/transcoder/README.md#makedecision) - Make a decision on media playback +* [triggerFallback](docs/sdks/transcoder/README.md#triggerfallback) - Manually trigger a transcoder fallback +* [transcodeSubtitles](docs/sdks/transcoder/README.md#transcodesubtitles) - Transcode subtitles +* [startTranscodeSession](docs/sdks/transcoder/README.md#starttranscodesession) - Start A Transcoding Session + +### [ultraBlur](docs/sdks/ultrablur/README.md) + +* [getColors](docs/sdks/ultrablur/README.md#getcolors) - Get UltraBlur Colors +* [getImage](docs/sdks/ultrablur/README.md#getimage) - Get UltraBlur Image ### [updater](docs/sdks/updater/README.md) -* [getUpdateStatus](docs/sdks/updater/README.md#getupdatestatus) - Querying status of updates -* [checkForUpdates](docs/sdks/updater/README.md#checkforupdates) - Checking for updates -* [applyUpdates](docs/sdks/updater/README.md#applyupdates) - Apply Updates - -### [users](docs/sdks/users/README.md) - -* [getUsers](docs/sdks/users/README.md#getusers) - Get list of all connected users - -### [video](docs/sdks/video/README.md) - -* [getTimeline](docs/sdks/video/README.md#gettimeline) - Get the timeline for a media item -* [startUniversalTranscode](docs/sdks/video/README.md#startuniversaltranscode) - Start Universal Transcode - -### [watchlist](docs/sdks/watchlist/README.md) - -* [getWatchList](docs/sdks/watchlist/README.md#getwatchlist) - Get User Watchlist +* [applyUpdates](docs/sdks/updater/README.md#applyupdates) - Applying updates +* [checkUpdates](docs/sdks/updater/README.md#checkupdates) - Checking for updates +* [getUpdatesStatus](docs/sdks/updater/README.md#getupdatesstatus) - Querying status of updates @@ -269,14 +432,13 @@ run(); [`PlexAPIError`](./src/sdk/models/errors/plexapierror.ts) is the base class for all HTTP error responses. It has the following properties: -| Property | Type | Description | -| ------------------- | ---------- | --------------------------------------------------------------------------------------- | -| `error.message` | `string` | Error message | -| `error.statusCode` | `number` | HTTP response status code eg `404` | -| `error.headers` | `Headers` | HTTP response headers | -| `error.body` | `string` | HTTP body. Can be empty string if no body is returned. | -| `error.rawResponse` | `Response` | Raw HTTP response | -| `error.data$` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). | +| Property | Type | Description | +| ------------------- | ---------- | ------------------------------------------------------ | +| `error.message` | `string` | Error message | +| `error.statusCode` | `number` | HTTP response status code eg `404` | +| `error.headers` | `Headers` | HTTP response headers | +| `error.body` | `string` | HTTP body. Can be empty string if no body is returned. | +| `error.rawResponse` | `Response` | Raw HTTP response | ### Example ```typescript @@ -284,27 +446,29 @@ import { PlexAPI } from "@lukehagar/plexjs"; import * as errors from "@lukehagar/plexjs/sdk/models/errors"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { try { - const result = await plexAPI.server.getServerCapabilities(); + const result = await plexAPI.general.getServerInfo({}); console.log(result); } catch (error) { - // The base class for HTTP error responses if (error instanceof errors.PlexAPIError) { console.log(error.message); console.log(error.statusCode); console.log(error.body); console.log(error.headers); - - // Depending on the method different errors may be thrown - if (error instanceof errors.GetServerCapabilitiesBadRequest) { - console.log(error.data$.errors); // Errors[] - console.log(error.data$.rawResponse); // Response - } } } } @@ -317,7 +481,7 @@ run(); **Primary error:** * [`PlexAPIError`](./src/sdk/models/errors/plexapierror.ts): The base class for HTTP error responses. -
Less common errors (162) +
Less common errors (6)
@@ -330,181 +494,34 @@ run(); **Inherit from [`PlexAPIError`](./src/sdk/models/errors/plexapierror.ts)**: -* [`GetServerCapabilitiesBadRequest`](./src/sdk/models/errors/getservercapabilitiesbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetServerPreferencesBadRequest`](./src/sdk/models/errors/getserverpreferencesbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetAvailableClientsBadRequest`](./src/sdk/models/errors/getavailableclientsbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetDevicesBadRequest`](./src/sdk/models/errors/getdevicesbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetMyPlexAccountBadRequest`](./src/sdk/models/errors/getmyplexaccountbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetResizedPhotoBadRequest`](./src/sdk/models/errors/getresizedphotobadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetMediaProvidersBadRequest`](./src/sdk/models/errors/getmediaprovidersbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetServerListBadRequest`](./src/sdk/models/errors/getserverlistbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`MarkPlayedBadRequest`](./src/sdk/models/errors/markplayedbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`MarkUnplayedBadRequest`](./src/sdk/models/errors/markunplayedbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`UpdatePlayProgressBadRequest`](./src/sdk/models/errors/updateplayprogressbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetBannerImageBadRequest`](./src/sdk/models/errors/getbannerimagebadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetThumbImageBadRequest`](./src/sdk/models/errors/getthumbimagebadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetTimelineBadRequest`](./src/sdk/models/errors/gettimelinebadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`StartUniversalTranscodeBadRequest`](./src/sdk/models/errors/startuniversaltranscodebadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetServerActivitiesBadRequest`](./src/sdk/models/errors/getserveractivitiesbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`CancelServerActivitiesBadRequest`](./src/sdk/models/errors/cancelserveractivitiesbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetButlerTasksBadRequest`](./src/sdk/models/errors/getbutlertasksbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`StartAllTasksBadRequest`](./src/sdk/models/errors/startalltasksbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`StopAllTasksBadRequest`](./src/sdk/models/errors/stopalltasksbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`StartTaskBadRequest`](./src/sdk/models/errors/starttaskbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`StopTaskBadRequest`](./src/sdk/models/errors/stoptaskbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetCompanionsDataBadRequest`](./src/sdk/models/errors/getcompanionsdatabadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetUserFriendsBadRequest`](./src/sdk/models/errors/getuserfriendsbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetGeoDataBadRequest`](./src/sdk/models/errors/getgeodatabadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetHomeDataBadRequest`](./src/sdk/models/errors/gethomedatabadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetServerResourcesBadRequest`](./src/sdk/models/errors/getserverresourcesbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetPinBadRequest`](./src/sdk/models/errors/getpinbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetTokenByPinIdBadRequest`](./src/sdk/models/errors/gettokenbypinidbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetGlobalHubsBadRequest`](./src/sdk/models/errors/getglobalhubsbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetLibraryHubsBadRequest`](./src/sdk/models/errors/getlibraryhubsbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`PerformSearchBadRequest`](./src/sdk/models/errors/performsearchbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`PerformVoiceSearchBadRequest`](./src/sdk/models/errors/performvoicesearchbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetSearchResultsBadRequest`](./src/sdk/models/errors/getsearchresultsbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetFileHashBadRequest`](./src/sdk/models/errors/getfilehashbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetRecentlyAddedLibraryBadRequest`](./src/sdk/models/errors/getrecentlyaddedlibrarybadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetAllLibrariesBadRequest`](./src/sdk/models/errors/getalllibrariesbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetLibraryDetailsBadRequest`](./src/sdk/models/errors/getlibrarydetailsbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`DeleteLibraryBadRequest`](./src/sdk/models/errors/deletelibrarybadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetLibraryItemsBadRequest`](./src/sdk/models/errors/getlibraryitemsbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetLibrarySectionsAllBadRequest`](./src/sdk/models/errors/getlibrarysectionsallbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetRefreshLibraryMetadataBadRequest`](./src/sdk/models/errors/getrefreshlibrarymetadatabadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetSearchLibraryBadRequest`](./src/sdk/models/errors/getsearchlibrarybadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetGenresLibraryBadRequest`](./src/sdk/models/errors/getgenreslibrarybadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetCountriesLibraryBadRequest`](./src/sdk/models/errors/getcountrieslibrarybadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetActorsLibraryBadRequest`](./src/sdk/models/errors/getactorslibrarybadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetSearchAllLibrariesBadRequest`](./src/sdk/models/errors/getsearchalllibrariesbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetMediaMetaDataBadRequest`](./src/sdk/models/errors/getmediametadatabadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetMetadataChildrenBadRequest`](./src/sdk/models/errors/getmetadatachildrenbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetTopWatchedContentBadRequest`](./src/sdk/models/errors/gettopwatchedcontentbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetWatchListBadRequest`](./src/sdk/models/errors/getwatchlistbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`LogLineBadRequest`](./src/sdk/models/errors/loglinebadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`LogMultiLineBadRequest`](./src/sdk/models/errors/logmultilinebadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`EnablePaperTrailBadRequest`](./src/sdk/models/errors/enablepapertrailbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`CreatePlaylistBadRequest`](./src/sdk/models/errors/createplaylistbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetPlaylistsBadRequest`](./src/sdk/models/errors/getplaylistsbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetPlaylistBadRequest`](./src/sdk/models/errors/getplaylistbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`DeletePlaylistBadRequest`](./src/sdk/models/errors/deleteplaylistbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`UpdatePlaylistBadRequest`](./src/sdk/models/errors/updateplaylistbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetPlaylistContentsBadRequest`](./src/sdk/models/errors/getplaylistcontentsbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`ClearPlaylistContentsBadRequest`](./src/sdk/models/errors/clearplaylistcontentsbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`AddPlaylistContentsBadRequest`](./src/sdk/models/errors/addplaylistcontentsbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`UploadPlaylistBadRequest`](./src/sdk/models/errors/uploadplaylistbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetTransientTokenBadRequest`](./src/sdk/models/errors/gettransienttokenbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetSourceConnectionInformationBadRequest`](./src/sdk/models/errors/getsourceconnectioninformationbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetTokenDetailsBadRequest`](./src/sdk/models/errors/gettokendetailsbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`PostUsersSignInDataBadRequest`](./src/sdk/models/errors/postuserssignindatabadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetStatisticsBadRequest`](./src/sdk/models/errors/getstatisticsbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetResourcesStatisticsBadRequest`](./src/sdk/models/errors/getresourcesstatisticsbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetBandwidthStatisticsBadRequest`](./src/sdk/models/errors/getbandwidthstatisticsbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetSessionsBadRequest`](./src/sdk/models/errors/getsessionsbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetSessionHistoryBadRequest`](./src/sdk/models/errors/getsessionhistorybadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetTranscodeSessionsBadRequest`](./src/sdk/models/errors/gettranscodesessionsbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`StopTranscodeSessionBadRequest`](./src/sdk/models/errors/stoptranscodesessionbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetUpdateStatusBadRequest`](./src/sdk/models/errors/getupdatestatusbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`CheckForUpdatesBadRequest`](./src/sdk/models/errors/checkforupdatesbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`ApplyUpdatesBadRequest`](./src/sdk/models/errors/applyupdatesbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetUsersBadRequest`](./src/sdk/models/errors/getusersbadrequest.ts): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.* -* [`GetServerCapabilitiesUnauthorized`](./src/sdk/models/errors/getservercapabilitiesunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetServerPreferencesUnauthorized`](./src/sdk/models/errors/getserverpreferencesunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetAvailableClientsUnauthorized`](./src/sdk/models/errors/getavailableclientsunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetDevicesUnauthorized`](./src/sdk/models/errors/getdevicesunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetMyPlexAccountUnauthorized`](./src/sdk/models/errors/getmyplexaccountunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetResizedPhotoUnauthorized`](./src/sdk/models/errors/getresizedphotounauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetMediaProvidersUnauthorized`](./src/sdk/models/errors/getmediaprovidersunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetServerListUnauthorized`](./src/sdk/models/errors/getserverlistunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`MarkPlayedUnauthorized`](./src/sdk/models/errors/markplayedunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`MarkUnplayedUnauthorized`](./src/sdk/models/errors/markunplayedunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`UpdatePlayProgressUnauthorized`](./src/sdk/models/errors/updateplayprogressunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetBannerImageUnauthorized`](./src/sdk/models/errors/getbannerimageunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetThumbImageUnauthorized`](./src/sdk/models/errors/getthumbimageunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetTimelineUnauthorized`](./src/sdk/models/errors/gettimelineunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`StartUniversalTranscodeUnauthorized`](./src/sdk/models/errors/startuniversaltranscodeunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetServerActivitiesUnauthorized`](./src/sdk/models/errors/getserveractivitiesunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`CancelServerActivitiesUnauthorized`](./src/sdk/models/errors/cancelserveractivitiesunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetButlerTasksUnauthorized`](./src/sdk/models/errors/getbutlertasksunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`StartAllTasksUnauthorized`](./src/sdk/models/errors/startalltasksunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`StopAllTasksUnauthorized`](./src/sdk/models/errors/stopalltasksunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`StartTaskUnauthorized`](./src/sdk/models/errors/starttaskunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`StopTaskUnauthorized`](./src/sdk/models/errors/stoptaskunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetCompanionsDataUnauthorized`](./src/sdk/models/errors/getcompanionsdataunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetUserFriendsUnauthorized`](./src/sdk/models/errors/getuserfriendsunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetGeoDataUnauthorized`](./src/sdk/models/errors/getgeodataunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetHomeDataUnauthorized`](./src/sdk/models/errors/gethomedataunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetServerResourcesUnauthorized`](./src/sdk/models/errors/getserverresourcesunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetGlobalHubsUnauthorized`](./src/sdk/models/errors/getglobalhubsunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetLibraryHubsUnauthorized`](./src/sdk/models/errors/getlibraryhubsunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`PerformSearchUnauthorized`](./src/sdk/models/errors/performsearchunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`PerformVoiceSearchUnauthorized`](./src/sdk/models/errors/performvoicesearchunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetSearchResultsUnauthorized`](./src/sdk/models/errors/getsearchresultsunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetFileHashUnauthorized`](./src/sdk/models/errors/getfilehashunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetRecentlyAddedLibraryUnauthorized`](./src/sdk/models/errors/getrecentlyaddedlibraryunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetAllLibrariesUnauthorized`](./src/sdk/models/errors/getalllibrariesunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetLibraryDetailsUnauthorized`](./src/sdk/models/errors/getlibrarydetailsunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`DeleteLibraryUnauthorized`](./src/sdk/models/errors/deletelibraryunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetLibraryItemsUnauthorized`](./src/sdk/models/errors/getlibraryitemsunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetLibrarySectionsAllUnauthorized`](./src/sdk/models/errors/getlibrarysectionsallunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetRefreshLibraryMetadataUnauthorized`](./src/sdk/models/errors/getrefreshlibrarymetadataunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetSearchLibraryUnauthorized`](./src/sdk/models/errors/getsearchlibraryunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetGenresLibraryUnauthorized`](./src/sdk/models/errors/getgenreslibraryunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetCountriesLibraryUnauthorized`](./src/sdk/models/errors/getcountrieslibraryunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetActorsLibraryUnauthorized`](./src/sdk/models/errors/getactorslibraryunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetSearchAllLibrariesUnauthorized`](./src/sdk/models/errors/getsearchalllibrariesunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetMediaMetaDataUnauthorized`](./src/sdk/models/errors/getmediametadataunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetMetadataChildrenUnauthorized`](./src/sdk/models/errors/getmetadatachildrenunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetTopWatchedContentUnauthorized`](./src/sdk/models/errors/gettopwatchedcontentunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetWatchListUnauthorized`](./src/sdk/models/errors/getwatchlistunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`LogLineUnauthorized`](./src/sdk/models/errors/loglineunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`LogMultiLineUnauthorized`](./src/sdk/models/errors/logmultilineunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`EnablePaperTrailUnauthorized`](./src/sdk/models/errors/enablepapertrailunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`CreatePlaylistUnauthorized`](./src/sdk/models/errors/createplaylistunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetPlaylistsUnauthorized`](./src/sdk/models/errors/getplaylistsunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetPlaylistUnauthorized`](./src/sdk/models/errors/getplaylistunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`DeletePlaylistUnauthorized`](./src/sdk/models/errors/deleteplaylistunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`UpdatePlaylistUnauthorized`](./src/sdk/models/errors/updateplaylistunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetPlaylistContentsUnauthorized`](./src/sdk/models/errors/getplaylistcontentsunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`ClearPlaylistContentsUnauthorized`](./src/sdk/models/errors/clearplaylistcontentsunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`AddPlaylistContentsUnauthorized`](./src/sdk/models/errors/addplaylistcontentsunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`UploadPlaylistUnauthorized`](./src/sdk/models/errors/uploadplaylistunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetTransientTokenUnauthorized`](./src/sdk/models/errors/gettransienttokenunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetSourceConnectionInformationUnauthorized`](./src/sdk/models/errors/getsourceconnectioninformationunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetTokenDetailsUnauthorized`](./src/sdk/models/errors/gettokendetailsunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`PostUsersSignInDataUnauthorized`](./src/sdk/models/errors/postuserssignindataunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetStatisticsUnauthorized`](./src/sdk/models/errors/getstatisticsunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetResourcesStatisticsUnauthorized`](./src/sdk/models/errors/getresourcesstatisticsunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetBandwidthStatisticsUnauthorized`](./src/sdk/models/errors/getbandwidthstatisticsunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetSessionsUnauthorized`](./src/sdk/models/errors/getsessionsunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetSessionHistoryUnauthorized`](./src/sdk/models/errors/getsessionhistoryunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetTranscodeSessionsUnauthorized`](./src/sdk/models/errors/gettranscodesessionsunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`StopTranscodeSessionUnauthorized`](./src/sdk/models/errors/stoptranscodesessionunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetUpdateStatusUnauthorized`](./src/sdk/models/errors/getupdatestatusunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`CheckForUpdatesUnauthorized`](./src/sdk/models/errors/checkforupdatesunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`ApplyUpdatesUnauthorized`](./src/sdk/models/errors/applyupdatesunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetUsersUnauthorized`](./src/sdk/models/errors/getusersunauthorized.ts): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.* -* [`GetTokenByPinIdResponseBody`](./src/sdk/models/errors/gettokenbypinidresponsebody.ts): Not Found or Expired. Status code `404`. Applicable to 1 of 84 methods.* -* [`GetServerIdentityRequestTimeout`](./src/sdk/models/errors/getserveridentityrequesttimeout.ts): Request Timeout. Status code `408`. Applicable to 1 of 84 methods.* * [`ResponseValidationError`](./src/sdk/models/errors/responsevalidationerror.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string.
- -\* Check [the method documentation](#available-resources-and-operations) to see if the error is applicable. ## Server Selection -### Server Variables +### Select Server by Index -The default server `{protocol}://{ip}:{port}` contains variables and is set to `https://10.10.10.47:32400` by default. To override default values, the following parameters are available when initializing the SDK client instance: +You can override the default server globally by passing a server index to the `serverIdx: number` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers: -| Variable | Parameter | Supported Values | Default | Description | -| ---------- | --------------------------------- | -------------------------- | --------------- | ---------------------------------------------- | -| `protocol` | `protocol: models.ServerProtocol` | - `"http"`
- `"https"` | `"https"` | The protocol to use for the server connection | -| `ip` | `ip: string` | string | `"10.10.10.47"` | The IP address or hostname of your Plex Server | -| `port` | `port: string` | string | `"32400"` | The port of your Plex Server | +| # | Server | Variables | Description | +| --- | ---------------------------------------------------------- | -------------------------------------------- | ----------- | +| 0 | `https://{IP-description}.{identifier}.plex.direct:{port}` | `identifier`
`IP-description`
`port` | | +| 1 | `{protocol}://{host}:{port}` | `protocol`
`host`
`port` | | +| 2 | `https://{server_url}` | `server_url` | | + +If the selected server has variables, you may override its default values through the additional parameters made available in the SDK constructor: + +| Variable | Parameter | Default | Description | +| ---------------- | ----------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `identifier` | `identifier: string` | `"0123456789abcdef0123456789abcdef"` | The unique identifier of this particular PMS | +| `IP-description` | `ipDescription: string` | `"1-2-3-4"` | A `-` separated string of the IPv4 or IPv6 address components | +| `port` | `port: string` | `"32400"` | The Port number configured on the PMS. Typically (`32400`).
If using a reverse proxy, this would be the port number configured on the proxy.
| +| `protocol` | `protocol: string` | `"http"` | The network protocol to use. Typically (`http` or `https`) | +| `host` | `host: string` | `"localhost"` | The Host of the PMS.
If using on a local network, this is the internal IP address of the server hosting the PMS.
If using on an external network, this is the external IP address for your network, and requires port forwarding.
If using a reverse proxy, this would be the external DNS domain for your network, and requires the proxy handle port forwarding.
| +| `server_url` | `serverUrl: string` | `"http://localhost:32400"` | The full manual URL to access the PMS | #### Example @@ -512,14 +529,24 @@ The default server `{protocol}://{ip}:{port}` contains variables and is set to ` import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - protocol: "https", - ip: "4982:bc2a:b4f8:efb5:2394:5bc3:ab4f:0e6d", - port: "44765", - accessToken: "", + serverIdx: 1, + protocol: "", + host: "electric-excess.name", + port: "36393", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.server.getServerCapabilities(); + const result = await plexAPI.general.getServerInfo({}); console.log(result); } @@ -530,39 +557,26 @@ run(); ### Override Server URL Per-Client -The default server can be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example: +The default server can also be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example: ```typescript import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - serverURL: "https://10.10.10.47:32400", - accessToken: "", + serverURL: "https://http://localhost:32400", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.server.getServerCapabilities(); - - console.log(result); -} - -run(); - -``` - -### Override Server URL Per-Operation - -The server URL can also be overridden on a per-operation basis, provided a server list was specified for the operation. For example: -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.plex.getCompanionsData({ - serverURL: "https://plex.tv/api/v2", - }); + const result = await plexAPI.general.getServerInfo({}); console.log(result); } @@ -617,7 +631,7 @@ httpClient.addHook("requestError", (error, request) => { console.groupEnd(); }); -const sdk = new PlexAPI({ httpClient }); +const sdk = new PlexAPI({ httpClient: httpClient }); ``` @@ -628,20 +642,30 @@ const sdk = new PlexAPI({ httpClient }); This SDK supports the following security scheme globally: -| Name | Type | Scheme | -| ------------- | ------ | ------- | -| `accessToken` | apiKey | API key | +| Name | Type | Scheme | +| -------- | ------ | ------- | +| `apiKey` | apiKey | API key | -To authenticate with the API the `accessToken` parameter must be set when initializing the SDK client instance. For example: +To authenticate with the API the `apiKey` parameter must be set when initializing the SDK client instance. For example: ```typescript import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + apiKey: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.server.getServerCapabilities(); + const result = await plexAPI.general.getServerInfo({}); console.log(result); } @@ -672,90 +696,243 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). Available standalone functions -- [`activitiesCancelServerActivities`](docs/sdks/activities/README.md#cancelserveractivities) - Cancel Server Activities -- [`activitiesGetServerActivities`](docs/sdks/activities/README.md#getserveractivities) - Get Server Activities -- [`authenticationGetSourceConnectionInformation`](docs/sdks/authentication/README.md#getsourceconnectioninformation) - Get Source Connection Information -- [`authenticationGetTokenDetails`](docs/sdks/authentication/README.md#gettokendetails) - Get Token Details -- [`authenticationGetTransientToken`](docs/sdks/authentication/README.md#gettransienttoken) - Get a Transient Token -- [`authenticationPostUsersSignInData`](docs/sdks/authentication/README.md#postuserssignindata) - Get User Sign In Data -- [`butlerGetButlerTasks`](docs/sdks/butler/README.md#getbutlertasks) - Get Butler tasks -- [`butlerStartAllTasks`](docs/sdks/butler/README.md#startalltasks) - Start all Butler tasks +- [`activitiesCancelActivity`](docs/sdks/activities/README.md#cancelactivity) - Cancel a running activity +- [`activitiesListActivities`](docs/sdks/activities/README.md#listactivities) - Get all activities +- [`butlerGetTasks`](docs/sdks/butler/README.md#gettasks) - Get all Butler tasks - [`butlerStartTask`](docs/sdks/butler/README.md#starttask) - Start a single Butler task -- [`butlerStopAllTasks`](docs/sdks/butler/README.md#stopalltasks) - Stop all Butler tasks +- [`butlerStartTasks`](docs/sdks/butler/README.md#starttasks) - Start all Butler tasks - [`butlerStopTask`](docs/sdks/butler/README.md#stoptask) - Stop a single Butler task -- [`hubsGetGlobalHubs`](docs/sdks/hubs/README.md#getglobalhubs) - Get Global Hubs -- [`hubsGetLibraryHubs`](docs/sdks/hubs/README.md#getlibraryhubs) - Get library specific hubs -- [`hubsGetRecentlyAdded`](docs/sdks/hubs/README.md#getrecentlyadded) - Get Recently Added -- [`libraryDeleteLibrary`](docs/sdks/library/README.md#deletelibrary) - Delete Library Section -- [`libraryGetActorsLibrary`](docs/sdks/library/README.md#getactorslibrary) - Get Actors of library media -- [`libraryGetAllLibraries`](docs/sdks/library/README.md#getalllibraries) - Get All Libraries -- [`libraryGetCountriesLibrary`](docs/sdks/library/README.md#getcountrieslibrary) - Get Countries of library media -- [`libraryGetFileHash`](docs/sdks/library/README.md#getfilehash) - Get Hash Value -- [`libraryGetGenresLibrary`](docs/sdks/library/README.md#getgenreslibrary) - Get Genres of library media -- [`libraryGetLibraryDetails`](docs/sdks/library/README.md#getlibrarydetails) - Get Library Details -- [`libraryGetLibraryItems`](docs/sdks/library/README.md#getlibraryitems) - Get Library Items -- [`libraryGetLibrarySectionsAll`](docs/sdks/library/README.md#getlibrarysectionsall) - Get Library section media by tag ALL -- [`libraryGetMediaArts`](docs/sdks/library/README.md#getmediaarts) - Get Media Background Artwork -- [`libraryGetMediaMetaData`](docs/sdks/library/README.md#getmediametadata) - Get Media Metadata -- [`libraryGetMediaPosters`](docs/sdks/library/README.md#getmediaposters) - Get Media Posters -- [`libraryGetMetadataChildren`](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children -- [`libraryGetRecentlyAddedLibrary`](docs/sdks/library/README.md#getrecentlyaddedlibrary) - Get Recently Added -- [`libraryGetRefreshLibraryMetadata`](docs/sdks/library/README.md#getrefreshlibrarymetadata) - Refresh Metadata Of The Library -- [`libraryGetSearchAllLibraries`](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries -- [`libraryGetSearchLibrary`](docs/sdks/library/README.md#getsearchlibrary) - Search Library -- [`libraryGetTopWatchedContent`](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content -- [`libraryPostMediaArts`](docs/sdks/library/README.md#postmediaarts) - Upload Media Background Artwork -- [`libraryPostMediaPoster`](docs/sdks/library/README.md#postmediaposter) - Upload Media Poster -- [`logEnablePaperTrail`](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail -- [`logLogLine`](docs/sdks/log/README.md#logline) - Logging a single line message. -- [`logLogMultiLine`](docs/sdks/log/README.md#logmultiline) - Logging a multi-line message -- [`mediaGetBannerImage`](docs/sdks/media/README.md#getbannerimage) - Get Banner Image -- [`mediaGetThumbImage`](docs/sdks/media/README.md#getthumbimage) - Get Thumb Image -- [`mediaMarkPlayed`](docs/sdks/media/README.md#markplayed) - Mark Media Played -- [`mediaMarkUnplayed`](docs/sdks/media/README.md#markunplayed) - Mark Media Unplayed -- [`mediaUpdatePlayProgress`](docs/sdks/media/README.md#updateplayprogress) - Update Media Play Progress -- [`playlistsAddPlaylistContents`](docs/sdks/playlists/README.md#addplaylistcontents) - Adding to a Playlist -- [`playlistsClearPlaylistContents`](docs/sdks/playlists/README.md#clearplaylistcontents) - Delete Playlist Contents -- [`playlistsCreatePlaylist`](docs/sdks/playlists/README.md#createplaylist) - Create a Playlist -- [`playlistsDeletePlaylist`](docs/sdks/playlists/README.md#deleteplaylist) - Deletes a Playlist -- [`playlistsGetPlaylist`](docs/sdks/playlists/README.md#getplaylist) - Retrieve Playlist -- [`playlistsGetPlaylistContents`](docs/sdks/playlists/README.md#getplaylistcontents) - Retrieve Playlist Contents -- [`playlistsGetPlaylists`](docs/sdks/playlists/README.md#getplaylists) - Get All Playlists -- [`playlistsUpdatePlaylist`](docs/sdks/playlists/README.md#updateplaylist) - Update a Playlist -- [`playlistsUploadPlaylist`](docs/sdks/playlists/README.md#uploadplaylist) - Upload Playlist -- [`plexGetCompanionsData`](docs/sdks/plex/README.md#getcompanionsdata) - Get Companions Data -- [`plexGetGeoData`](docs/sdks/plex/README.md#getgeodata) - Get Geo Data -- [`plexGetHomeData`](docs/sdks/plex/README.md#gethomedata) - Get Plex Home Data -- [`plexGetPin`](docs/sdks/plex/README.md#getpin) - Get a Pin -- [`plexGetServerResources`](docs/sdks/plex/README.md#getserverresources) - Get Server Resources -- [`plexGetTokenByPinId`](docs/sdks/plex/README.md#gettokenbypinid) - Get Access Token by PinId -- [`plexGetUserFriends`](docs/sdks/plex/README.md#getuserfriends) - Get list of friends of the user logged in -- [`searchGetSearchResults`](docs/sdks/search/README.md#getsearchresults) - Get Search Results -- [`searchPerformSearch`](docs/sdks/search/README.md#performsearch) - Perform a search -- [`searchPerformVoiceSearch`](docs/sdks/search/README.md#performvoicesearch) - Perform a voice search -- [`serverGetAvailableClients`](docs/sdks/server/README.md#getavailableclients) - Get Available Clients -- [`serverGetDevices`](docs/sdks/server/README.md#getdevices) - Get Devices -- [`serverGetMediaProviders`](docs/sdks/server/README.md#getmediaproviders) - Get Media Providers -- [`serverGetMyPlexAccount`](docs/sdks/server/README.md#getmyplexaccount) - Get MyPlex Account -- [`serverGetResizedPhoto`](docs/sdks/server/README.md#getresizedphoto) - Get a Resized Photo -- [`serverGetServerCapabilities`](docs/sdks/server/README.md#getservercapabilities) - Get Server Capabilities -- [`serverGetServerIdentity`](docs/sdks/server/README.md#getserveridentity) - Get Server Identity -- [`serverGetServerList`](docs/sdks/server/README.md#getserverlist) - Get Server List -- [`serverGetServerPreferences`](docs/sdks/server/README.md#getserverpreferences) - Get Server Preferences -- [`sessionsGetSessionHistory`](docs/sdks/sessions/README.md#getsessionhistory) - Get Session History -- [`sessionsGetSessions`](docs/sdks/sessions/README.md#getsessions) - Get Active Sessions -- [`sessionsGetTranscodeSessions`](docs/sdks/sessions/README.md#gettranscodesessions) - Get Transcode Sessions -- [`sessionsStopTranscodeSession`](docs/sdks/sessions/README.md#stoptranscodesession) - Stop a Transcode Session -- [`statisticsGetBandwidthStatistics`](docs/sdks/statistics/README.md#getbandwidthstatistics) - Get Bandwidth Statistics -- [`statisticsGetResourcesStatistics`](docs/sdks/statistics/README.md#getresourcesstatistics) - Get Resources Statistics -- [`statisticsGetStatistics`](docs/sdks/statistics/README.md#getstatistics) - Get Media Statistics -- [`updaterApplyUpdates`](docs/sdks/updater/README.md#applyupdates) - Apply Updates -- [`updaterCheckForUpdates`](docs/sdks/updater/README.md#checkforupdates) - Checking for updates -- [`updaterGetUpdateStatus`](docs/sdks/updater/README.md#getupdatestatus) - Querying status of updates -- [`usersGetUsers`](docs/sdks/users/README.md#getusers) - Get list of all connected users -- [`videoGetTimeline`](docs/sdks/video/README.md#gettimeline) - Get the timeline for a media item -- [`videoStartUniversalTranscode`](docs/sdks/video/README.md#startuniversaltranscode) - Start Universal Transcode -- [`watchlistGetWatchList`](docs/sdks/watchlist/README.md#getwatchlist) - Get User Watchlist +- [`butlerStopTasks`](docs/sdks/butler/README.md#stoptasks) - Stop all Butler tasks +- [`collectionsCreateCollection`](docs/sdks/collections/README.md#createcollection) - Create collection +- [`contentGetAlbums`](docs/sdks/content/README.md#getalbums) - Set section albums +- [`contentGetAllLeaves`](docs/sdks/content/README.md#getallleaves) - Set section leaves +- [`contentGetArts`](docs/sdks/content/README.md#getarts) - Set section artwork +- [`contentGetCategories`](docs/sdks/content/README.md#getcategories) - Set section categories +- [`contentGetCluster`](docs/sdks/content/README.md#getcluster) - Set section clusters +- [`contentGetCollectionImage`](docs/sdks/content/README.md#getcollectionimage) - Get a collection's image +- [`contentGetCollectionItems`](docs/sdks/content/README.md#getcollectionitems) - Get items in a collection +- [`contentGetFolders`](docs/sdks/content/README.md#getfolders) - Get all folder locations +- [`contentGetMetadataItem`](docs/sdks/content/README.md#getmetadataitem) - Get a metadata item +- [`contentGetSonicallySimilar`](docs/sdks/content/README.md#getsonicallysimilar) - The nearest audio tracks +- [`contentGetSonicPath`](docs/sdks/content/README.md#getsonicpath) - Similar tracks to transition from one to another +- [`contentListContent`](docs/sdks/content/README.md#listcontent) - Get items in the section +- [`contentListMoments`](docs/sdks/content/README.md#listmoments) - Set section moments +- [`devicesAddDevice`](docs/sdks/devices/README.md#adddevice) - Add a device +- [`devicesDiscoverDevices`](docs/sdks/devices/README.md#discoverdevices) - Tell grabbers to discover devices +- [`devicesGetAvailableGrabbers`](docs/sdks/devices/README.md#getavailablegrabbers) - Get available grabbers +- [`devicesGetDeviceDetails`](docs/sdks/devices/README.md#getdevicedetails) - Get device details +- [`devicesGetDevicesChannels`](docs/sdks/devices/README.md#getdeviceschannels) - Get a device's channels +- [`devicesGetThumb`](docs/sdks/devices/README.md#getthumb) - Get device thumb +- [`devicesListDevices`](docs/sdks/devices/README.md#listdevices) - Get all devices +- [`devicesModifyDevice`](docs/sdks/devices/README.md#modifydevice) - Enable or disable a device +- [`devicesRemoveDevice`](docs/sdks/devices/README.md#removedevice) - Remove a device +- [`devicesScan`](docs/sdks/devices/README.md#scan) - Tell a device to scan for channels +- [`devicesSetChannelmap`](docs/sdks/devices/README.md#setchannelmap) - Set a device's channel mapping +- [`devicesSetDevicePreferences`](docs/sdks/devices/README.md#setdevicepreferences) - Set device preferences +- [`devicesStopScan`](docs/sdks/devices/README.md#stopscan) - Tell a device to stop scanning for channels +- [`downloadQueueAddDownloadQueueItems`](docs/sdks/downloadqueue/README.md#adddownloadqueueitems) - Add to download queue +- [`downloadQueueCreateDownloadQueue`](docs/sdks/downloadqueue/README.md#createdownloadqueue) - Create download queue +- [`downloadQueueGetDownloadQueue`](docs/sdks/downloadqueue/README.md#getdownloadqueue) - Get a download queue +- [`downloadQueueGetDownloadQueueItems`](docs/sdks/downloadqueue/README.md#getdownloadqueueitems) - Get download queue items +- [`downloadQueueGetDownloadQueueMedia`](docs/sdks/downloadqueue/README.md#getdownloadqueuemedia) - Grab download queue media +- [`downloadQueueGetItemDecision`](docs/sdks/downloadqueue/README.md#getitemdecision) - Grab download queue item decision +- [`downloadQueueListDownloadQueueItems`](docs/sdks/downloadqueue/README.md#listdownloadqueueitems) - Get download queue items +- [`downloadQueueRemoveDownloadQueueItems`](docs/sdks/downloadqueue/README.md#removedownloadqueueitems) - Delete download queue items +- [`downloadQueueRestartProcessingDownloadQueueItems`](docs/sdks/downloadqueue/README.md#restartprocessingdownloadqueueitems) - Restart processing of items from the decision +- [`dvRsAddDeviceToDVR`](docs/sdks/dvrs/README.md#adddevicetodvr) - Add a device to an existing DVR +- [`dvRsAddLineup`](docs/sdks/dvrs/README.md#addlineup) - Add a DVR Lineup +- [`dvRsCreateDVR`](docs/sdks/dvrs/README.md#createdvr) - Create a DVR +- [`dvRsDeleteDVR`](docs/sdks/dvrs/README.md#deletedvr) - Delete a single DVR +- [`dvRsDeleteLineup`](docs/sdks/dvrs/README.md#deletelineup) - Delete a DVR Lineup +- [`dvRsGetDVR`](docs/sdks/dvrs/README.md#getdvr) - Get a single DVR +- [`dvRsListDVRs`](docs/sdks/dvrs/README.md#listdvrs) - Get DVRs +- [`dvRsReloadGuide`](docs/sdks/dvrs/README.md#reloadguide) - Tell a DVR to reload program guide +- [`dvRsRemoveDeviceFromDVR`](docs/sdks/dvrs/README.md#removedevicefromdvr) - Remove a device from an existing DVR +- [`dvRsSetDVRPreferences`](docs/sdks/dvrs/README.md#setdvrpreferences) - Set DVR preferences +- [`dvRsStopDVRReload`](docs/sdks/dvrs/README.md#stopdvrreload) - Tell a DVR to stop reloading program guide +- [`dvRsTuneChannel`](docs/sdks/dvrs/README.md#tunechannel) - Tune a channel on a DVR +- [`epgComputeChannelMap`](docs/sdks/epg/README.md#computechannelmap) - Compute the best channel map +- [`epgGetAllLanguages`](docs/sdks/epg/README.md#getalllanguages) - Get all languages +- [`epgGetChannels`](docs/sdks/epg/README.md#getchannels) - Get channels for a lineup +- [`epgGetCountries`](docs/sdks/epg/README.md#getcountries) - Get all countries +- [`epgGetCountriesLineups`](docs/sdks/epg/README.md#getcountrieslineups) - Get lineups for a country via postal code +- [`epgGetCountryRegions`](docs/sdks/epg/README.md#getcountryregions) - Get regions for a country +- [`epgGetLineup`](docs/sdks/epg/README.md#getlineup) - Compute the best lineup +- [`epgGetLineupChannels`](docs/sdks/epg/README.md#getlineupchannels) - Get the channels for mulitple lineups +- [`epgListLineups`](docs/sdks/epg/README.md#listlineups) - Get lineups for a region +- [`eventsConnectWebSocket`](docs/sdks/events/README.md#connectwebsocket) - Connect to WebSocket +- [`eventsGetNotifications`](docs/sdks/events/README.md#getnotifications) - Connect to Eventsource +- [`generalGetIdentity`](docs/sdks/general/README.md#getidentity) - Get PMS identity +- [`generalGetServerInfo`](docs/sdks/general/README.md#getserverinfo) - Get PMS info +- [`generalGetSourceConnectionInformation`](docs/sdks/general/README.md#getsourceconnectioninformation) - Get Source Connection Information +- [`generalGetTransientToken`](docs/sdks/general/README.md#gettransienttoken) - Get Transient Tokens +- [`hubsCreateCustomHub`](docs/sdks/hubs/README.md#createcustomhub) - Create a custom hub +- [`hubsDeleteCustomHub`](docs/sdks/hubs/README.md#deletecustomhub) - Delete a custom hub +- [`hubsGetAllHubs`](docs/sdks/hubs/README.md#getallhubs) - Get global hubs +- [`hubsGetContinueWatching`](docs/sdks/hubs/README.md#getcontinuewatching) - Get the continue watching hub +- [`hubsGetHubItems`](docs/sdks/hubs/README.md#gethubitems) - Get a hub's items +- [`hubsGetMetadataHubs`](docs/sdks/hubs/README.md#getmetadatahubs) - Get hubs for section by metadata item +- [`hubsGetPostplayHubs`](docs/sdks/hubs/README.md#getpostplayhubs) - Get postplay hubs +- [`hubsGetPromotedHubs`](docs/sdks/hubs/README.md#getpromotedhubs) - Get the hubs which are promoted +- [`hubsGetRelatedHubs`](docs/sdks/hubs/README.md#getrelatedhubs) - Get related hubs +- [`hubsGetSectionHubs`](docs/sdks/hubs/README.md#getsectionhubs) - Get section hubs +- [`hubsListHubs`](docs/sdks/hubs/README.md#listhubs) - Get hubs +- [`hubsMoveHub`](docs/sdks/hubs/README.md#movehub) - Move Hub +- [`hubsResetSectionDefaults`](docs/sdks/hubs/README.md#resetsectiondefaults) - Reset hubs to defaults +- [`hubsUpdateHubVisibility`](docs/sdks/hubs/README.md#updatehubvisibility) - Change hub visibility +- [`libraryAddExtras`](docs/sdks/library/README.md#addextras) - Add to an item's extras +- [`libraryAddSection`](docs/sdks/library/README.md#addsection) - Add a library section +- [`libraryAddSubtitles`](docs/sdks/library/README.md#addsubtitles) - Add subtitles +- [`libraryAnalyzeMetadata`](docs/sdks/library/README.md#analyzemetadata) - Analyze an item +- [`libraryAutocomplete`](docs/sdks/library/README.md#autocomplete) - Get autocompletions for search +- [`libraryCancelRefresh`](docs/sdks/library/README.md#cancelrefresh) - Cancel section refresh +- [`libraryCleanBundles`](docs/sdks/library/README.md#cleanbundles) - Clean bundles +- [`libraryCollectionsAddCollectionItems`](docs/sdks/librarycollections/README.md#addcollectionitems) - Add items to a collection +- [`libraryCollectionsDeleteCollectionItem`](docs/sdks/librarycollections/README.md#deletecollectionitem) - Delete an item from a collection +- [`libraryCollectionsMoveCollectionItem`](docs/sdks/librarycollections/README.md#movecollectionitem) - Reorder an item in the collection +- [`libraryCreateMarker`](docs/sdks/library/README.md#createmarker) - Create a marker +- [`libraryDeleteCaches`](docs/sdks/library/README.md#deletecaches) - Delete library caches +- [`libraryDeleteCollection`](docs/sdks/library/README.md#deletecollection) - Delete a collection +- [`libraryDeleteIndexes`](docs/sdks/library/README.md#deleteindexes) - Delete section indexes +- [`libraryDeleteIntros`](docs/sdks/library/README.md#deleteintros) - Delete section intro markers +- [`libraryDeleteLibrarySection`](docs/sdks/library/README.md#deletelibrarysection) - Delete a library section +- [`libraryDeleteMarker`](docs/sdks/library/README.md#deletemarker) - Delete a marker +- [`libraryDeleteMediaItem`](docs/sdks/library/README.md#deletemediaitem) - Delete a media item +- [`libraryDeleteMetadataItem`](docs/sdks/library/README.md#deletemetadataitem) - Delete a metadata item +- [`libraryDeleteStream`](docs/sdks/library/README.md#deletestream) - Delete a stream +- [`libraryDetectAds`](docs/sdks/library/README.md#detectads) - Ad-detect an item +- [`libraryDetectCredits`](docs/sdks/library/README.md#detectcredits) - Credit detect a metadata item +- [`libraryDetectIntros`](docs/sdks/library/README.md#detectintros) - Intro detect an item +- [`libraryDetectVoiceActivity`](docs/sdks/library/README.md#detectvoiceactivity) - Detect voice activity +- [`libraryEditMarker`](docs/sdks/library/README.md#editmarker) - Edit a marker +- [`libraryEditMetadataItem`](docs/sdks/library/README.md#editmetadataitem) - Edit a metadata item +- [`libraryEditSection`](docs/sdks/library/README.md#editsection) - Edit a library section +- [`libraryEmptyTrash`](docs/sdks/library/README.md#emptytrash) - Empty section trash +- [`libraryGenerateThumbs`](docs/sdks/library/README.md#generatethumbs) - Generate thumbs of chapters for an item +- [`libraryGetAllItemLeaves`](docs/sdks/library/README.md#getallitemleaves) - Get the leaves of an item +- [`libraryGetAugmentationStatus`](docs/sdks/library/README.md#getaugmentationstatus) - Get augmentation status +- [`libraryGetAvailableSorts`](docs/sdks/library/README.md#getavailablesorts) - Get a section sorts +- [`libraryGetChapterImage`](docs/sdks/library/README.md#getchapterimage) - Get a chapter image +- [`libraryGetCollections`](docs/sdks/library/README.md#getcollections) - Get collections in a section +- [`libraryGetCommon`](docs/sdks/library/README.md#getcommon) - Get common fields for items +- [`libraryGetExtras`](docs/sdks/library/README.md#getextras) - Get an item's extras +- [`libraryGetFile`](docs/sdks/library/README.md#getfile) - Get a file from a metadata or media bundle +- [`libraryGetFirstCharacters`](docs/sdks/library/README.md#getfirstcharacters) - Get list of first characters +- [`libraryGetImageFromBif`](docs/sdks/library/README.md#getimagefrombif) - Get an image from part BIF +- [`libraryGetItemArtwork`](docs/sdks/library/README.md#getitemartwork) - Get an item's artwork, theme, etc +- [`libraryGetItemTree`](docs/sdks/library/README.md#getitemtree) - Get metadata items as a tree +- [`libraryGetLibraryDetails`](docs/sdks/library/README.md#getlibrarydetails) - Get a library section by id +- [`libraryGetLibraryItems`](docs/sdks/library/README.md#getlibraryitems) - Get all items in library +- [`libraryGetLibraryMatches`](docs/sdks/library/README.md#getlibrarymatches) - Get library matches +- [`libraryGetMediaPart`](docs/sdks/library/README.md#getmediapart) - Get a media part +- [`libraryGetPartIndex`](docs/sdks/library/README.md#getpartindex) - Get BIF index for a part +- [`libraryGetPerson`](docs/sdks/library/README.md#getperson) - Get person details +- [`libraryGetRandomArtwork`](docs/sdks/library/README.md#getrandomartwork) - Get random artwork +- [`libraryGetRelatedItems`](docs/sdks/library/README.md#getrelateditems) - Get related items +- [`libraryGetSectionFilters`](docs/sdks/library/README.md#getsectionfilters) - Get section filters +- [`libraryGetSectionImage`](docs/sdks/library/README.md#getsectionimage) - Get a section composite image +- [`libraryGetSectionPreferences`](docs/sdks/library/README.md#getsectionpreferences) - Get section prefs +- [`libraryGetSections`](docs/sdks/library/README.md#getsections) - Get library sections (main Media Provider Only) +- [`libraryGetSectionsPrefs`](docs/sdks/library/README.md#getsectionsprefs) - Get section prefs +- [`libraryGetStream`](docs/sdks/library/README.md#getstream) - Get a stream +- [`libraryGetStreamLevels`](docs/sdks/library/README.md#getstreamlevels) - Get loudness about a stream in json +- [`libraryGetStreamLoudness`](docs/sdks/library/README.md#getstreamloudness) - Get loudness about a stream +- [`libraryGetTags`](docs/sdks/library/README.md#gettags) - Get all library tags of a type +- [`libraryIngestTransientItem`](docs/sdks/library/README.md#ingesttransientitem) - Ingest a transient item +- [`libraryListMatches`](docs/sdks/library/README.md#listmatches) - Get metadata matches for an item +- [`libraryListPersonMedia`](docs/sdks/library/README.md#listpersonmedia) - Get media for a person +- [`libraryListSimilar`](docs/sdks/library/README.md#listsimilar) - Get similar items +- [`libraryListSonicallySimilar`](docs/sdks/library/README.md#listsonicallysimilar) - Get nearest tracks to metadata item +- [`libraryListTopUsers`](docs/sdks/library/README.md#listtopusers) - Get metadata top users +- [`libraryMatchItem`](docs/sdks/library/README.md#matchitem) - Match a metadata item +- [`libraryMergeItems`](docs/sdks/library/README.md#mergeitems) - Merge a metadata item +- [`libraryOptimizeDatabase`](docs/sdks/library/README.md#optimizedatabase) - Optimize the Database +- [`libraryPlaylistsAddPlaylistItems`](docs/sdks/libraryplaylists/README.md#addplaylistitems) - Adding to a Playlist +- [`libraryPlaylistsClearPlaylistItems`](docs/sdks/libraryplaylists/README.md#clearplaylistitems) - Clearing a playlist +- [`libraryPlaylistsCreatePlaylist`](docs/sdks/libraryplaylists/README.md#createplaylist) - Create a Playlist +- [`libraryPlaylistsDeletePlaylist`](docs/sdks/libraryplaylists/README.md#deleteplaylist) - Delete a Playlist +- [`libraryPlaylistsDeletePlaylistItem`](docs/sdks/libraryplaylists/README.md#deleteplaylistitem) - Delete a Generator +- [`libraryPlaylistsGetPlaylistGenerator`](docs/sdks/libraryplaylists/README.md#getplaylistgenerator) - Get a playlist generator +- [`libraryPlaylistsGetPlaylistGeneratorItems`](docs/sdks/libraryplaylists/README.md#getplaylistgeneratoritems) - Get a playlist generator's items +- [`libraryPlaylistsGetPlaylistGenerators`](docs/sdks/libraryplaylists/README.md#getplaylistgenerators) - Get a playlist's generators +- [`libraryPlaylistsModifyPlaylistGenerator`](docs/sdks/libraryplaylists/README.md#modifyplaylistgenerator) - Modify a Generator +- [`libraryPlaylistsMovePlaylistItem`](docs/sdks/libraryplaylists/README.md#moveplaylistitem) - Moving items in a playlist +- [`libraryPlaylistsRefreshPlaylist`](docs/sdks/libraryplaylists/README.md#refreshplaylist) - Reprocess a generator +- [`libraryPlaylistsUpdatePlaylist`](docs/sdks/libraryplaylists/README.md#updateplaylist) - Editing a Playlist +- [`libraryPlaylistsUploadPlaylist`](docs/sdks/libraryplaylists/README.md#uploadplaylist) - Upload +- [`libraryRefreshItemsMetadata`](docs/sdks/library/README.md#refreshitemsmetadata) - Refresh a metadata item +- [`libraryRefreshSection`](docs/sdks/library/README.md#refreshsection) - Refresh section +- [`libraryRefreshSectionsMetadata`](docs/sdks/library/README.md#refreshsectionsmetadata) - Refresh all sections +- [`librarySetItemArtwork`](docs/sdks/library/README.md#setitemartwork) - Set an item's artwork, theme, etc +- [`librarySetItemPreferences`](docs/sdks/library/README.md#setitempreferences) - Set metadata preferences +- [`librarySetSectionPreferences`](docs/sdks/library/README.md#setsectionpreferences) - Set section prefs +- [`librarySetStreamOffset`](docs/sdks/library/README.md#setstreamoffset) - Set a stream offset +- [`librarySetStreamSelection`](docs/sdks/library/README.md#setstreamselection) - Set stream selection +- [`librarySplitItem`](docs/sdks/library/README.md#splititem) - Split a metadata item +- [`libraryStartAnalysis`](docs/sdks/library/README.md#startanalysis) - Analyze a section +- [`libraryStartBifGeneration`](docs/sdks/library/README.md#startbifgeneration) - Start BIF generation of an item +- [`libraryStopAllRefreshes`](docs/sdks/library/README.md#stopallrefreshes) - Stop refresh +- [`libraryUnmatch`](docs/sdks/library/README.md#unmatch) - Unmatch a metadata item +- [`libraryUpdateItemArtwork`](docs/sdks/library/README.md#updateitemartwork) - Set an item's artwork, theme, etc +- [`libraryUpdateItems`](docs/sdks/library/README.md#updateitems) - Set the fields of the filtered items +- [`liveTVGetLiveTVSession`](docs/sdks/livetv/README.md#getlivetvsession) - Get a single session +- [`liveTVGetSessionPlaylistIndex`](docs/sdks/livetv/README.md#getsessionplaylistindex) - Get a session playlist index +- [`liveTVGetSessions`](docs/sdks/livetv/README.md#getsessions) - Get all sessions +- [`liveTVGetSessionSegment`](docs/sdks/livetv/README.md#getsessionsegment) - Get a single session segment +- [`logEnablePapertrail`](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail +- [`logWriteLog`](docs/sdks/log/README.md#writelog) - Logging a multi-line message to the Plex Media Server log +- [`logWriteMessage`](docs/sdks/log/README.md#writemessage) - Logging a single-line message to the Plex Media Server log +- [`playlistGetPlaylist`](docs/sdks/playlist/README.md#getplaylist) - Retrieve Playlist +- [`playlistGetPlaylistItems`](docs/sdks/playlist/README.md#getplaylistitems) - Retrieve Playlist Contents +- [`playlistListPlaylists`](docs/sdks/playlist/README.md#listplaylists) - List playlists +- [`playQueueAddToPlayQueue`](docs/sdks/playqueue/README.md#addtoplayqueue) - Add a generator or playlist to a play queue +- [`playQueueClearPlayQueue`](docs/sdks/playqueue/README.md#clearplayqueue) - Clear a play queue +- [`playQueueCreatePlayQueue`](docs/sdks/playqueue/README.md#createplayqueue) - Create a play queue +- [`playQueueDeletePlayQueueItem`](docs/sdks/playqueue/README.md#deleteplayqueueitem) - Delete an item from a play queue +- [`playQueueGetPlayQueue`](docs/sdks/playqueue/README.md#getplayqueue) - Retrieve a play queue +- [`playQueueMovePlayQueueItem`](docs/sdks/playqueue/README.md#moveplayqueueitem) - Move an item in a play queue +- [`playQueueResetPlayQueue`](docs/sdks/playqueue/README.md#resetplayqueue) - Reset a play queue +- [`playQueueShuffle`](docs/sdks/playqueue/README.md#shuffle) - Shuffle a play queue +- [`playQueueUnshuffle`](docs/sdks/playqueue/README.md#unshuffle) - Unshuffle a play queue +- [`preferencesGetAllPreferences`](docs/sdks/preferences/README.md#getallpreferences) - Get all preferences +- [`preferencesGetPreference`](docs/sdks/preferences/README.md#getpreference) - Get a preferences +- [`preferencesSetPreferences`](docs/sdks/preferences/README.md#setpreferences) - Set preferences +- [`providerAddProvider`](docs/sdks/provider/README.md#addprovider) - Add a media provider +- [`providerDeleteMediaProvider`](docs/sdks/provider/README.md#deletemediaprovider) - Delete a media provider +- [`providerListProviders`](docs/sdks/provider/README.md#listproviders) - Get the list of available media providers +- [`providerRefreshProviders`](docs/sdks/provider/README.md#refreshproviders) - Refresh media providers +- [`rateSetRating`](docs/sdks/rate/README.md#setrating) - Rate an item +- [`searchSearchHubs`](docs/sdks/search/README.md#searchhubs) - Search Hub +- [`searchVoiceSearchHubs`](docs/sdks/search/README.md#voicesearchhubs) - Voice Search Hub +- [`statusDeleteHistory`](docs/sdks/status/README.md#deletehistory) - Delete Single History Item +- [`statusGetBackgroundTasks`](docs/sdks/status/README.md#getbackgroundtasks) - Get background tasks +- [`statusGetHistoryItem`](docs/sdks/status/README.md#gethistoryitem) - Get Single History Item +- [`statusListPlaybackHistory`](docs/sdks/status/README.md#listplaybackhistory) - List Playback History +- [`statusListSessions`](docs/sdks/status/README.md#listsessions) - List Sessions +- [`statusTerminateSession`](docs/sdks/status/README.md#terminatesession) - Terminate a session +- [`subscriptionsCancelGrab`](docs/sdks/subscriptions/README.md#cancelgrab) - Cancel an existing grab +- [`subscriptionsCreateSubscription`](docs/sdks/subscriptions/README.md#createsubscription) - Create a subscription +- [`subscriptionsDeleteSubscription`](docs/sdks/subscriptions/README.md#deletesubscription) - Delete a subscription +- [`subscriptionsEditSubscriptionPreferences`](docs/sdks/subscriptions/README.md#editsubscriptionpreferences) - Edit a subscription +- [`subscriptionsGetAllSubscriptions`](docs/sdks/subscriptions/README.md#getallsubscriptions) - Get all subscriptions +- [`subscriptionsGetScheduledRecordings`](docs/sdks/subscriptions/README.md#getscheduledrecordings) - Get all scheduled recordings +- [`subscriptionsGetSubscription`](docs/sdks/subscriptions/README.md#getsubscription) - Get a single subscription +- [`subscriptionsGetTemplate`](docs/sdks/subscriptions/README.md#gettemplate) - Get the subscription template +- [`subscriptionsProcessSubscriptions`](docs/sdks/subscriptions/README.md#processsubscriptions) - Process all subscriptions +- [`subscriptionsReorderSubscription`](docs/sdks/subscriptions/README.md#reordersubscription) - Re-order a subscription +- [`timelineMarkPlayed`](docs/sdks/timeline/README.md#markplayed) - Mark an item as played +- [`timelineReport`](docs/sdks/timeline/README.md#report) - Report media timeline +- [`timelineUnscrobble`](docs/sdks/timeline/README.md#unscrobble) - Mark an item as unplayed +- [`transcoderMakeDecision`](docs/sdks/transcoder/README.md#makedecision) - Make a decision on media playback +- [`transcoderStartTranscodeSession`](docs/sdks/transcoder/README.md#starttranscodesession) - Start A Transcoding Session +- [`transcoderTranscodeImage`](docs/sdks/transcoder/README.md#transcodeimage) - Transcode an image +- [`transcoderTranscodeSubtitles`](docs/sdks/transcoder/README.md#transcodesubtitles) - Transcode subtitles +- [`transcoderTriggerFallback`](docs/sdks/transcoder/README.md#triggerfallback) - Manually trigger a transcoder fallback +- [`ultraBlurGetColors`](docs/sdks/ultrablur/README.md#getcolors) - Get UltraBlur Colors +- [`ultraBlurGetImage`](docs/sdks/ultrablur/README.md#getimage) - Get UltraBlur Image +- [`updaterApplyUpdates`](docs/sdks/updater/README.md#applyupdates) - Applying updates +- [`updaterCheckUpdates`](docs/sdks/updater/README.md#checkupdates) - Checking for updates +- [`updaterGetUpdatesStatus`](docs/sdks/updater/README.md#getupdatesstatus) - Querying status of updates
@@ -776,16 +953,12 @@ Certain SDK methods accept files as part of a multi-part request. It is possible ```typescript import { PlexAPI } from "@lukehagar/plexjs"; +import { openAsBlob } from "node:fs"; -const plexAPI = new PlexAPI({ - accessToken: "", -}); +const plexAPI = new PlexAPI(); async function run() { - const result = await plexAPI.library.postMediaArts( - 2268, - "https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b", - ); + const result = await plexAPI.log.writeLog(await openAsBlob("example.file")); console.log(result); } @@ -805,11 +978,20 @@ 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: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.server.getServerCapabilities({ + const result = await plexAPI.general.getServerInfo({}, { retries: { strategy: "backoff", backoff: { @@ -844,11 +1026,20 @@ const plexAPI = new PlexAPI({ }, retryConnectionErrors: false, }, - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.server.getServerCapabilities(); + const result = await plexAPI.general.getServerInfo({}); console.log(result); } diff --git a/RELEASES.md b/RELEASES.md index 54584b8e..cbf0da08 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1398,4 +1398,14 @@ Based on: ### Generated - [typescript v0.40.3] . ### Releases -- [NPM v0.40.3] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.40.3 - . \ No newline at end of file +- [NPM v0.40.3] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.40.3 - . + +## 2025-10-12 05:24:41 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.636.3 (2.723.11) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.41.0] . +### Releases +- [NPM v0.41.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.41.0 - . \ No newline at end of file diff --git a/RUNTIMES.md b/RUNTIMES.md index db7ea942..27731c3b 100644 --- a/RUNTIMES.md +++ b/RUNTIMES.md @@ -2,9 +2,9 @@ This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features: -* [Web Fetch API][web-fetch] -* [Web Streams API][web-streams] and in particular `ReadableStream` -* [Async iterables][async-iter] using `Symbol.asyncIterator` +- [Web Fetch API][web-fetch] +- [Web Streams API][web-streams] and in particular `ReadableStream` +- [Async iterables][async-iter] using `Symbol.asyncIterator` [web-fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API [web-streams]: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API @@ -25,7 +25,7 @@ Runtime environments that are explicitly supported are: The following `tsconfig.json` options are recommended for projects using this SDK in order to get static type support for features like async iterables, -streams and `fetch`-related APIs ([`for await...of`][for-await-of], +streams and `fetch`-related APIs ([`for await...of`][for-await-of], [`AbortSignal`][abort-signal], [`Request`][request], [`Response`][response] and so on): @@ -38,11 +38,11 @@ so on): { "compilerOptions": { "target": "es2020", // or higher - "lib": ["es2020", "dom", "dom.iterable"], + "lib": ["es2020", "dom", "dom.iterable"] } } ``` While `target` can be set to older ECMAScript versions, it may result in extra, unnecessary compatibility code being generated if you are not targeting old -runtimes. \ No newline at end of file +runtimes. diff --git a/USAGE.md b/USAGE.md index e9a6d6d3..e7c85eba 100644 --- a/USAGE.md +++ b/USAGE.md @@ -3,11 +3,20 @@ import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.server.getServerCapabilities(); + const result = await plexAPI.general.getServerInfo({}); console.log(result); } diff --git a/codeSamples.yaml b/codeSamples.yaml index cc784b8b..7b6c30a2 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -12,11 +12,48 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.server.getServerCapabilities(); + const result = await plexAPI.general.getServerInfo({}); + + console.log(result); + } + + run(); + - target: $["paths"]["/:/eventsource/notifications"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.events.getNotifications({}); console.log(result); } @@ -30,18 +67,16 @@ actions: source: |- import { PlexAPI } from "@lukehagar/plexjs"; - const plexAPI = new PlexAPI({ - accessToken: "", - }); + const plexAPI = new PlexAPI(); async function run() { - const result = await plexAPI.server.getServerPreferences(); + const result = await plexAPI.preferences.getAllPreferences(); console.log(result); } run(); - - target: $["paths"]["/:/progress"]["post"] + - target: $["paths"]["/:/prefs"]["put"] update: x-codeSamples: - lang: typescript @@ -50,67 +85,28 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.media.updatePlayProgress("", 90000, "played"); - - console.log(result); - } - - run(); - - target: $["paths"]["/:/scrobble"]["get"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.media.markPlayed(59398); - - console.log(result); - } - - run(); - - target: $["paths"]["/:/timeline"]["get"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { State } from "@lukehagar/plexjs/sdk/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.video.getTimeline({ - 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, + const result = await plexAPI.preferences.setPreferences({ + prefs: {}, }); console.log(result); } run(); - - target: $["paths"]["/:/unscrobble"]["get"] + - target: $["paths"]["/:/prefs/get"]["get"] update: x-codeSamples: - lang: typescript @@ -119,11 +115,185 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.media.markUnplayed(59398); + const result = await plexAPI.preferences.getPreference({}); + + console.log(result); + } + + run(); + - target: $["paths"]["/:/rate"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.rate.setRating({ + identifier: "", + key: "", + rating: 8722.46, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/:/scrobble"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.timeline.markPlayed({ + identifier: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/:/timeline"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { ReportState } from "@lukehagar/plexjs/sdk/models/operations"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.timeline.report({ + key: "/foo", + ratingKey: "xyz", + state: ReportState.Playing, + playQueueItemID: "123", + time: 0, + duration: 10000, + continuing: BoolInt.One, + updated: 14200000, + offline: BoolInt.One, + timeToFirstFrame: 1000, + timeStalled: 1000, + bandwidth: 100, + bufferedTime: 100, + bufferedSize: 1024, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/:/unscrobble"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.timeline.unscrobble({ + identifier: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/:/websocket/notifications"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.events.connectWebSocket({}); console.log(result); } @@ -137,18 +307,16 @@ actions: source: |- import { PlexAPI } from "@lukehagar/plexjs"; - const plexAPI = new PlexAPI({ - accessToken: "", - }); + const plexAPI = new PlexAPI(); async function run() { - const result = await plexAPI.activities.getServerActivities(); + const result = await plexAPI.activities.listActivities(); console.log(result); } run(); - - target: $["paths"]["/activities/{activityUUID}"]["delete"] + - target: $["paths"]["/activities/{activityId}"]["delete"] update: x-codeSamples: - lang: typescript @@ -157,11 +325,22 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.activities.cancelServerActivities("25b71ed5-0f9d-461c-baa7-d404e9e10d3e"); + const result = await plexAPI.activities.cancelActivity({ + activityId: "d6199ba1-fb5e-4cae-bf17-1a5369c1cf1e", + }); console.log(result); } @@ -175,12 +354,10 @@ actions: source: |- import { PlexAPI } from "@lukehagar/plexjs"; - const plexAPI = new PlexAPI({ - accessToken: "", - }); + const plexAPI = new PlexAPI(); async function run() { - const result = await plexAPI.butler.stopAllTasks(); + const result = await plexAPI.butler.stopTasks(); console.log(result); } @@ -194,12 +371,10 @@ actions: source: |- import { PlexAPI } from "@lukehagar/plexjs"; - const plexAPI = new PlexAPI({ - accessToken: "", - }); + const plexAPI = new PlexAPI(); async function run() { - const result = await plexAPI.butler.getButlerTasks(); + const result = await plexAPI.butler.getTasks(); console.log(result); } @@ -213,134 +388,78 @@ actions: source: |- import { PlexAPI } from "@lukehagar/plexjs"; - const plexAPI = new PlexAPI({ - accessToken: "", - }); + const plexAPI = new PlexAPI(); async function run() { - const result = await plexAPI.butler.startAllTasks(); + const result = await plexAPI.butler.startTasks(); console.log(result); } run(); - - target: $["paths"]["/butler/{taskName}"]["delete"] + - target: $["paths"]["/butler/{task}"]["delete"] update: x-codeSamples: - lang: typescript label: PlexJS source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { PathParamTaskName } from "@lukehagar/plexjs/sdk/models/operations"; + import { StopTaskTask } from "@lukehagar/plexjs/sdk/models/operations"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.butler.stopTask(PathParamTaskName.CleanOldCacheFiles); + const result = await plexAPI.butler.stopTask({ + task: StopTaskTask.CleanOldBundles, + }); console.log(result); } run(); - - target: $["paths"]["/butler/{taskName}"]["post"] + - target: $["paths"]["/butler/{task}"]["post"] update: x-codeSamples: - lang: typescript label: PlexJS source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { TaskName } from "@lukehagar/plexjs/sdk/models/operations"; + import { StartTaskTask } from "@lukehagar/plexjs/sdk/models/operations"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.butler.startTask(TaskName.RefreshPeriodicMetadata); + const result = await plexAPI.butler.startTask({ + task: StartTaskTask.RefreshLocalMedia, + }); console.log(result); } run(); - - target: $["paths"]["/clients"]["get"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.server.getAvailableClients(); - - console.log(result); - } - - run(); - - target: $["paths"]["/companions"]["get"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.plex.getCompanionsData(); - - console.log(result); - } - - run(); - - target: $["paths"]["/devices"]["get"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.server.getDevices(); - - console.log(result); - } - - run(); - - target: $["paths"]["/friends"]["get"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.plex.getUserFriends(); - - console.log(result); - } - - run(); - - target: $["paths"]["/geoip"]["get"] + - target: $["paths"]["/downloadQueue"]["post"] update: x-codeSamples: - lang: typescript @@ -351,13 +470,13 @@ actions: const plexAPI = new PlexAPI(); async function run() { - const result = await plexAPI.plex.getGeoData(); + const result = await plexAPI.downloadQueue.createDownloadQueue(); console.log(result); } run(); - - target: $["paths"]["/home"]["get"] + - target: $["paths"]["/downloadQueue/{queueId}"]["get"] update: x-codeSamples: - lang: typescript @@ -366,11 +485,279 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.plex.getHomeData(); + const result = await plexAPI.downloadQueue.getDownloadQueue({ + queueId: 922802, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/downloadQueue/{queueId}/add"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { AdvancedSubtitles, BoolInt, LocationParameter, Protocol } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.downloadQueue.addDownloadQueueItems({ + queueId: 984925, + keys: [ + "/library/metadata/3", + "/library/metadata/6", + ], + advancedSubtitles: AdvancedSubtitles.Burn, + audioBoost: 50, + audioChannelCount: 5, + autoAdjustQuality: BoolInt.One, + autoAdjustSubtitle: BoolInt.One, + directPlay: BoolInt.One, + directStream: BoolInt.One, + directStreamAudio: BoolInt.One, + disableResolutionRotation: BoolInt.One, + hasMDE: BoolInt.One, + location: LocationParameter.Wan, + mediaBufferSize: 102400, + mediaIndex: 0, + musicBitrate: 5000, + offset: 90.5, + partIndex: 0, + path: "/library/metadata/151671", + peakBitrate: 12000, + photoResolution: "1080x1080", + protocol: Protocol.Dash, + secondsPerSegment: 5, + subtitleSize: 50, + videoBitrate: 12000, + videoQuality: 50, + videoResolution: "1080x1080", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/downloadQueue/{queueId}/item/{itemId}/decision"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.downloadQueue.getItemDecision({ + queueId: 231605, + itemId: 32, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/downloadQueue/{queueId}/item/{itemId}/media"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.downloadQueue.getDownloadQueueMedia({ + queueId: 663184, + itemId: 32, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/downloadQueue/{queueId}/items"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.downloadQueue.listDownloadQueueItems({ + queueId: 524138, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/downloadQueue/{queueId}/items/{itemId}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.downloadQueue.removeDownloadQueueItems({ + queueId: 946275, + itemId: [ + 32, + 345, + 23, + ], + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/downloadQueue/{queueId}/items/{itemId}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.downloadQueue.getDownloadQueueItems({ + queueId: 809886, + itemId: [ + 32, + 345, + 23, + ], + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/downloadQueue/{queueId}/items/{itemId}/restart"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.downloadQueue.restartProcessingDownloadQueueItems({ + queueId: 713001, + itemId: [ + 32, + 345, + 23, + ], + }); console.log(result); } @@ -383,42 +770,215 @@ actions: label: PlexJS source: |- import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.hubs.getGlobalHubs(); + const result = await plexAPI.hubs.getAllHubs({ + onlyTransient: BoolInt.One, + }); console.log(result); } run(); - - target: $["paths"]["/hubs/home/recentlyAdded"]["get"] + - target: $["paths"]["/hubs/continueWatching"]["get"] update: x-codeSamples: - lang: typescript label: PlexJS source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { IncludeMeta, Type } from "@lukehagar/plexjs/sdk/models/operations"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.hubs.getRecentlyAdded({ - contentDirectoryID: 39486, - sectionID: 2, - type: Type.TvShow, - includeMeta: IncludeMeta.Enable, + const result = await plexAPI.hubs.getContinueWatching({}); + + console.log(result); + } + + run(); + - target: $["paths"]["/hubs/items"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.hubs.getHubItems({ + identifier: [ + "", + "", + "", + ], }); console.log(result); } + run(); + - target: $["paths"]["/hubs/metadata/{metadataId}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.hubs.getMetadataHubs({ + metadataId: 605482, + onlyTransient: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/hubs/metadata/{metadataId}/postplay"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.hubs.getPostplayHubs({ + metadataId: 441419, + onlyTransient: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/hubs/metadata/{metadataId}/related"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.hubs.getRelatedHubs({ + metadataId: 8858, + onlyTransient: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/hubs/promoted"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.hubs.getPromotedHubs({}); + + console.log(result); + } + run(); - target: $["paths"]["/hubs/search"]["get"] update: @@ -429,11 +989,23 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.search.performSearch("arnold"); + const result = await plexAPI.search.searchHubs({ + query: "", + sectionId: 1, + }); console.log(result); } @@ -448,11 +1020,22 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.search.performVoiceSearch("dead+poop"); + const result = await plexAPI.search.voiceSearchHubs({ + query: "", + }); console.log(result); } @@ -465,13 +1048,218 @@ actions: label: PlexJS source: |- import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.hubs.getLibraryHubs(492.74); + const result = await plexAPI.hubs.getSectionHubs({ + sectionId: 336924, + onlyTransient: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/hubs/sections/{sectionId}/manage"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.hubs.resetSectionDefaults({ + sectionId: 383022, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/hubs/sections/{sectionId}/manage"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.hubs.listHubs({ + sectionId: 442546, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/hubs/sections/{sectionId}/manage"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.hubs.createCustomHub({ + sectionId: 869922, + metadataItemId: 703843, + promotedToRecommended: BoolInt.One, + promotedToOwnHome: BoolInt.One, + promotedToSharedHome: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/hubs/sections/{sectionId}/manage/move"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.hubs.moveHub({ + sectionId: 755710, + identifier: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/hubs/sections/{sectionId}/manage/{identifier}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.hubs.deleteCustomHub({ + sectionId: 625677, + identifier: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/hubs/sections/{sectionId}/manage/{identifier}"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.hubs.updateHubVisibility({ + sectionId: 341650, + identifier: "", + promotedToRecommended: BoolInt.One, + promotedToOwnHome: BoolInt.One, + promotedToSharedHome: BoolInt.One, + }); console.log(result); } @@ -488,33 +1276,13 @@ actions: const plexAPI = new PlexAPI(); async function run() { - const result = await plexAPI.server.getServerIdentity(); + const result = await plexAPI.general.getIdentity(); console.log(result); } run(); - - target: $["paths"]["/library/all/top"]["get"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { GetTopWatchedContentQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.library.getTopWatchedContent(GetTopWatchedContentQueryParamType.TvShow); - - console.log(result); - } - - run(); - - target: $["paths"]["/library/hashes"]["get"] + - target: $["paths"]["/library/all"]["get"] update: x-codeSamples: - lang: typescript @@ -523,17 +1291,60 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.library.getFileHash("file://C:\\Image.png&type=13"); + const result = await plexAPI.library.getLibraryItems({}); console.log(result); } run(); - - target: $["paths"]["/library/metadata/{ratingKey}"]["get"] + - target: $["paths"]["/library/caches"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI(); + + async function run() { + const result = await plexAPI.library.deleteCaches(); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/clean/bundles"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI(); + + async function run() { + const result = await plexAPI.library.cleanBundles(); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/collections"]["post"] update: x-codeSamples: - lang: typescript @@ -542,32 +1353,28 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.library.getMediaMetaData({ - ratingKey: "21119,21617", - includeConcerts: true, - includeExtras: true, - includeOnDeck: true, - includePopularLeaves: true, - includePreferences: true, - includeReviews: true, - includeChapters: true, - includeStations: true, - includeExternalMedia: true, - asyncAugmentMetadata: true, - asyncCheckFiles: true, - asyncRefreshAnalysis: true, - asyncRefreshLocalMediaAgent: true, + const result = await plexAPI.collections.createCollection({ + sectionId: "", }); console.log(result); } run(); - - target: $["paths"]["/library/metadata/{ratingKey}/arts"]["get"] + - target: $["paths"]["/library/collections/{collectionId}/composite/{updatedAt}"]["get"] update: x-codeSamples: - lang: typescript @@ -576,62 +1383,29 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.library.getMediaArts(16099); - - console.log(result); - } - - run(); - - target: $["paths"]["/library/metadata/{ratingKey}/arts"]["post"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.library.postMediaArts(2268, "https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b"); - - console.log(result); - } - - run(); - - target: $["paths"]["/library/metadata/{ratingKey}/banner"]["get"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.media.getBannerImage({ - ratingKey: 9518, - width: 396, - height: 396, - minSize: 1, - upscale: 1, - xPlexToken: "CV5xoxjTpFKUzBTShsaf", + const result = await plexAPI.content.getCollectionImage({ + collectionId: 474227, + updatedAt: 759379, }); console.log(result); } run(); - - target: $["paths"]["/library/metadata/{ratingKey}/children"]["get"] + - target: $["paths"]["/library/collections/{collectionId}/items"]["get"] update: x-codeSamples: - lang: typescript @@ -640,152 +1414,1636 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.library.getMetadataChildren(2403.67, "Stream"); - - console.log(result); - } - - run(); - - target: $["paths"]["/library/metadata/{ratingKey}/posters"]["get"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.library.getMediaPosters(16099); - - console.log(result); - } - - run(); - - target: $["paths"]["/library/metadata/{ratingKey}/posters"]["post"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.library.postMediaPoster(2268, "https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b"); - - console.log(result); - } - - run(); - - target: $["paths"]["/library/metadata/{ratingKey}/thumb"]["get"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.media.getThumbImage({ - ratingKey: 9518, - width: 396, - height: 396, - minSize: 1, - upscale: 1, - xPlexToken: "CV5xoxjTpFKUzBTShsaf", + const result = await plexAPI.content.getCollectionItems({ + collectionId: 314585, }); console.log(result); } run(); - - target: $["paths"]["/library/recentlyAdded"]["get"] + - target: $["paths"]["/library/collections/{collectionId}/items"]["put"] update: x-codeSamples: - lang: typescript label: PlexJS source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { QueryParamIncludeMeta, QueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.library.getRecentlyAddedLibrary({ - contentDirectoryID: 2, - pinnedContentDirectoryID: [ - 3, + const result = await plexAPI.libraryCollections.addCollectionItems({ + collectionId: 338144, + uri: "https://expensive-bakeware.com", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/collections/{collectionId}/items/{itemId}"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.libraryCollections.deleteCollectionItem({ + collectionId: 320928, + itemId: 406983, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/collections/{collectionId}/items/{itemId}/move"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.libraryCollections.moveCollectionItem({ + collectionId: 239532, + itemId: 513864, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/file"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.ingestTransientItem({ + url: "file:///storage%2Femulated%2F0%2FArcher-S01E01.mkv", + virtualFilePath: "/Avatar.mkv", + computeHashes: BoolInt.One, + ingestNonMatches: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/matches"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getLibraryMatches({ + includeFullMetadata: BoolInt.One, + includeAncestorMetadata: BoolInt.One, + includeAlternateMetadataSources: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/media/{mediaId}/chapterImages/{chapter}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getChapterImage({ + mediaId: 892563, + chapter: 48348, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/augmentations/{augmentationId}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getAugmentationStatus({ + augmentationId: "", + wait: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.deleteMetadataItem({ + ids: "", + proxy: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.content.getMetadataItem({ + ids: [], + asyncCheckFiles: BoolInt.One, + asyncRefreshLocalMediaAgent: BoolInt.One, + asyncRefreshAnalysis: BoolInt.One, + checkFiles: BoolInt.One, + skipRefresh: BoolInt.One, + checkFileAvailability: BoolInt.One, + asyncAugmentMetadata: BoolInt.One, + augmentCount: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.editMetadataItem({ + ids: [ + "", + "", + ], + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/addetect"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.detectAds({ + ids: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/allLeaves"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getAllItemLeaves({ + ids: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/analyze"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.analyzeMetadata({ + ids: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/chapterThumbs"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.generateThumbs({ + ids: "", + force: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/credits"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.detectCredits({ + ids: "", + force: BoolInt.One, + manual: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/extras"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getExtras({ + ids: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/extras"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.addExtras({ + ids: "", + url: "https://super-mortise.biz/", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/file"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getFile({ + ids: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/index"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.startBifGeneration({ + ids: "", + force: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/intro"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.detectIntros({ + ids: "", + force: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/marker"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.createMarker({ + ids: "", + type: 248391, + startTimeOffset: 535191, + attributes: {}, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/marker/{marker}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.deleteMarker({ + ids: "", + marker: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/marker/{marker}"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.editMarker({ + ids: "", + marker: "", + type: 884347, + startTimeOffset: 517251, + attributes: {}, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/match"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.matchItem({ + ids: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/matches"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.listMatches({ + ids: "", + manual: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/media/{mediaItem}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.deleteMediaItem({ + ids: "", + mediaItem: "", + proxy: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/merge"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.mergeItems({ + idsPathParameter: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/nearest"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.listSonicallySimilar({ + ids: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/prefs"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.setItemPreferences({ + ids: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/refresh"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.refreshItemsMetadata({ + ids: "", + markUpdated: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/related"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getRelatedItems({ + ids: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/similar"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.listSimilar({ + ids: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/split"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.splitItem({ + ids: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/subtitles"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.addSubtitles({ + ids: "", + forced: BoolInt.One, + hearingImpaired: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/tree"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getItemTree({ + ids: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/unmatch"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.unmatch({ + ids: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/users/top"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.listTopUsers({ + ids: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/voiceActivity"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.detectVoiceActivity({ + ids: "", + force: BoolInt.One, + manual: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/{element}"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { SetItemArtworkElement } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.setItemArtwork({ + ids: "", + element: SetItemArtworkElement.Banner, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/{element}"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { UpdateItemArtworkElement } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.updateItemArtwork({ + ids: "", + element: UpdateItemArtworkElement.ClearLogo, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/metadata/{ids}/{element}/{timestamp}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { GetItemArtworkElement } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getItemArtwork({ + ids: "", + element: GetItemArtworkElement.Poster, + timestamp: 999555, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/optimize"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.optimizeDatabase({ + async: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/parts/{partId}"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.setStreamSelection({ + partId: 360489, + allParts: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/parts/{partId}/indexes/{index}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { GetPartIndexIndex } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getPartIndex({ + partId: 724750, + index: GetPartIndexIndex.Sd, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/parts/{partId}/indexes/{index}/{offset}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { GetImageFromBifIndex } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getImageFromBif({ + partId: 304273, + index: GetImageFromBifIndex.Sd, + offset: 939569, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/parts/{partId}/{changestamp}/{filename}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getMediaPart({ + partId: 877105, + changestamp: 970622, + filename: "example.file", + download: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/people/{personId}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getPerson({ + personId: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/people/{personId}/media"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.listPersonMedia({ + personId: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/randomArtwork"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getRandomArtwork({ + sections: [ 5, - 7, - 13, - 12, - 1, 6, - 14, - 2, - 10, - 16, - 17, ], - sectionID: 2, - type: QueryParamType.TvShow, - includeMeta: QueryParamIncludeMeta.Enable, }); console.log(result); } run(); - - target: $["paths"]["/library/search"]["get"] + - target: $["paths"]["/library/sections/all"]["get"] update: x-codeSamples: - lang: typescript label: PlexJS source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { - GetSearchAllLibrariesQueryParamIncludeCollections, - GetSearchAllLibrariesQueryParamIncludeExternalMedia, - SearchTypes, - } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI(); + + async function run() { + const result = await plexAPI.library.getSections(); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/all"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.library.getSearchAllLibraries({ - query: "", - clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", - searchTypes: [ - SearchTypes.People, + const result = await plexAPI.library.addSection({ + name: "", + type: 39544, + agent: "", + language: "", + locations: [ + "O:\fatboy\\Media\\Ripped\\Music", + "O:\fatboy\\Media\\My Music", ], - includeCollections: GetSearchAllLibrariesQueryParamIncludeCollections.Enable, - includeExternalMedia: GetSearchAllLibrariesQueryParamIncludeExternalMedia.Enable, + prefs: {}, + relative: BoolInt.One, + importFromiTunes: BoolInt.One, }); console.log(result); } run(); - - target: $["paths"]["/library/sections"]["get"] + - target: $["paths"]["/library/sections/all/refresh"]["delete"] update: x-codeSamples: - lang: typescript @@ -793,41 +3051,46 @@ actions: source: |- import { PlexAPI } from "@lukehagar/plexjs"; - const plexAPI = new PlexAPI({ - accessToken: "", - }); + const plexAPI = new PlexAPI(); async function run() { - const result = await plexAPI.library.getAllLibraries(); + const result = await plexAPI.library.stopAllRefreshes(); console.log(result); } run(); - - target: $["paths"]["/library/sections/watchlist/{filter}"]["get"] + - target: $["paths"]["/library/sections/prefs"]["get"] update: x-codeSamples: - lang: typescript label: PlexJS source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { Filter } from "@lukehagar/plexjs/sdk/models/operations"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.watchlist.getWatchList({ - filter: Filter.Released, - xPlexToken: "CV5xoxjTpFKUzBTShsaf", + const result = await plexAPI.library.getSectionsPrefs({ + type: 460221, }); console.log(result); } run(); - - target: $["paths"]["/library/sections/{sectionKey}"]["delete"] + - target: $["paths"]["/library/sections/refresh"]["post"] update: x-codeSamples: - lang: typescript @@ -836,216 +3099,1894 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.library.deleteLibrary(9518); + const result = await plexAPI.library.refreshSectionsMetadata({}); console.log(result); } run(); - - target: $["paths"]["/library/sections/{sectionKey}"]["get"] + - target: $["paths"]["/library/sections/{sectionId}"]["delete"] update: x-codeSamples: - lang: typescript label: PlexJS source: |- import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.library.getLibraryDetails(9518); - - console.log(result); - } - - run(); - - target: $["paths"]["/library/sections/{sectionKey}/actor"]["get"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { GetActorsLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.library.getActorsLibrary(9518, GetActorsLibraryQueryParamType.TvShow); - - console.log(result); - } - - run(); - - target: $["paths"]["/library/sections/{sectionKey}/all"]["get"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { - GetLibrarySectionsAllQueryParamIncludeMeta, - GetLibrarySectionsAllQueryParamType, - IncludeAdvanced, - QueryParamIncludeCollections, - QueryParamIncludeExternalMedia, - QueryParamIncludeGuids, - } from "@lukehagar/plexjs/sdk/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.library.getLibrarySectionsAll({ - sectionKey: 9518, - type: GetLibrarySectionsAllQueryParamType.TvShow, - includeMeta: GetLibrarySectionsAllQueryParamIncludeMeta.Enable, - includeGuids: QueryParamIncludeGuids.Enable, - includeAdvanced: IncludeAdvanced.Enable, - includeCollections: QueryParamIncludeCollections.Enable, - includeExternalMedia: QueryParamIncludeExternalMedia.Enable, + const result = await plexAPI.library.deleteLibrarySection({ + sectionId: "", + async: BoolInt.One, }); console.log(result); } run(); - - target: $["paths"]["/library/sections/{sectionKey}/country"]["get"] + - target: $["paths"]["/library/sections/{sectionId}"]["get"] update: x-codeSamples: - lang: typescript label: PlexJS source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { GetCountriesLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.library.getCountriesLibrary(9518, GetCountriesLibraryQueryParamType.TvShow); - - console.log(result); - } - - run(); - - target: $["paths"]["/library/sections/{sectionKey}/genre"]["get"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { GetGenresLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.library.getGenresLibrary(9518, GetGenresLibraryQueryParamType.TvShow); - - console.log(result); - } - - run(); - - target: $["paths"]["/library/sections/{sectionKey}/refresh"]["get"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { Force } from "@lukehagar/plexjs/sdk/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.library.getRefreshLibraryMetadata(9518, Force.Zero); - - console.log(result); - } - - run(); - - target: $["paths"]["/library/sections/{sectionKey}/search"]["get"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { GetSearchLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.library.getSearchLibrary(9518, GetSearchLibraryQueryParamType.TvShow); - - console.log(result); - } - - run(); - - target: $["paths"]["/library/sections/{sectionKey}/{tag}"]["get"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { - GetLibraryItemsQueryParamIncludeMeta, - GetLibraryItemsQueryParamType, - IncludeGuids, - Tag, - } from "@lukehagar/plexjs/sdk/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.library.getLibraryItems({ - tag: Tag.Newest, - includeGuids: IncludeGuids.Enable, - type: GetLibraryItemsQueryParamType.TvShow, - sectionKey: 9518, - includeMeta: GetLibraryItemsQueryParamIncludeMeta.Enable, + const result = await plexAPI.library.getLibraryDetails({ + sectionId: "", + includeDetails: BoolInt.One, }); console.log(result); } run(); - - target: $["paths"]["/log"]["get"] + - target: $["paths"]["/library/sections/{sectionId}"]["put"] update: x-codeSamples: - lang: typescript label: PlexJS source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { Level } from "@lukehagar/plexjs/sdk/models/operations"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.log.logLine(Level.Three, "Test log message", "Postman"); + const result = await plexAPI.library.editSection({ + sectionId: "", + agent: "", + locations: [ + "O:\fatboy\\Media\\Ripped\\Music", + "O:\fatboy\\Media\\My Music", + ], + prefs: {}, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/albums"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.content.getAlbums({ + sectionId: 817133, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/all"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.content.listContent({ + sectionId: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/all"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.updateItems({ + sectionId: "", + fieldLocked: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/allLeaves"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.content.getAllLeaves({ + sectionId: 633197, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/analyze"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.startAnalysis({ + sectionId: 158829, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/arts"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.content.getArts({ + sectionId: 859200, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/autocomplete"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.autocomplete({ + sectionId: 942007, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/categories"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.content.getCategories({ + sectionId: 21841, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/cluster"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.content.getCluster({ + sectionId: 138560, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/collection/{collectionId}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.deleteCollection({ + sectionId: 283619, + collectionId: 680895, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/collections"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getCollections({ + sectionId: 348838, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/common"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getCommon({ + sectionId: 298154, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/composite/{updatedAt}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getSectionImage({ + sectionId: 925611, + updatedAt: 117413, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/computePath"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.content.getSonicPath({ + sectionId: 914549, + startID: 629990, + endID: 687740, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/emptyTrash"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.emptyTrash({ + sectionId: 30052, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/filters"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getSectionFilters({ + sectionId: 380557, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/firstCharacters"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getFirstCharacters({ + sectionId: 3947, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/indexes"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.deleteIndexes({ + sectionId: 588437, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/intros"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.deleteIntros({ + sectionId: 498656, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/location"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.content.getFolders({ + sectionId: 892532, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/moment"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.content.listMoments({ + sectionId: 403239, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/nearest"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.content.getSonicallySimilar({ + sectionId: 525956, + values: [], + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/prefs"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getSectionPreferences({ + sectionId: 754869, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/prefs"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.setSectionPreferences({ + sectionId: 349936, + prefs: {}, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/refresh"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.cancelRefresh({ + sectionId: 326852, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/refresh"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.refreshSection({ + sectionId: 450300, + force: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/sections/{sectionId}/sorts"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getAvailableSorts({ + sectionId: 212498, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/streams/{streamId}.{ext}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.deleteStream({ + streamId: 841510, + ext: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/streams/{streamId}.{ext}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getStream({ + streamId: 314506, + ext: "", + autoAdjustSubtitle: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/streams/{streamId}.{ext}"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.setStreamOffset({ + streamId: 606295, + ext: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/streams/{streamId}/levels"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getStreamLevels({ + streamId: 447611, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/streams/{streamId}/loudness"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getStreamLoudness({ + streamId: 277271, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/library/tags"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.library.getTags({}); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/dvrs"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI(); + + async function run() { + const result = await plexAPI.dvRs.listDVRs(); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/dvrs"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.dvRs.createDVR({ + lineup: "lineup://tv.plex.providers.epg.onconnect/USA-HI51418-DEFAULT", + device: [ + "d", + "e", + "v", + "i", + "c", + "e", + "[", + "]", + "=", + "d", + "e", + "v", + "i", + "c", + "e", + ":", + "/", + "/", + "t", + "v", + ".", + "p", + "l", + "e", + "x", + ".", + "g", + "r", + "a", + "b", + "b", + "e", + "r", + "s", + ".", + "h", + "d", + "h", + "o", + "m", + "e", + "r", + "u", + "n", + "/", + "1", + "0", + "5", + "3", + "C", + "0", + "C", + "A", + ], + language: "eng", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/dvrs/{dvrId}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.dvRs.deleteDVR({ + dvrId: 855088, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/dvrs/{dvrId}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.dvRs.getDVR({ + dvrId: 973518, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/dvrs/{dvrId}/channels/{channel}/tune"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.dvRs.tuneChannel({ + dvrId: 834281, + channel: "2.1", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/dvrs/{dvrId}/devices/{deviceId}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.dvRs.removeDeviceFromDVR({ + dvrId: 945416, + deviceId: 260761, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/dvrs/{dvrId}/devices/{deviceId}"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.dvRs.addDeviceToDVR({ + dvrId: 334755, + deviceId: 852930, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/dvrs/{dvrId}/lineups"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.dvRs.deleteLineup({ + dvrId: 454470, + lineup: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/dvrs/{dvrId}/lineups"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.dvRs.addLineup({ + dvrId: 945235, + lineup: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/dvrs/{dvrId}/prefs"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.dvRs.setDVRPreferences({ + dvrId: 116357, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/dvrs/{dvrId}/reloadGuide"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.dvRs.stopDVRReload({ + dvrId: 348053, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/dvrs/{dvrId}/reloadGuide"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.dvRs.reloadGuide({ + dvrId: 140753, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/epg/channelmap"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.epg.computeChannelMap({ + device: "Mobile", + lineup: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/epg/channels"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.epg.getChannels({ + lineup: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/epg/countries"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI(); + + async function run() { + const result = await plexAPI.epg.getCountries(); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/epg/countries/{country}/{epgId}/lineups"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.epg.getCountriesLineups({ + country: "Malawi", + epgId: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/epg/countries/{country}/{epgId}/regions"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.epg.getCountryRegions({ + country: "Morocco", + epgId: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/epg/countries/{country}/{epgId}/regions/{region}/lineups"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.epg.listLineups({ + country: "Vanuatu", + epgId: "", + region: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/epg/languages"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI(); + + async function run() { + const result = await plexAPI.epg.getAllLanguages(); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/epg/lineup"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.epg.getLineup({ + device: "Desktop", + lineupGroup: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/epg/lineupchannels"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.epg.getLineupChannels({ + lineup: [ + "", + "", + ], + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/sessions"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI(); + + async function run() { + const result = await plexAPI.liveTV.getSessions(); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/sessions/{sessionId}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.liveTV.getLiveTVSession({ + sessionId: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/sessions/{sessionId}/{consumerId}/index.m3u8"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.liveTV.getSessionPlaylistIndex({ + sessionId: "", + consumerId: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/livetv/sessions/{sessionId}/{consumerId}/{segmentId}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.liveTV.getSessionSegment({ + sessionId: "", + consumerId: "", + segmentId: "", + }); console.log(result); } @@ -1058,21 +4999,18 @@ actions: label: PlexJS source: |- import { PlexAPI } from "@lukehagar/plexjs"; + import { openAsBlob } from "node:fs"; - const plexAPI = new PlexAPI({ - accessToken: "", - }); + const plexAPI = new PlexAPI(); async function run() { - const result = await plexAPI.log.logMultiLine("level=4&message=Test%20message%201&source=postman\n" + - "level=3&message=Test%20message%202&source=postman\n" + - "level=1&message=Test%20message%203&source=postman"); + const result = await plexAPI.log.writeLog(await openAsBlob("example.file")); console.log(result); } run(); - - target: $["paths"]["/log/networked"]["get"] + - target: $["paths"]["/log"]["put"] update: x-codeSamples: - lang: typescript @@ -1081,11 +5019,464 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.log.enablePaperTrail(); + const result = await plexAPI.log.writeMessage({}); + + console.log(result); + } + + run(); + - target: $["paths"]["/log/networked"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.log.enablePapertrail({}); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/grabbers"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.devices.getAvailableGrabbers({ + protocol: "livetv", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/grabbers/devices"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI(); + + async function run() { + const result = await plexAPI.devices.listDevices(); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/grabbers/devices"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.devices.addDevice({ + uri: "http://10.0.0.5", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/grabbers/devices/discover"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI(); + + async function run() { + const result = await plexAPI.devices.discoverDevices(); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/grabbers/devices/{deviceId}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.devices.removeDevice({ + deviceId: 685908, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/grabbers/devices/{deviceId}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.devices.getDeviceDetails({ + deviceId: 170949, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/grabbers/devices/{deviceId}"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.devices.modifyDevice({ + deviceId: 879135, + enabled: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/grabbers/devices/{deviceId}/channelmap"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.devices.setChannelmap({ + deviceId: 937661, + channelMapping: {}, + channelMappingByKey: {}, + channelsEnabled: [ + "4", + "6", + ".", + "1", + ",", + "4", + "4", + ".", + "1", + ",", + "4", + "5", + ".", + "1", + ], + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/grabbers/devices/{deviceId}/channels"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.devices.getDevicesChannels({ + deviceId: 517209, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/grabbers/devices/{deviceId}/prefs"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.devices.setDevicePreferences({ + deviceId: 420973, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/grabbers/devices/{deviceId}/scan"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.devices.stopScan({ + deviceId: 576494, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/grabbers/devices/{deviceId}/scan"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.devices.scan({ + deviceId: 57391, + source: "Cable", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/grabbers/devices/{deviceId}/thumb/{version}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.devices.getThumb({ + deviceId: 960617, + version: 1025, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/grabbers/operations/{operationId}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.subscriptions.cancelGrab({ + operationId: "", + }); console.log(result); } @@ -1099,18 +5490,16 @@ actions: source: |- import { PlexAPI } from "@lukehagar/plexjs"; - const plexAPI = new PlexAPI({ - accessToken: "", - }); + const plexAPI = new PlexAPI(); async function run() { - const result = await plexAPI.server.getMediaProviders("CV5xoxjTpFKUzBTShsaf"); + const result = await plexAPI.provider.listProviders(); console.log(result); } run(); - - target: $["paths"]["/myplex/account"]["get"] + - target: $["paths"]["/media/providers"]["post"] update: x-codeSamples: - lang: typescript @@ -1119,11 +5508,324 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.server.getMyPlexAccount(); + const result = await plexAPI.provider.addProvider({ + url: "https://steep-obedience.name/", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/providers/refresh"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI(); + + async function run() { + const result = await plexAPI.provider.refreshProviders(); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/providers/{provider}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.provider.deleteMediaProvider({ + provider: "", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/subscriptions"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.subscriptions.getAllSubscriptions({ + includeGrabs: BoolInt.One, + includeStorage: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/subscriptions"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.subscriptions.createSubscription({ + targetLibrarySectionID: 1, + targetSectionLocationID: 3, + type: 2, + hints: {}, + prefs: {}, + params: {}, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/subscriptions/process"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI(); + + async function run() { + const result = await plexAPI.subscriptions.processSubscriptions(); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/subscriptions/scheduled"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI(); + + async function run() { + const result = await plexAPI.subscriptions.getScheduledRecordings(); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/subscriptions/template"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.subscriptions.getTemplate({ + guid: "plex://episode/5fc70265c40548002d539d23", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/subscriptions/{subscriptionId}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.subscriptions.deleteSubscription({ + subscriptionId: 974618, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/subscriptions/{subscriptionId}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.subscriptions.getSubscription({ + subscriptionId: 186713, + includeGrabs: BoolInt.One, + includeStorage: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/subscriptions/{subscriptionId}"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.subscriptions.editSubscriptionPreferences({ + subscriptionId: 673918, + prefs: {}, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/media/subscriptions/{subscriptionId}/move"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.subscriptions.reorderSubscription({ + subscriptionId: 440634, + }); console.log(result); } @@ -1136,27 +5838,139 @@ actions: label: PlexJS source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { MinSize, Upscale } from "@lukehagar/plexjs/sdk/models/operations"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.server.getResizedPhoto({ - width: 110, - height: 165, - blur: 0, - minSize: MinSize.Zero, - upscale: Upscale.Zero, - url: "/library/metadata/49564/thumb/1654258204", + const result = await plexAPI.transcoder.transcodeImage({ + url: "/library/metadata/265/thumb/1715112705", + background: "#ff5522", + upscale: BoolInt.One, + minSize: BoolInt.One, + rotate: BoolInt.One, + blendColor: "#ff5522", }); console.log(result); } run(); - - target: $["paths"]["/pins"]["post"] + - target: $["paths"]["/playQueues"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { CreatePlayQueueType } from "@lukehagar/plexjs/sdk/models/operations"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.playQueue.createPlayQueue({ + type: CreatePlayQueueType.Audio, + shuffle: BoolInt.One, + repeat: BoolInt.One, + continuous: BoolInt.One, + recursive: BoolInt.One, + onDeck: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/playQueues/{playQueueId}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.playQueue.getPlayQueue({ + playQueueId: 210646, + own: BoolInt.One, + includeBefore: BoolInt.One, + includeAfter: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/playQueues/{playQueueId}"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.playQueue.addToPlayQueue({ + playQueueId: 919248, + next: BoolInt.One, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/playQueues/{playQueueId}/items"]["delete"] update: x-codeSamples: - lang: typescript @@ -1164,22 +5978,29 @@ actions: source: |- import { PlexAPI } from "@lukehagar/plexjs"; - const plexAPI = new PlexAPI(); + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); async function run() { - const result = await plexAPI.plex.getPin({ - clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", - clientName: "Plex for Roku", - deviceNickname: "Roku 3", - clientVersion: "2.4.1", - platform: "Roku", + const result = await plexAPI.playQueue.clearPlayQueue({ + playQueueId: 86357, }); console.log(result); } run(); - - target: $["paths"]["/pins/{pinID}"]["get"] + - target: $["paths"]["/playQueues/{playQueueId}/items/{playQueueItemId}"]["delete"] update: x-codeSamples: - lang: typescript @@ -1187,16 +6008,144 @@ actions: source: |- import { PlexAPI } from "@lukehagar/plexjs"; - const plexAPI = new PlexAPI(); + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); async function run() { - const result = await plexAPI.plex.getTokenByPinId({ - pinID: 232248, - clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", - clientName: "Plex for Roku", - deviceNickname: "Roku 3", - clientVersion: "2.4.1", - platform: "Roku", + const result = await plexAPI.playQueue.deletePlayQueueItem({ + playQueueId: 285738, + playQueueItemId: 464354, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/playQueues/{playQueueId}/items/{playQueueItemId}/move"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.playQueue.movePlayQueueItem({ + playQueueId: 31341, + playQueueItemId: 495865, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/playQueues/{playQueueId}/reset"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.playQueue.resetPlayQueue({ + playQueueId: 581891, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/playQueues/{playQueueId}/shuffle"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.playQueue.shuffle({ + playQueueId: 316150, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/playQueues/{playQueueId}/unshuffle"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.playQueue.unshuffle({ + playQueueId: 484388, }); console.log(result); @@ -1212,11 +6161,20 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.playlists.getPlaylists(); + const result = await plexAPI.playlist.listPlaylists({}); console.log(result); } @@ -1229,19 +6187,22 @@ actions: label: PlexJS source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { CreatePlaylistQueryParamType, Smart } from "@lukehagar/plexjs/sdk/models/operations"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.playlists.createPlaylist({ - title: "", - type: CreatePlaylistQueryParamType.Audio, - smart: Smart.One, - uri: "https://short-term-disconnection.name/", - }); + const result = await plexAPI.libraryPlaylists.createPlaylist({}); console.log(result); } @@ -1254,20 +6215,32 @@ actions: label: PlexJS source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { QueryParamForce } from "@lukehagar/plexjs/sdk/models/operations"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.playlists.uploadPlaylist("/home/barkley/playlist.m3u", QueryParamForce.One, 1); + const result = await plexAPI.libraryPlaylists.uploadPlaylist({ + path: "/home/barkley/playlist.m3u", + force: BoolInt.One, + }); console.log(result); } run(); - - target: $["paths"]["/playlists/{playlistID}"]["delete"] + - target: $["paths"]["/playlists/{playlistId}"]["delete"] update: x-codeSamples: - lang: typescript @@ -1276,17 +6249,28 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.playlists.deletePlaylist(3432.93); + const result = await plexAPI.libraryPlaylists.deletePlaylist({ + playlistId: 343293, + }); console.log(result); } run(); - - target: $["paths"]["/playlists/{playlistID}"]["get"] + - target: $["paths"]["/playlists/{playlistId}"]["get"] update: x-codeSamples: - lang: typescript @@ -1295,17 +6279,28 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.playlists.getPlaylist(8419.53); + const result = await plexAPI.playlist.getPlaylist({ + playlistId: 841953, + }); console.log(result); } run(); - - target: $["paths"]["/playlists/{playlistID}"]["put"] + - target: $["paths"]["/playlists/{playlistId}"]["put"] update: x-codeSamples: - lang: typescript @@ -1314,17 +6309,28 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.playlists.updatePlaylist(1579.66); + const result = await plexAPI.libraryPlaylists.updatePlaylist({ + playlistId: 157966, + }); console.log(result); } run(); - - target: $["paths"]["/playlists/{playlistID}/items"]["delete"] + - target: $["paths"]["/playlists/{playlistId}/generators"]["get"] update: x-codeSamples: - lang: typescript @@ -1333,37 +6339,28 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.playlists.clearPlaylistContents(4137.37); + const result = await plexAPI.libraryPlaylists.getPlaylistGenerators({ + playlistId: 162342, + }); console.log(result); } run(); - - target: $["paths"]["/playlists/{playlistID}/items"]["get"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - import { GetPlaylistContentsQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.playlists.getPlaylistContents(5535.42, GetPlaylistContentsQueryParamType.TvShow); - - console.log(result); - } - - run(); - - target: $["paths"]["/playlists/{playlistID}/items"]["put"] + - target: $["paths"]["/playlists/{playlistId}/items"]["delete"] update: x-codeSamples: - lang: typescript @@ -1372,17 +6369,28 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.playlists.addPlaylistContents(7013.44, "server://12345/com.plexapp.plugins.library/library/metadata/1", 123); + const result = await plexAPI.libraryPlaylists.clearPlaylistItems({ + playlistId: 552140, + }); console.log(result); } run(); - - target: $["paths"]["/resources"]["get"] + - target: $["paths"]["/playlists/{playlistId}/items"]["get"] update: x-codeSamples: - lang: typescript @@ -1391,17 +6399,28 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.plex.getServerResources("3381b62b-9ab7-4e37-827b-203e9809eb58"); + const result = await plexAPI.playlist.getPlaylistItems({ + playlistId: 118195, + }); console.log(result); } run(); - - target: $["paths"]["/search"]["get"] + - target: $["paths"]["/playlists/{playlistId}/items"]["put"] update: x-codeSamples: - lang: typescript @@ -1410,11 +6429,227 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.search.getSearchResults("110"); + const result = await plexAPI.libraryPlaylists.addPlaylistItems({ + playlistId: 533723, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/playlists/{playlistId}/items/{generatorId}"]["delete"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.libraryPlaylists.deletePlaylistItem({ + playlistId: 981646, + generatorId: 194010, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/playlists/{playlistId}/items/{generatorId}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.libraryPlaylists.getPlaylistGenerator({ + playlistId: 744880, + generatorId: 322168, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/playlists/{playlistId}/items/{generatorId}"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { ModifyPlaylistGeneratorScope } from "@lukehagar/plexjs/sdk/models/operations"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.libraryPlaylists.modifyPlaylistGenerator({ + playlistId: 972007, + generatorId: 208334, + item: { + location: { + uri: "library://82503060-0d68-4603-b594-8b071d54819e/item/%2Flibrary%2Fmetadata%2F146", + }, + locationID: -1, + policy: { + scope: ModifyPlaylistGeneratorScope.All, + unwatched: BoolInt.Zero, + }, + target: "", + targetTagID: 1, + title: "Jack-Jack Attack", + type: 42, + }, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/playlists/{playlistId}/items/{generatorId}/items"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.libraryPlaylists.getPlaylistGeneratorItems({ + playlistId: 77230, + generatorId: 979714, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/playlists/{playlistId}/items/{generatorId}/{metadataId}/{action}"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { Action } from "@lukehagar/plexjs/sdk/models/operations"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.libraryPlaylists.refreshPlaylist({ + playlistId: 895314, + generatorId: 629742, + metadataId: 724422, + action: Action.Disable, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/playlists/{playlistId}/items/{playlistItemId}/move"]["put"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.libraryPlaylists.movePlaylistItem({ + playlistId: 940298, + playlistItemId: 375626, + }); console.log(result); } @@ -1427,39 +6662,64 @@ actions: label: PlexJS source: |- import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.authentication.getSourceConnectionInformation("server://client-identifier"); + const result = await plexAPI.general.getSourceConnectionInformation({ + source: "", + refresh: BoolInt.One, + }); console.log(result); } run(); - - target: $["paths"]["/security/token"]["get"] + - target: $["paths"]["/security/token"]["post"] update: x-codeSamples: - lang: typescript label: PlexJS source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { GetTransientTokenQueryParamType, Scope } from "@lukehagar/plexjs/sdk/models/operations"; + import { GetTransientTokenScope, GetTransientTokenType } from "@lukehagar/plexjs/sdk/models/operations"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.authentication.getTransientToken(GetTransientTokenQueryParamType.Delegation, Scope.All); + const result = await plexAPI.general.getTransientToken({ + type: GetTransientTokenType.Delegation, + scope: GetTransientTokenScope.All, + }); console.log(result); } run(); - - target: $["paths"]["/servers"]["get"] + - target: $["paths"]["/services/ultrablur/colors"]["get"] update: x-codeSamples: - lang: typescript @@ -1468,68 +6728,59 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.server.getServerList(); + const result = await plexAPI.ultraBlur.getColors({ + url: "/library/metadata/217745/art/1718931408", + }); console.log(result); } run(); - - target: $["paths"]["/statistics/bandwidth"]["get"] + - target: $["paths"]["/services/ultrablur/image"]["get"] update: x-codeSamples: - lang: typescript label: PlexJS source: |- import { PlexAPI } from "@lukehagar/plexjs"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.statistics.getBandwidthStatistics(4); - - console.log(result); - } - - run(); - - target: $["paths"]["/statistics/media"]["get"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.statistics.getStatistics(4); - - console.log(result); - } - - run(); - - target: $["paths"]["/statistics/resources"]["get"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.statistics.getResourcesStatistics(4); + const result = await plexAPI.ultraBlur.getImage({ + topLeft: "3f280a", + topRight: "6b4713", + bottomRight: "0f2a43", + bottomLeft: "1c425d", + width: 1920, + height: 1080, + noise: BoolInt.One, + }); console.log(result); } @@ -1543,12 +6794,27 @@ actions: source: |- import { PlexAPI } from "@lukehagar/plexjs"; - const plexAPI = new PlexAPI({ - accessToken: "", - }); + const plexAPI = new PlexAPI(); async function run() { - const result = await plexAPI.sessions.getSessions(); + const result = await plexAPI.status.listSessions(); + + console.log(result); + } + + run(); + - target: $["paths"]["/status/sessions/background"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI(); + + async function run() { + const result = await plexAPI.status.getBackgroundTasks(); console.log(result); } @@ -1563,17 +6829,52 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.sessions.getSessionHistory("viewedAt:desc", 1, {}, 12); + const result = await plexAPI.status.listPlaybackHistory({ + sort: [ + "v", + "i", + "e", + "w", + "e", + "d", + "A", + "t", + ":", + "d", + "e", + "s", + "c", + ",", + "a", + "c", + "c", + "o", + "u", + "n", + "t", + "I", + "D", + ], + }); console.log(result); } run(); - - target: $["paths"]["/transcode/sessions"]["get"] + - target: $["paths"]["/status/sessions/history/{historyId}"]["delete"] update: x-codeSamples: - lang: typescript @@ -1582,17 +6883,28 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.sessions.getTranscodeSessions(); + const result = await plexAPI.status.deleteHistory({ + historyId: 953579, + }); console.log(result); } run(); - - target: $["paths"]["/transcode/sessions/{sessionKey}"]["delete"] + - target: $["paths"]["/status/sessions/history/{historyId}"]["get"] update: x-codeSamples: - lang: typescript @@ -1601,11 +6913,53 @@ actions: import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.sessions.stopTranscodeSession("zz7llzqlx8w9vnrsbnwhbmep"); + const result = await plexAPI.status.getHistoryItem({ + historyId: 832213, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/status/sessions/terminate"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.status.terminateSession({ + sessionId: "cdefghijklmnopqrstuvwxyz", + reason: "Stop Playing", + }); console.log(result); } @@ -1618,14 +6972,26 @@ actions: label: PlexJS source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { Skip, Tonight } from "@lukehagar/plexjs/sdk/models/operations"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.updater.applyUpdates(Tonight.One, Skip.One); + const result = await plexAPI.updater.applyUpdates({ + tonight: BoolInt.One, + skip: BoolInt.One, + }); console.log(result); } @@ -1638,58 +7004,31 @@ actions: label: PlexJS source: |- import { PlexAPI } from "@lukehagar/plexjs"; - import { Download } from "@lukehagar/plexjs/sdk/models/operations"; + import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.updater.checkForUpdates(Download.One); + const result = await plexAPI.updater.checkUpdates({ + download: BoolInt.One, + }); console.log(result); } run(); - target: $["paths"]["/updater/status"]["get"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.updater.getUpdateStatus(); - - console.log(result); - } - - run(); - - target: $["paths"]["/user"]["get"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI({ - accessToken: "", - }); - - async function run() { - const result = await plexAPI.authentication.getTokenDetails(); - - console.log(result); - } - - run(); - - target: $["paths"]["/users"]["get"] update: x-codeSamples: - lang: typescript @@ -1700,84 +7039,215 @@ actions: const plexAPI = new PlexAPI(); async function run() { - const result = await plexAPI.users.getUsers({ - clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", - clientName: "Plex for Roku", - deviceNickname: "Roku 3", - deviceName: "Chrome", - deviceScreenResolution: "1487x1165,2560x1440", - clientVersion: "2.4.1", - platform: "Roku", - clientFeatures: "external-media,indirect-media,hub-style-list", - model: "4200X", - xPlexSessionId: "97e136ef-4ddd-4ff3-89a7-a5820c96c2ca", - xPlexLanguage: "en", - platformVersion: "4.3 build 1057", - xPlexToken: "CV5xoxjTpFKUzBTShsaf", - }); + const result = await plexAPI.updater.getUpdatesStatus(); console.log(result); } run(); - - target: $["paths"]["/users/signin"]["post"] - update: - x-codeSamples: - - lang: typescript - label: PlexJS - source: |- - import { PlexAPI } from "@lukehagar/plexjs"; - - const plexAPI = new PlexAPI(); - - async function run() { - const result = await plexAPI.authentication.postUsersSignInData({ - clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", - clientName: "Plex for Roku", - deviceNickname: "Roku 3", - clientVersion: "2.4.1", - platform: "Roku", - requestBody: { - login: "username@email.com", - password: "password123", - verificationCode: "123456", - }, - }); - - console.log(result); - } - - run(); - - target: $["paths"]["/video/:/transcode/universal/start.mpd"]["get"] + - target: $["paths"]["/{transcodeType}/:/transcode/universal/decision"]["get"] update: x-codeSamples: - lang: typescript label: PlexJS source: |- import { PlexAPI } from "@lukehagar/plexjs"; + import { MakeDecisionLocation, MakeDecisionProtocol } from "@lukehagar/plexjs/sdk/models/operations"; + import { AdvancedSubtitles, BoolInt, TranscodeType } from "@lukehagar/plexjs/sdk/models/shared"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.video.startUniversalTranscode({ - 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", + const result = await plexAPI.transcoder.makeDecision({ + transcodeType: TranscodeType.Music, + advancedSubtitles: AdvancedSubtitles.Burn, + audioBoost: 50, + audioChannelCount: 5, + autoAdjustQuality: BoolInt.One, + autoAdjustSubtitle: BoolInt.One, + directPlay: BoolInt.One, + directStream: BoolInt.One, + directStreamAudio: BoolInt.One, + disableResolutionRotation: BoolInt.One, + hasMDE: BoolInt.One, + location: MakeDecisionLocation.Wan, mediaBufferSize: 102400, - session: "zvcage8b7rkioqcm8f4uns4c", - addDebugOverlay: 0, - autoAdjustQuality: 0, + mediaIndex: 0, + musicBitrate: 5000, + offset: 90.5, + partIndex: 0, + path: "/library/metadata/151671", + peakBitrate: 12000, + photoResolution: "1080x1080", + protocol: MakeDecisionProtocol.Dash, + secondsPerSegment: 5, + subtitleSize: 50, + videoBitrate: 12000, + videoQuality: 50, + videoResolution: "1080x1080", + xPlexClientProfileExtra: "add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)", + xPlexClientProfileName: "generic", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/{transcodeType}/:/transcode/universal/fallback"]["post"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { TranscodeType } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.transcoder.triggerFallback({ + transcodeType: TranscodeType.Audio, + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/{transcodeType}/:/transcode/universal/start.{extension}"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { Extension, StartTranscodeSessionLocation, StartTranscodeSessionProtocol } from "@lukehagar/plexjs/sdk/models/operations"; + import { AdvancedSubtitles, BoolInt, TranscodeType } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.transcoder.startTranscodeSession({ + transcodeType: TranscodeType.Music, + extension: Extension.Mpd, + advancedSubtitles: AdvancedSubtitles.Burn, + audioBoost: 50, + audioChannelCount: 5, + autoAdjustQuality: BoolInt.One, + autoAdjustSubtitle: BoolInt.One, + directPlay: BoolInt.One, + directStream: BoolInt.One, + directStreamAudio: BoolInt.One, + disableResolutionRotation: BoolInt.One, + hasMDE: BoolInt.One, + location: StartTranscodeSessionLocation.Wan, + mediaBufferSize: 102400, + mediaIndex: 0, + musicBitrate: 5000, + offset: 90.5, + partIndex: 0, + path: "/library/metadata/151671", + peakBitrate: 12000, + photoResolution: "1080x1080", + protocol: StartTranscodeSessionProtocol.Dash, + secondsPerSegment: 5, + subtitleSize: 50, + videoBitrate: 12000, + videoQuality: 50, + videoResolution: "1080x1080", + xPlexClientProfileExtra: "add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)", + xPlexClientProfileName: "generic", + }); + + console.log(result); + } + + run(); + - target: $["paths"]["/{transcodeType}/:/transcode/universal/subtitles"]["get"] + update: + x-codeSamples: + - lang: typescript + label: PlexJS + source: |- + import { PlexAPI } from "@lukehagar/plexjs"; + import { TranscodeSubtitlesLocation, TranscodeSubtitlesProtocol } from "@lukehagar/plexjs/sdk/models/operations"; + import { AdvancedSubtitles, BoolInt, TranscodeType } from "@lukehagar/plexjs/sdk/models/shared"; + + const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", + }); + + async function run() { + const result = await plexAPI.transcoder.transcodeSubtitles({ + transcodeType: TranscodeType.Audio, + advancedSubtitles: AdvancedSubtitles.Burn, + audioBoost: 50, + audioChannelCount: 5, + autoAdjustQuality: BoolInt.One, + autoAdjustSubtitle: BoolInt.One, + directPlay: BoolInt.One, + directStream: BoolInt.One, + directStreamAudio: BoolInt.One, + disableResolutionRotation: BoolInt.One, + hasMDE: BoolInt.One, + location: TranscodeSubtitlesLocation.Wan, + mediaBufferSize: 102400, + mediaIndex: 0, + musicBitrate: 5000, + offset: 90.5, + partIndex: 0, + path: "/library/metadata/151671", + peakBitrate: 12000, + photoResolution: "1080x1080", + protocol: TranscodeSubtitlesProtocol.Dash, + secondsPerSegment: 5, + subtitleSize: 50, + videoBitrate: 12000, + videoQuality: 50, + videoResolution: "1080x1080", + xPlexClientProfileExtra: "add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)", + xPlexClientProfileName: "generic", }); console.log(result); diff --git a/docs/sdk/models/errors/addplaylistcontentsbadrequest.md b/docs/sdk/models/errors/addplaylistcontentsbadrequest.md deleted file mode 100644 index 6baf891f..00000000 --- a/docs/sdk/models/errors/addplaylistcontentsbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# AddPlaylistContentsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { AddPlaylistContentsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `errors` | [errors.AddPlaylistContentsErrors](../../../sdk/models/errors/addplaylistcontentserrors.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/addplaylistcontentserrors.md b/docs/sdk/models/errors/addplaylistcontentserrors.md deleted file mode 100644 index 71662629..00000000 --- a/docs/sdk/models/errors/addplaylistcontentserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# AddPlaylistContentsErrors - -## Example Usage - -```typescript -import { AddPlaylistContentsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: AddPlaylistContentsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/addplaylistcontentsplaylistserrors.md b/docs/sdk/models/errors/addplaylistcontentsplaylistserrors.md deleted file mode 100644 index cd4e099d..00000000 --- a/docs/sdk/models/errors/addplaylistcontentsplaylistserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# AddPlaylistContentsPlaylistsErrors - -## Example Usage - -```typescript -import { AddPlaylistContentsPlaylistsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: AddPlaylistContentsPlaylistsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/addplaylistcontentsunauthorized.md b/docs/sdk/models/errors/addplaylistcontentsunauthorized.md deleted file mode 100644 index 6d1ba09e..00000000 --- a/docs/sdk/models/errors/addplaylistcontentsunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# AddPlaylistContentsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { AddPlaylistContentsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.AddPlaylistContentsPlaylistsErrors](../../../sdk/models/errors/addplaylistcontentsplaylistserrors.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/applyupdatesbadrequest.md b/docs/sdk/models/errors/applyupdatesbadrequest.md deleted file mode 100644 index 04d03ac7..00000000 --- a/docs/sdk/models/errors/applyupdatesbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# ApplyUpdatesBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { ApplyUpdatesBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `errors` | [errors.ApplyUpdatesErrors](../../../sdk/models/errors/applyupdateserrors.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/applyupdateserrors.md b/docs/sdk/models/errors/applyupdateserrors.md deleted file mode 100644 index a3bf92cf..00000000 --- a/docs/sdk/models/errors/applyupdateserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# ApplyUpdatesErrors - -## Example Usage - -```typescript -import { ApplyUpdatesErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: ApplyUpdatesErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/applyupdatesunauthorized.md b/docs/sdk/models/errors/applyupdatesunauthorized.md deleted file mode 100644 index d0fff00d..00000000 --- a/docs/sdk/models/errors/applyupdatesunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# ApplyUpdatesUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { ApplyUpdatesUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `errors` | [errors.ApplyUpdatesUpdaterErrors](../../../sdk/models/errors/applyupdatesupdatererrors.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/applyupdatesupdatererrors.md b/docs/sdk/models/errors/applyupdatesupdatererrors.md deleted file mode 100644 index ec27ec22..00000000 --- a/docs/sdk/models/errors/applyupdatesupdatererrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# ApplyUpdatesUpdaterErrors - -## Example Usage - -```typescript -import { ApplyUpdatesUpdaterErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: ApplyUpdatesUpdaterErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/cancelserveractivitiesactivitieserrors.md b/docs/sdk/models/errors/cancelserveractivitiesactivitieserrors.md deleted file mode 100644 index 12493b96..00000000 --- a/docs/sdk/models/errors/cancelserveractivitiesactivitieserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# CancelServerActivitiesActivitiesErrors - -## Example Usage - -```typescript -import { CancelServerActivitiesActivitiesErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: CancelServerActivitiesActivitiesErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/cancelserveractivitiesbadrequest.md b/docs/sdk/models/errors/cancelserveractivitiesbadrequest.md deleted file mode 100644 index 97f0af15..00000000 --- a/docs/sdk/models/errors/cancelserveractivitiesbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# CancelServerActivitiesBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { CancelServerActivitiesBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `errors` | [errors.CancelServerActivitiesErrors](../../../sdk/models/errors/cancelserveractivitieserrors.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/cancelserveractivitieserrors.md b/docs/sdk/models/errors/cancelserveractivitieserrors.md deleted file mode 100644 index bd3fd8c6..00000000 --- a/docs/sdk/models/errors/cancelserveractivitieserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# CancelServerActivitiesErrors - -## Example Usage - -```typescript -import { CancelServerActivitiesErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: CancelServerActivitiesErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/cancelserveractivitiesunauthorized.md b/docs/sdk/models/errors/cancelserveractivitiesunauthorized.md deleted file mode 100644 index 6ae98ee6..00000000 --- a/docs/sdk/models/errors/cancelserveractivitiesunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# CancelServerActivitiesUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { CancelServerActivitiesUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.CancelServerActivitiesActivitiesErrors](../../../sdk/models/errors/cancelserveractivitiesactivitieserrors.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/checkforupdatesbadrequest.md b/docs/sdk/models/errors/checkforupdatesbadrequest.md deleted file mode 100644 index d22fa190..00000000 --- a/docs/sdk/models/errors/checkforupdatesbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# CheckForUpdatesBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { CheckForUpdatesBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | [errors.CheckForUpdatesErrors](../../../sdk/models/errors/checkforupdateserrors.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/checkforupdateserrors.md b/docs/sdk/models/errors/checkforupdateserrors.md deleted file mode 100644 index 8f7d99c5..00000000 --- a/docs/sdk/models/errors/checkforupdateserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# CheckForUpdatesErrors - -## Example Usage - -```typescript -import { CheckForUpdatesErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: CheckForUpdatesErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/checkforupdatesunauthorized.md b/docs/sdk/models/errors/checkforupdatesunauthorized.md deleted file mode 100644 index 90428db6..00000000 --- a/docs/sdk/models/errors/checkforupdatesunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# CheckForUpdatesUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { CheckForUpdatesUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `errors` | [errors.CheckForUpdatesUpdaterErrors](../../../sdk/models/errors/checkforupdatesupdatererrors.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/checkforupdatesupdatererrors.md b/docs/sdk/models/errors/checkforupdatesupdatererrors.md deleted file mode 100644 index cf1704ab..00000000 --- a/docs/sdk/models/errors/checkforupdatesupdatererrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# CheckForUpdatesUpdaterErrors - -## Example Usage - -```typescript -import { CheckForUpdatesUpdaterErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: CheckForUpdatesUpdaterErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/clearplaylistcontentsbadrequest.md b/docs/sdk/models/errors/clearplaylistcontentsbadrequest.md deleted file mode 100644 index bf27c58c..00000000 --- a/docs/sdk/models/errors/clearplaylistcontentsbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# ClearPlaylistContentsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { ClearPlaylistContentsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `errors` | [errors.ClearPlaylistContentsErrors](../../../sdk/models/errors/clearplaylistcontentserrors.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/clearplaylistcontentserrors.md b/docs/sdk/models/errors/clearplaylistcontentserrors.md deleted file mode 100644 index 59b8930a..00000000 --- a/docs/sdk/models/errors/clearplaylistcontentserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# ClearPlaylistContentsErrors - -## Example Usage - -```typescript -import { ClearPlaylistContentsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: ClearPlaylistContentsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/clearplaylistcontentsplaylistserrors.md b/docs/sdk/models/errors/clearplaylistcontentsplaylistserrors.md deleted file mode 100644 index 11f62f17..00000000 --- a/docs/sdk/models/errors/clearplaylistcontentsplaylistserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# ClearPlaylistContentsPlaylistsErrors - -## Example Usage - -```typescript -import { ClearPlaylistContentsPlaylistsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: ClearPlaylistContentsPlaylistsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/clearplaylistcontentsunauthorized.md b/docs/sdk/models/errors/clearplaylistcontentsunauthorized.md deleted file mode 100644 index a6fb6dd2..00000000 --- a/docs/sdk/models/errors/clearplaylistcontentsunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# ClearPlaylistContentsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { ClearPlaylistContentsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.ClearPlaylistContentsPlaylistsErrors](../../../sdk/models/errors/clearplaylistcontentsplaylistserrors.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/createplaylistbadrequest.md b/docs/sdk/models/errors/createplaylistbadrequest.md deleted file mode 100644 index 52b3b32e..00000000 --- a/docs/sdk/models/errors/createplaylistbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# CreatePlaylistBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { CreatePlaylistBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `errors` | [errors.CreatePlaylistErrors](../../../sdk/models/errors/createplaylisterrors.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/createplaylisterrors.md b/docs/sdk/models/errors/createplaylisterrors.md deleted file mode 100644 index e0023b16..00000000 --- a/docs/sdk/models/errors/createplaylisterrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# CreatePlaylistErrors - -## Example Usage - -```typescript -import { CreatePlaylistErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: CreatePlaylistErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/createplaylistplaylistserrors.md b/docs/sdk/models/errors/createplaylistplaylistserrors.md deleted file mode 100644 index 49282604..00000000 --- a/docs/sdk/models/errors/createplaylistplaylistserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# CreatePlaylistPlaylistsErrors - -## Example Usage - -```typescript -import { CreatePlaylistPlaylistsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: CreatePlaylistPlaylistsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/createplaylistunauthorized.md b/docs/sdk/models/errors/createplaylistunauthorized.md deleted file mode 100644 index 705f4294..00000000 --- a/docs/sdk/models/errors/createplaylistunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# CreatePlaylistUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { CreatePlaylistUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `errors` | [errors.CreatePlaylistPlaylistsErrors](../../../sdk/models/errors/createplaylistplaylistserrors.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/deletelibrarybadrequest.md b/docs/sdk/models/errors/deletelibrarybadrequest.md deleted file mode 100644 index 7bdd5333..00000000 --- a/docs/sdk/models/errors/deletelibrarybadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# DeleteLibraryBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { DeleteLibraryBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `errors` | [errors.DeleteLibraryErrors](../../../sdk/models/errors/deletelibraryerrors.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/deletelibraryerrors.md b/docs/sdk/models/errors/deletelibraryerrors.md deleted file mode 100644 index b1f58a97..00000000 --- a/docs/sdk/models/errors/deletelibraryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# DeleteLibraryErrors - -## Example Usage - -```typescript -import { DeleteLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: DeleteLibraryErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/deletelibrarylibraryerrors.md b/docs/sdk/models/errors/deletelibrarylibraryerrors.md deleted file mode 100644 index 27a138fa..00000000 --- a/docs/sdk/models/errors/deletelibrarylibraryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# DeleteLibraryLibraryErrors - -## Example Usage - -```typescript -import { DeleteLibraryLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: DeleteLibraryLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/deletelibraryunauthorized.md b/docs/sdk/models/errors/deletelibraryunauthorized.md deleted file mode 100644 index cad716c0..00000000 --- a/docs/sdk/models/errors/deletelibraryunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# DeleteLibraryUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { DeleteLibraryUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `errors` | [errors.DeleteLibraryLibraryErrors](../../../sdk/models/errors/deletelibrarylibraryerrors.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/deleteplaylistbadrequest.md b/docs/sdk/models/errors/deleteplaylistbadrequest.md deleted file mode 100644 index 35c36920..00000000 --- a/docs/sdk/models/errors/deleteplaylistbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# DeletePlaylistBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { DeletePlaylistBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `errors` | [errors.DeletePlaylistErrors](../../../sdk/models/errors/deleteplaylisterrors.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/deleteplaylisterrors.md b/docs/sdk/models/errors/deleteplaylisterrors.md deleted file mode 100644 index 9a838f9a..00000000 --- a/docs/sdk/models/errors/deleteplaylisterrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# DeletePlaylistErrors - -## Example Usage - -```typescript -import { DeletePlaylistErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: DeletePlaylistErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/deleteplaylistplaylistserrors.md b/docs/sdk/models/errors/deleteplaylistplaylistserrors.md deleted file mode 100644 index 127b3667..00000000 --- a/docs/sdk/models/errors/deleteplaylistplaylistserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# DeletePlaylistPlaylistsErrors - -## Example Usage - -```typescript -import { DeletePlaylistPlaylistsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: DeletePlaylistPlaylistsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/deleteplaylistunauthorized.md b/docs/sdk/models/errors/deleteplaylistunauthorized.md deleted file mode 100644 index ecbbecda..00000000 --- a/docs/sdk/models/errors/deleteplaylistunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# DeletePlaylistUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { DeletePlaylistUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `errors` | [errors.DeletePlaylistPlaylistsErrors](../../../sdk/models/errors/deleteplaylistplaylistserrors.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/enablepapertrailbadrequest.md b/docs/sdk/models/errors/enablepapertrailbadrequest.md deleted file mode 100644 index 4d4c881a..00000000 --- a/docs/sdk/models/errors/enablepapertrailbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# EnablePaperTrailBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { EnablePaperTrailBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `errors` | [errors.EnablePaperTrailErrors](../../../sdk/models/errors/enablepapertrailerrors.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/enablepapertrailerrors.md b/docs/sdk/models/errors/enablepapertrailerrors.md deleted file mode 100644 index e85e945d..00000000 --- a/docs/sdk/models/errors/enablepapertrailerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# EnablePaperTrailErrors - -## Example Usage - -```typescript -import { EnablePaperTrailErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: EnablePaperTrailErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/enablepapertraillogerrors.md b/docs/sdk/models/errors/enablepapertraillogerrors.md deleted file mode 100644 index d374aa4c..00000000 --- a/docs/sdk/models/errors/enablepapertraillogerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# EnablePaperTrailLogErrors - -## Example Usage - -```typescript -import { EnablePaperTrailLogErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: EnablePaperTrailLogErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/enablepapertrailunauthorized.md b/docs/sdk/models/errors/enablepapertrailunauthorized.md deleted file mode 100644 index 42503ef8..00000000 --- a/docs/sdk/models/errors/enablepapertrailunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# EnablePaperTrailUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { EnablePaperTrailUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `errors` | [errors.EnablePaperTrailLogErrors](../../../sdk/models/errors/enablepapertraillogerrors.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/errors.md b/docs/sdk/models/errors/errors.md deleted file mode 100644 index a2a6165f..00000000 --- a/docs/sdk/models/errors/errors.md +++ /dev/null @@ -1,21 +0,0 @@ -# Errors - -## Example Usage - -```typescript -import { Errors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: Errors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getactorslibrarybadrequest.md b/docs/sdk/models/errors/getactorslibrarybadrequest.md deleted file mode 100644 index 9f76d1eb..00000000 --- a/docs/sdk/models/errors/getactorslibrarybadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetActorsLibraryBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetActorsLibraryBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `errors` | [errors.GetActorsLibraryErrors](../../../sdk/models/errors/getactorslibraryerrors.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/getactorslibraryerrors.md b/docs/sdk/models/errors/getactorslibraryerrors.md deleted file mode 100644 index dd897be5..00000000 --- a/docs/sdk/models/errors/getactorslibraryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetActorsLibraryErrors - -## Example Usage - -```typescript -import { GetActorsLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetActorsLibraryErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getactorslibrarylibraryerrors.md b/docs/sdk/models/errors/getactorslibrarylibraryerrors.md deleted file mode 100644 index 04de320f..00000000 --- a/docs/sdk/models/errors/getactorslibrarylibraryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetActorsLibraryLibraryErrors - -## Example Usage - -```typescript -import { GetActorsLibraryLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetActorsLibraryLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getactorslibraryunauthorized.md b/docs/sdk/models/errors/getactorslibraryunauthorized.md deleted file mode 100644 index 76931f66..00000000 --- a/docs/sdk/models/errors/getactorslibraryunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetActorsLibraryUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetActorsLibraryUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetActorsLibraryLibraryErrors](../../../sdk/models/errors/getactorslibrarylibraryerrors.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/getalllibrariesbadrequest.md b/docs/sdk/models/errors/getalllibrariesbadrequest.md deleted file mode 100644 index 3204c618..00000000 --- a/docs/sdk/models/errors/getalllibrariesbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetAllLibrariesBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetAllLibrariesBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | [errors.GetAllLibrariesErrors](../../../sdk/models/errors/getalllibrarieserrors.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/getalllibrarieserrors.md b/docs/sdk/models/errors/getalllibrarieserrors.md deleted file mode 100644 index 2408fec2..00000000 --- a/docs/sdk/models/errors/getalllibrarieserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetAllLibrariesErrors - -## Example Usage - -```typescript -import { GetAllLibrariesErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetAllLibrariesErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getalllibrarieslibraryerrors.md b/docs/sdk/models/errors/getalllibrarieslibraryerrors.md deleted file mode 100644 index 2be1f59b..00000000 --- a/docs/sdk/models/errors/getalllibrarieslibraryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetAllLibrariesLibraryErrors - -## Example Usage - -```typescript -import { GetAllLibrariesLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetAllLibrariesLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getalllibrariesunauthorized.md b/docs/sdk/models/errors/getalllibrariesunauthorized.md deleted file mode 100644 index 0d694f26..00000000 --- a/docs/sdk/models/errors/getalllibrariesunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetAllLibrariesUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetAllLibrariesUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetAllLibrariesLibraryErrors](../../../sdk/models/errors/getalllibrarieslibraryerrors.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/getavailableclientsbadrequest.md b/docs/sdk/models/errors/getavailableclientsbadrequest.md deleted file mode 100644 index 97b79856..00000000 --- a/docs/sdk/models/errors/getavailableclientsbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetAvailableClientsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetAvailableClientsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetAvailableClientsErrors](../../../sdk/models/errors/getavailableclientserrors.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/getavailableclientserrors.md b/docs/sdk/models/errors/getavailableclientserrors.md deleted file mode 100644 index 86e9a82b..00000000 --- a/docs/sdk/models/errors/getavailableclientserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetAvailableClientsErrors - -## Example Usage - -```typescript -import { GetAvailableClientsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetAvailableClientsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getavailableclientsservererrors.md b/docs/sdk/models/errors/getavailableclientsservererrors.md deleted file mode 100644 index 6a48914a..00000000 --- a/docs/sdk/models/errors/getavailableclientsservererrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetAvailableClientsServerErrors - -## Example Usage - -```typescript -import { GetAvailableClientsServerErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetAvailableClientsServerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getavailableclientsunauthorized.md b/docs/sdk/models/errors/getavailableclientsunauthorized.md deleted file mode 100644 index 29cce9ff..00000000 --- a/docs/sdk/models/errors/getavailableclientsunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetAvailableClientsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetAvailableClientsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetAvailableClientsServerErrors](../../../sdk/models/errors/getavailableclientsservererrors.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/getbandwidthstatisticsbadrequest.md b/docs/sdk/models/errors/getbandwidthstatisticsbadrequest.md deleted file mode 100644 index 4018e95e..00000000 --- a/docs/sdk/models/errors/getbandwidthstatisticsbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetBandwidthStatisticsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetBandwidthStatisticsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetBandwidthStatisticsErrors](../../../sdk/models/errors/getbandwidthstatisticserrors.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/getbandwidthstatisticserrors.md b/docs/sdk/models/errors/getbandwidthstatisticserrors.md deleted file mode 100644 index a0bb56d2..00000000 --- a/docs/sdk/models/errors/getbandwidthstatisticserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetBandwidthStatisticsErrors - -## Example Usage - -```typescript -import { GetBandwidthStatisticsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetBandwidthStatisticsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getbandwidthstatisticsstatisticserrors.md b/docs/sdk/models/errors/getbandwidthstatisticsstatisticserrors.md deleted file mode 100644 index dfd157b2..00000000 --- a/docs/sdk/models/errors/getbandwidthstatisticsstatisticserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetBandwidthStatisticsStatisticsErrors - -## Example Usage - -```typescript -import { GetBandwidthStatisticsStatisticsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetBandwidthStatisticsStatisticsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getbandwidthstatisticsunauthorized.md b/docs/sdk/models/errors/getbandwidthstatisticsunauthorized.md deleted file mode 100644 index 41dfba1a..00000000 --- a/docs/sdk/models/errors/getbandwidthstatisticsunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetBandwidthStatisticsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetBandwidthStatisticsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetBandwidthStatisticsStatisticsErrors](../../../sdk/models/errors/getbandwidthstatisticsstatisticserrors.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/getbannerimagebadrequest.md b/docs/sdk/models/errors/getbannerimagebadrequest.md deleted file mode 100644 index 01bf3a2c..00000000 --- a/docs/sdk/models/errors/getbannerimagebadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetBannerImageBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetBannerImageBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `errors` | [errors.GetBannerImageErrors](../../../sdk/models/errors/getbannerimageerrors.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/getbannerimageerrors.md b/docs/sdk/models/errors/getbannerimageerrors.md deleted file mode 100644 index 969fb25c..00000000 --- a/docs/sdk/models/errors/getbannerimageerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetBannerImageErrors - -## Example Usage - -```typescript -import { GetBannerImageErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetBannerImageErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getbannerimagemediaerrors.md b/docs/sdk/models/errors/getbannerimagemediaerrors.md deleted file mode 100644 index c81084e0..00000000 --- a/docs/sdk/models/errors/getbannerimagemediaerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetBannerImageMediaErrors - -## Example Usage - -```typescript -import { GetBannerImageMediaErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetBannerImageMediaErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getbannerimageunauthorized.md b/docs/sdk/models/errors/getbannerimageunauthorized.md deleted file mode 100644 index a076937b..00000000 --- a/docs/sdk/models/errors/getbannerimageunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetBannerImageUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetBannerImageUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetBannerImageMediaErrors](../../../sdk/models/errors/getbannerimagemediaerrors.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/getbutlertasksbadrequest.md b/docs/sdk/models/errors/getbutlertasksbadrequest.md deleted file mode 100644 index fa8b643f..00000000 --- a/docs/sdk/models/errors/getbutlertasksbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetButlerTasksBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetButlerTasksBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `errors` | [errors.GetButlerTasksErrors](../../../sdk/models/errors/getbutlertaskserrors.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/getbutlertasksbutlererrors.md b/docs/sdk/models/errors/getbutlertasksbutlererrors.md deleted file mode 100644 index b7df223c..00000000 --- a/docs/sdk/models/errors/getbutlertasksbutlererrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetButlerTasksButlerErrors - -## Example Usage - -```typescript -import { GetButlerTasksButlerErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetButlerTasksButlerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getbutlertaskserrors.md b/docs/sdk/models/errors/getbutlertaskserrors.md deleted file mode 100644 index 815e6809..00000000 --- a/docs/sdk/models/errors/getbutlertaskserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetButlerTasksErrors - -## Example Usage - -```typescript -import { GetButlerTasksErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetButlerTasksErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getbutlertasksunauthorized.md b/docs/sdk/models/errors/getbutlertasksunauthorized.md deleted file mode 100644 index 5fe8a9f0..00000000 --- a/docs/sdk/models/errors/getbutlertasksunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetButlerTasksUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetButlerTasksUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetButlerTasksButlerErrors](../../../sdk/models/errors/getbutlertasksbutlererrors.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/getcompanionsdatabadrequest.md b/docs/sdk/models/errors/getcompanionsdatabadrequest.md deleted file mode 100644 index d1fe40d9..00000000 --- a/docs/sdk/models/errors/getcompanionsdatabadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetCompanionsDataBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetCompanionsDataBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `errors` | [errors.GetCompanionsDataErrors](../../../sdk/models/errors/getcompanionsdataerrors.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/getcompanionsdataerrors.md b/docs/sdk/models/errors/getcompanionsdataerrors.md deleted file mode 100644 index 2b4a0842..00000000 --- a/docs/sdk/models/errors/getcompanionsdataerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetCompanionsDataErrors - -## Example Usage - -```typescript -import { GetCompanionsDataErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetCompanionsDataErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getcompanionsdataplexerrors.md b/docs/sdk/models/errors/getcompanionsdataplexerrors.md deleted file mode 100644 index 882ec52f..00000000 --- a/docs/sdk/models/errors/getcompanionsdataplexerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetCompanionsDataPlexErrors - -## Example Usage - -```typescript -import { GetCompanionsDataPlexErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetCompanionsDataPlexErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getcompanionsdataunauthorized.md b/docs/sdk/models/errors/getcompanionsdataunauthorized.md deleted file mode 100644 index 53cfba90..00000000 --- a/docs/sdk/models/errors/getcompanionsdataunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetCompanionsDataUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetCompanionsDataUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetCompanionsDataPlexErrors](../../../sdk/models/errors/getcompanionsdataplexerrors.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/getcountrieslibrarybadrequest.md b/docs/sdk/models/errors/getcountrieslibrarybadrequest.md deleted file mode 100644 index 299a0e68..00000000 --- a/docs/sdk/models/errors/getcountrieslibrarybadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetCountriesLibraryBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetCountriesLibraryBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetCountriesLibraryErrors](../../../sdk/models/errors/getcountrieslibraryerrors.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/getcountrieslibraryerrors.md b/docs/sdk/models/errors/getcountrieslibraryerrors.md deleted file mode 100644 index c8897a57..00000000 --- a/docs/sdk/models/errors/getcountrieslibraryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetCountriesLibraryErrors - -## Example Usage - -```typescript -import { GetCountriesLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetCountriesLibraryErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getcountrieslibrarylibraryerrors.md b/docs/sdk/models/errors/getcountrieslibrarylibraryerrors.md deleted file mode 100644 index 96c78f9b..00000000 --- a/docs/sdk/models/errors/getcountrieslibrarylibraryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetCountriesLibraryLibraryErrors - -## Example Usage - -```typescript -import { GetCountriesLibraryLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetCountriesLibraryLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getcountrieslibraryunauthorized.md b/docs/sdk/models/errors/getcountrieslibraryunauthorized.md deleted file mode 100644 index 0fca2b33..00000000 --- a/docs/sdk/models/errors/getcountrieslibraryunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetCountriesLibraryUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetCountriesLibraryUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetCountriesLibraryLibraryErrors](../../../sdk/models/errors/getcountrieslibrarylibraryerrors.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/getdevicesbadrequest.md b/docs/sdk/models/errors/getdevicesbadrequest.md deleted file mode 100644 index bb6f9ced..00000000 --- a/docs/sdk/models/errors/getdevicesbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetDevicesBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetDevicesBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `errors` | [errors.GetDevicesErrors](../../../sdk/models/errors/getdeviceserrors.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/getdeviceserrors.md b/docs/sdk/models/errors/getdeviceserrors.md deleted file mode 100644 index ec140711..00000000 --- a/docs/sdk/models/errors/getdeviceserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetDevicesErrors - -## Example Usage - -```typescript -import { GetDevicesErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetDevicesErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getdevicesservererrors.md b/docs/sdk/models/errors/getdevicesservererrors.md deleted file mode 100644 index d2ef04b8..00000000 --- a/docs/sdk/models/errors/getdevicesservererrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetDevicesServerErrors - -## Example Usage - -```typescript -import { GetDevicesServerErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetDevicesServerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getdevicesunauthorized.md b/docs/sdk/models/errors/getdevicesunauthorized.md deleted file mode 100644 index 49614bed..00000000 --- a/docs/sdk/models/errors/getdevicesunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetDevicesUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetDevicesUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `errors` | [errors.GetDevicesServerErrors](../../../sdk/models/errors/getdevicesservererrors.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/getfilehashbadrequest.md b/docs/sdk/models/errors/getfilehashbadrequest.md deleted file mode 100644 index 53526aec..00000000 --- a/docs/sdk/models/errors/getfilehashbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetFileHashBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetFileHashBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `errors` | [errors.GetFileHashErrors](../../../sdk/models/errors/getfilehasherrors.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/getfilehasherrors.md b/docs/sdk/models/errors/getfilehasherrors.md deleted file mode 100644 index f836c2ea..00000000 --- a/docs/sdk/models/errors/getfilehasherrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetFileHashErrors - -## Example Usage - -```typescript -import { GetFileHashErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetFileHashErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getfilehashlibraryerrors.md b/docs/sdk/models/errors/getfilehashlibraryerrors.md deleted file mode 100644 index d5087398..00000000 --- a/docs/sdk/models/errors/getfilehashlibraryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetFileHashLibraryErrors - -## Example Usage - -```typescript -import { GetFileHashLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetFileHashLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getfilehashunauthorized.md b/docs/sdk/models/errors/getfilehashunauthorized.md deleted file mode 100644 index f1f6acf8..00000000 --- a/docs/sdk/models/errors/getfilehashunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetFileHashUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetFileHashUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetFileHashLibraryErrors](../../../sdk/models/errors/getfilehashlibraryerrors.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/getgenreslibrarybadrequest.md b/docs/sdk/models/errors/getgenreslibrarybadrequest.md deleted file mode 100644 index 61750fe1..00000000 --- a/docs/sdk/models/errors/getgenreslibrarybadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetGenresLibraryBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetGenresLibraryBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `errors` | [errors.GetGenresLibraryErrors](../../../sdk/models/errors/getgenreslibraryerrors.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/getgenreslibraryerrors.md b/docs/sdk/models/errors/getgenreslibraryerrors.md deleted file mode 100644 index 021ff6f0..00000000 --- a/docs/sdk/models/errors/getgenreslibraryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetGenresLibraryErrors - -## Example Usage - -```typescript -import { GetGenresLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetGenresLibraryErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getgenreslibrarylibraryerrors.md b/docs/sdk/models/errors/getgenreslibrarylibraryerrors.md deleted file mode 100644 index dc89f89e..00000000 --- a/docs/sdk/models/errors/getgenreslibrarylibraryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetGenresLibraryLibraryErrors - -## Example Usage - -```typescript -import { GetGenresLibraryLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetGenresLibraryLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getgenreslibraryunauthorized.md b/docs/sdk/models/errors/getgenreslibraryunauthorized.md deleted file mode 100644 index b6b81338..00000000 --- a/docs/sdk/models/errors/getgenreslibraryunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetGenresLibraryUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetGenresLibraryUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetGenresLibraryLibraryErrors](../../../sdk/models/errors/getgenreslibrarylibraryerrors.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/getgeodatabadrequest.md b/docs/sdk/models/errors/getgeodatabadrequest.md deleted file mode 100644 index 506b2edd..00000000 --- a/docs/sdk/models/errors/getgeodatabadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetGeoDataBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetGeoDataBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `errors` | [errors.GetGeoDataErrors](../../../sdk/models/errors/getgeodataerrors.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/getgeodataerrors.md b/docs/sdk/models/errors/getgeodataerrors.md deleted file mode 100644 index 5833fc71..00000000 --- a/docs/sdk/models/errors/getgeodataerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetGeoDataErrors - -## Example Usage - -```typescript -import { GetGeoDataErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetGeoDataErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getgeodataplexerrors.md b/docs/sdk/models/errors/getgeodataplexerrors.md deleted file mode 100644 index 28ddd506..00000000 --- a/docs/sdk/models/errors/getgeodataplexerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetGeoDataPlexErrors - -## Example Usage - -```typescript -import { GetGeoDataPlexErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetGeoDataPlexErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getgeodataunauthorized.md b/docs/sdk/models/errors/getgeodataunauthorized.md deleted file mode 100644 index 5f03ad8e..00000000 --- a/docs/sdk/models/errors/getgeodataunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetGeoDataUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetGeoDataUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `errors` | [errors.GetGeoDataPlexErrors](../../../sdk/models/errors/getgeodataplexerrors.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/getglobalhubsbadrequest.md b/docs/sdk/models/errors/getglobalhubsbadrequest.md deleted file mode 100644 index 5fae13f0..00000000 --- a/docs/sdk/models/errors/getglobalhubsbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetGlobalHubsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetGlobalHubsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `errors` | [errors.GetGlobalHubsErrors](../../../sdk/models/errors/getglobalhubserrors.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/getglobalhubserrors.md b/docs/sdk/models/errors/getglobalhubserrors.md deleted file mode 100644 index 8bf89f4d..00000000 --- a/docs/sdk/models/errors/getglobalhubserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetGlobalHubsErrors - -## Example Usage - -```typescript -import { GetGlobalHubsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetGlobalHubsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getglobalhubshubserrors.md b/docs/sdk/models/errors/getglobalhubshubserrors.md deleted file mode 100644 index 19e3e723..00000000 --- a/docs/sdk/models/errors/getglobalhubshubserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetGlobalHubsHubsErrors - -## Example Usage - -```typescript -import { GetGlobalHubsHubsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetGlobalHubsHubsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getglobalhubsunauthorized.md b/docs/sdk/models/errors/getglobalhubsunauthorized.md deleted file mode 100644 index ab5adb83..00000000 --- a/docs/sdk/models/errors/getglobalhubsunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetGlobalHubsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetGlobalHubsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `errors` | [errors.GetGlobalHubsHubsErrors](../../../sdk/models/errors/getglobalhubshubserrors.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/gethomedatabadrequest.md b/docs/sdk/models/errors/gethomedatabadrequest.md deleted file mode 100644 index c845207f..00000000 --- a/docs/sdk/models/errors/gethomedatabadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetHomeDataBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetHomeDataBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `errors` | [errors.GetHomeDataErrors](../../../sdk/models/errors/gethomedataerrors.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/gethomedataerrors.md b/docs/sdk/models/errors/gethomedataerrors.md deleted file mode 100644 index de510616..00000000 --- a/docs/sdk/models/errors/gethomedataerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetHomeDataErrors - -## Example Usage - -```typescript -import { GetHomeDataErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetHomeDataErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/gethomedataplexerrors.md b/docs/sdk/models/errors/gethomedataplexerrors.md deleted file mode 100644 index c9fa6f4a..00000000 --- a/docs/sdk/models/errors/gethomedataplexerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetHomeDataPlexErrors - -## Example Usage - -```typescript -import { GetHomeDataPlexErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetHomeDataPlexErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/gethomedataunauthorized.md b/docs/sdk/models/errors/gethomedataunauthorized.md deleted file mode 100644 index bee5fccb..00000000 --- a/docs/sdk/models/errors/gethomedataunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetHomeDataUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetHomeDataUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | [errors.GetHomeDataPlexErrors](../../../sdk/models/errors/gethomedataplexerrors.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/getlibrarydetailsbadrequest.md b/docs/sdk/models/errors/getlibrarydetailsbadrequest.md deleted file mode 100644 index 47966b92..00000000 --- a/docs/sdk/models/errors/getlibrarydetailsbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetLibraryDetailsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetLibraryDetailsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `errors` | [errors.GetLibraryDetailsErrors](../../../sdk/models/errors/getlibrarydetailserrors.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/getlibrarydetailserrors.md b/docs/sdk/models/errors/getlibrarydetailserrors.md deleted file mode 100644 index bf0a14b3..00000000 --- a/docs/sdk/models/errors/getlibrarydetailserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetLibraryDetailsErrors - -## Example Usage - -```typescript -import { GetLibraryDetailsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetLibraryDetailsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getlibrarydetailslibraryerrors.md b/docs/sdk/models/errors/getlibrarydetailslibraryerrors.md deleted file mode 100644 index 1f0be31e..00000000 --- a/docs/sdk/models/errors/getlibrarydetailslibraryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetLibraryDetailsLibraryErrors - -## Example Usage - -```typescript -import { GetLibraryDetailsLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetLibraryDetailsLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getlibrarydetailsunauthorized.md b/docs/sdk/models/errors/getlibrarydetailsunauthorized.md deleted file mode 100644 index b8da3499..00000000 --- a/docs/sdk/models/errors/getlibrarydetailsunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetLibraryDetailsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetLibraryDetailsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetLibraryDetailsLibraryErrors](../../../sdk/models/errors/getlibrarydetailslibraryerrors.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/getlibraryhubsbadrequest.md b/docs/sdk/models/errors/getlibraryhubsbadrequest.md deleted file mode 100644 index bd2cc367..00000000 --- a/docs/sdk/models/errors/getlibraryhubsbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetLibraryHubsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetLibraryHubsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `errors` | [errors.GetLibraryHubsErrors](../../../sdk/models/errors/getlibraryhubserrors.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/getlibraryhubserrors.md b/docs/sdk/models/errors/getlibraryhubserrors.md deleted file mode 100644 index 32ea934f..00000000 --- a/docs/sdk/models/errors/getlibraryhubserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetLibraryHubsErrors - -## Example Usage - -```typescript -import { GetLibraryHubsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetLibraryHubsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getlibraryhubshubserrors.md b/docs/sdk/models/errors/getlibraryhubshubserrors.md deleted file mode 100644 index e7f7bc7a..00000000 --- a/docs/sdk/models/errors/getlibraryhubshubserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetLibraryHubsHubsErrors - -## Example Usage - -```typescript -import { GetLibraryHubsHubsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetLibraryHubsHubsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getlibraryhubsunauthorized.md b/docs/sdk/models/errors/getlibraryhubsunauthorized.md deleted file mode 100644 index 567701a5..00000000 --- a/docs/sdk/models/errors/getlibraryhubsunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetLibraryHubsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetLibraryHubsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetLibraryHubsHubsErrors](../../../sdk/models/errors/getlibraryhubshubserrors.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/getlibraryitemsbadrequest.md b/docs/sdk/models/errors/getlibraryitemsbadrequest.md deleted file mode 100644 index dd222c3a..00000000 --- a/docs/sdk/models/errors/getlibraryitemsbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetLibraryItemsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetLibraryItemsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | [errors.GetLibraryItemsErrors](../../../sdk/models/errors/getlibraryitemserrors.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/getlibraryitemserrors.md b/docs/sdk/models/errors/getlibraryitemserrors.md deleted file mode 100644 index 4ddd74e5..00000000 --- a/docs/sdk/models/errors/getlibraryitemserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetLibraryItemsErrors - -## Example Usage - -```typescript -import { GetLibraryItemsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetLibraryItemsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getlibraryitemslibraryerrors.md b/docs/sdk/models/errors/getlibraryitemslibraryerrors.md deleted file mode 100644 index ffa0be3d..00000000 --- a/docs/sdk/models/errors/getlibraryitemslibraryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetLibraryItemsLibraryErrors - -## Example Usage - -```typescript -import { GetLibraryItemsLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetLibraryItemsLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getlibraryitemsunauthorized.md b/docs/sdk/models/errors/getlibraryitemsunauthorized.md deleted file mode 100644 index 28ea8e6a..00000000 --- a/docs/sdk/models/errors/getlibraryitemsunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetLibraryItemsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetLibraryItemsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetLibraryItemsLibraryErrors](../../../sdk/models/errors/getlibraryitemslibraryerrors.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/getlibrarysectionsallbadrequest.md b/docs/sdk/models/errors/getlibrarysectionsallbadrequest.md deleted file mode 100644 index 90567f2e..00000000 --- a/docs/sdk/models/errors/getlibrarysectionsallbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetLibrarySectionsAllBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetLibrarySectionsAllBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetLibrarySectionsAllErrors](../../../sdk/models/errors/getlibrarysectionsallerrors.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/getlibrarysectionsallerrors.md b/docs/sdk/models/errors/getlibrarysectionsallerrors.md deleted file mode 100644 index 9f15d6cb..00000000 --- a/docs/sdk/models/errors/getlibrarysectionsallerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetLibrarySectionsAllErrors - -## Example Usage - -```typescript -import { GetLibrarySectionsAllErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetLibrarySectionsAllErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getlibrarysectionsalllibraryerrors.md b/docs/sdk/models/errors/getlibrarysectionsalllibraryerrors.md deleted file mode 100644 index ff20964b..00000000 --- a/docs/sdk/models/errors/getlibrarysectionsalllibraryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetLibrarySectionsAllLibraryErrors - -## Example Usage - -```typescript -import { GetLibrarySectionsAllLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetLibrarySectionsAllLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getlibrarysectionsallunauthorized.md b/docs/sdk/models/errors/getlibrarysectionsallunauthorized.md deleted file mode 100644 index ae5a0591..00000000 --- a/docs/sdk/models/errors/getlibrarysectionsallunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetLibrarySectionsAllUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetLibrarySectionsAllUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetLibrarySectionsAllLibraryErrors](../../../sdk/models/errors/getlibrarysectionsalllibraryerrors.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/getmediametadatabadrequest.md b/docs/sdk/models/errors/getmediametadatabadrequest.md deleted file mode 100644 index c2d925ea..00000000 --- a/docs/sdk/models/errors/getmediametadatabadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetMediaMetaDataBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetMediaMetaDataBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `errors` | [errors.GetMediaMetaDataErrors](../../../sdk/models/errors/getmediametadataerrors.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/getmediametadataerrors.md b/docs/sdk/models/errors/getmediametadataerrors.md deleted file mode 100644 index f12e7ffe..00000000 --- a/docs/sdk/models/errors/getmediametadataerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetMediaMetaDataErrors - -## Example Usage - -```typescript -import { GetMediaMetaDataErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetMediaMetaDataErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getmediametadatalibraryerrors.md b/docs/sdk/models/errors/getmediametadatalibraryerrors.md deleted file mode 100644 index 547033b0..00000000 --- a/docs/sdk/models/errors/getmediametadatalibraryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetMediaMetaDataLibraryErrors - -## Example Usage - -```typescript -import { GetMediaMetaDataLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetMediaMetaDataLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getmediametadataunauthorized.md b/docs/sdk/models/errors/getmediametadataunauthorized.md deleted file mode 100644 index d5d01f2a..00000000 --- a/docs/sdk/models/errors/getmediametadataunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetMediaMetaDataUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetMediaMetaDataUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetMediaMetaDataLibraryErrors](../../../sdk/models/errors/getmediametadatalibraryerrors.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/getmediaprovidersbadrequest.md b/docs/sdk/models/errors/getmediaprovidersbadrequest.md deleted file mode 100644 index 01706bdf..00000000 --- a/docs/sdk/models/errors/getmediaprovidersbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetMediaProvidersBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetMediaProvidersBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `errors` | [errors.GetMediaProvidersErrors](../../../sdk/models/errors/getmediaproviderserrors.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/getmediaproviderserrors.md b/docs/sdk/models/errors/getmediaproviderserrors.md deleted file mode 100644 index 22d946a7..00000000 --- a/docs/sdk/models/errors/getmediaproviderserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetMediaProvidersErrors - -## Example Usage - -```typescript -import { GetMediaProvidersErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetMediaProvidersErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getmediaprovidersservererrors.md b/docs/sdk/models/errors/getmediaprovidersservererrors.md deleted file mode 100644 index f31ab63a..00000000 --- a/docs/sdk/models/errors/getmediaprovidersservererrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetMediaProvidersServerErrors - -## Example Usage - -```typescript -import { GetMediaProvidersServerErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetMediaProvidersServerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getmediaprovidersunauthorized.md b/docs/sdk/models/errors/getmediaprovidersunauthorized.md deleted file mode 100644 index 315ee3ed..00000000 --- a/docs/sdk/models/errors/getmediaprovidersunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetMediaProvidersUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetMediaProvidersUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetMediaProvidersServerErrors](../../../sdk/models/errors/getmediaprovidersservererrors.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/getmetadatachildrenbadrequest.md b/docs/sdk/models/errors/getmetadatachildrenbadrequest.md deleted file mode 100644 index 7934e0fb..00000000 --- a/docs/sdk/models/errors/getmetadatachildrenbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetMetadataChildrenBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetMetadataChildrenBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetMetadataChildrenErrors](../../../sdk/models/errors/getmetadatachildrenerrors.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/getmetadatachildrenerrors.md b/docs/sdk/models/errors/getmetadatachildrenerrors.md deleted file mode 100644 index dba3735d..00000000 --- a/docs/sdk/models/errors/getmetadatachildrenerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetMetadataChildrenErrors - -## Example Usage - -```typescript -import { GetMetadataChildrenErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetMetadataChildrenErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getmetadatachildrenlibraryerrors.md b/docs/sdk/models/errors/getmetadatachildrenlibraryerrors.md deleted file mode 100644 index f9c34ca1..00000000 --- a/docs/sdk/models/errors/getmetadatachildrenlibraryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetMetadataChildrenLibraryErrors - -## Example Usage - -```typescript -import { GetMetadataChildrenLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetMetadataChildrenLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getmetadatachildrenunauthorized.md b/docs/sdk/models/errors/getmetadatachildrenunauthorized.md deleted file mode 100644 index 57475a1a..00000000 --- a/docs/sdk/models/errors/getmetadatachildrenunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetMetadataChildrenUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetMetadataChildrenUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetMetadataChildrenLibraryErrors](../../../sdk/models/errors/getmetadatachildrenlibraryerrors.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/getmyplexaccountbadrequest.md b/docs/sdk/models/errors/getmyplexaccountbadrequest.md deleted file mode 100644 index 05a2b2a9..00000000 --- a/docs/sdk/models/errors/getmyplexaccountbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetMyPlexAccountBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetMyPlexAccountBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `errors` | [errors.GetMyPlexAccountErrors](../../../sdk/models/errors/getmyplexaccounterrors.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/getmyplexaccounterrors.md b/docs/sdk/models/errors/getmyplexaccounterrors.md deleted file mode 100644 index a2ce1239..00000000 --- a/docs/sdk/models/errors/getmyplexaccounterrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetMyPlexAccountErrors - -## Example Usage - -```typescript -import { GetMyPlexAccountErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetMyPlexAccountErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getmyplexaccountservererrors.md b/docs/sdk/models/errors/getmyplexaccountservererrors.md deleted file mode 100644 index 24335960..00000000 --- a/docs/sdk/models/errors/getmyplexaccountservererrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetMyPlexAccountServerErrors - -## Example Usage - -```typescript -import { GetMyPlexAccountServerErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetMyPlexAccountServerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getmyplexaccountunauthorized.md b/docs/sdk/models/errors/getmyplexaccountunauthorized.md deleted file mode 100644 index 047faf79..00000000 --- a/docs/sdk/models/errors/getmyplexaccountunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetMyPlexAccountUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetMyPlexAccountUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetMyPlexAccountServerErrors](../../../sdk/models/errors/getmyplexaccountservererrors.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/getpinbadrequest.md b/docs/sdk/models/errors/getpinbadrequest.md deleted file mode 100644 index fa042221..00000000 --- a/docs/sdk/models/errors/getpinbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetPinBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetPinBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `errors` | [errors.GetPinErrors](../../../sdk/models/errors/getpinerrors.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/getpinerrors.md b/docs/sdk/models/errors/getpinerrors.md deleted file mode 100644 index 961b90b4..00000000 --- a/docs/sdk/models/errors/getpinerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetPinErrors - -## Example Usage - -```typescript -import { GetPinErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetPinErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getplaylistbadrequest.md b/docs/sdk/models/errors/getplaylistbadrequest.md deleted file mode 100644 index 27623349..00000000 --- a/docs/sdk/models/errors/getplaylistbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetPlaylistBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetPlaylistBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `errors` | [errors.GetPlaylistErrors](../../../sdk/models/errors/getplaylisterrors.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/getplaylistcontentsbadrequest.md b/docs/sdk/models/errors/getplaylistcontentsbadrequest.md deleted file mode 100644 index 44788a9e..00000000 --- a/docs/sdk/models/errors/getplaylistcontentsbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetPlaylistContentsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetPlaylistContentsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetPlaylistContentsErrors](../../../sdk/models/errors/getplaylistcontentserrors.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/getplaylistcontentserrors.md b/docs/sdk/models/errors/getplaylistcontentserrors.md deleted file mode 100644 index b927c5ce..00000000 --- a/docs/sdk/models/errors/getplaylistcontentserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetPlaylistContentsErrors - -## Example Usage - -```typescript -import { GetPlaylistContentsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetPlaylistContentsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getplaylistcontentsplaylistserrors.md b/docs/sdk/models/errors/getplaylistcontentsplaylistserrors.md deleted file mode 100644 index 7c6e67f9..00000000 --- a/docs/sdk/models/errors/getplaylistcontentsplaylistserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetPlaylistContentsPlaylistsErrors - -## Example Usage - -```typescript -import { GetPlaylistContentsPlaylistsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetPlaylistContentsPlaylistsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getplaylistcontentsunauthorized.md b/docs/sdk/models/errors/getplaylistcontentsunauthorized.md deleted file mode 100644 index 50078bf6..00000000 --- a/docs/sdk/models/errors/getplaylistcontentsunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetPlaylistContentsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetPlaylistContentsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetPlaylistContentsPlaylistsErrors](../../../sdk/models/errors/getplaylistcontentsplaylistserrors.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/getplaylisterrors.md b/docs/sdk/models/errors/getplaylisterrors.md deleted file mode 100644 index 6e7233a2..00000000 --- a/docs/sdk/models/errors/getplaylisterrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetPlaylistErrors - -## Example Usage - -```typescript -import { GetPlaylistErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetPlaylistErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getplaylistplaylistserrors.md b/docs/sdk/models/errors/getplaylistplaylistserrors.md deleted file mode 100644 index 69b0203d..00000000 --- a/docs/sdk/models/errors/getplaylistplaylistserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetPlaylistPlaylistsErrors - -## Example Usage - -```typescript -import { GetPlaylistPlaylistsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetPlaylistPlaylistsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getplaylistsbadrequest.md b/docs/sdk/models/errors/getplaylistsbadrequest.md deleted file mode 100644 index 6de5f414..00000000 --- a/docs/sdk/models/errors/getplaylistsbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetPlaylistsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetPlaylistsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `errors` | [errors.GetPlaylistsErrors](../../../sdk/models/errors/getplaylistserrors.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/getplaylistserrors.md b/docs/sdk/models/errors/getplaylistserrors.md deleted file mode 100644 index 3fc820bb..00000000 --- a/docs/sdk/models/errors/getplaylistserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetPlaylistsErrors - -## Example Usage - -```typescript -import { GetPlaylistsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetPlaylistsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getplaylistsplaylistserrors.md b/docs/sdk/models/errors/getplaylistsplaylistserrors.md deleted file mode 100644 index f2acdc2d..00000000 --- a/docs/sdk/models/errors/getplaylistsplaylistserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetPlaylistsPlaylistsErrors - -## Example Usage - -```typescript -import { GetPlaylistsPlaylistsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetPlaylistsPlaylistsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getplaylistsunauthorized.md b/docs/sdk/models/errors/getplaylistsunauthorized.md deleted file mode 100644 index 907a2cc7..00000000 --- a/docs/sdk/models/errors/getplaylistsunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetPlaylistsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetPlaylistsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetPlaylistsPlaylistsErrors](../../../sdk/models/errors/getplaylistsplaylistserrors.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/getplaylistunauthorized.md b/docs/sdk/models/errors/getplaylistunauthorized.md deleted file mode 100644 index 33b891a9..00000000 --- a/docs/sdk/models/errors/getplaylistunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetPlaylistUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetPlaylistUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetPlaylistPlaylistsErrors](../../../sdk/models/errors/getplaylistplaylistserrors.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/getrecentlyaddedlibrarybadrequest.md b/docs/sdk/models/errors/getrecentlyaddedlibrarybadrequest.md deleted file mode 100644 index 0a6c5598..00000000 --- a/docs/sdk/models/errors/getrecentlyaddedlibrarybadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetRecentlyAddedLibraryBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetRecentlyAddedLibraryBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetRecentlyAddedLibraryErrors](../../../sdk/models/errors/getrecentlyaddedlibraryerrors.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/getrecentlyaddedlibraryerrors.md b/docs/sdk/models/errors/getrecentlyaddedlibraryerrors.md deleted file mode 100644 index 1c352baf..00000000 --- a/docs/sdk/models/errors/getrecentlyaddedlibraryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetRecentlyAddedLibraryErrors - -## Example Usage - -```typescript -import { GetRecentlyAddedLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetRecentlyAddedLibraryErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getrecentlyaddedlibrarylibraryerrors.md b/docs/sdk/models/errors/getrecentlyaddedlibrarylibraryerrors.md deleted file mode 100644 index 648701c2..00000000 --- a/docs/sdk/models/errors/getrecentlyaddedlibrarylibraryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetRecentlyAddedLibraryLibraryErrors - -## Example Usage - -```typescript -import { GetRecentlyAddedLibraryLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetRecentlyAddedLibraryLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getrecentlyaddedlibraryunauthorized.md b/docs/sdk/models/errors/getrecentlyaddedlibraryunauthorized.md deleted file mode 100644 index b1c4d786..00000000 --- a/docs/sdk/models/errors/getrecentlyaddedlibraryunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetRecentlyAddedLibraryUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetRecentlyAddedLibraryUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetRecentlyAddedLibraryLibraryErrors](../../../sdk/models/errors/getrecentlyaddedlibrarylibraryerrors.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/getrefreshlibrarymetadatabadrequest.md b/docs/sdk/models/errors/getrefreshlibrarymetadatabadrequest.md deleted file mode 100644 index b2add72d..00000000 --- a/docs/sdk/models/errors/getrefreshlibrarymetadatabadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetRefreshLibraryMetadataBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetRefreshLibraryMetadataBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetRefreshLibraryMetadataErrors](../../../sdk/models/errors/getrefreshlibrarymetadataerrors.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/getrefreshlibrarymetadataerrors.md b/docs/sdk/models/errors/getrefreshlibrarymetadataerrors.md deleted file mode 100644 index db832209..00000000 --- a/docs/sdk/models/errors/getrefreshlibrarymetadataerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetRefreshLibraryMetadataErrors - -## Example Usage - -```typescript -import { GetRefreshLibraryMetadataErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetRefreshLibraryMetadataErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getrefreshlibrarymetadatalibraryerrors.md b/docs/sdk/models/errors/getrefreshlibrarymetadatalibraryerrors.md deleted file mode 100644 index b234090e..00000000 --- a/docs/sdk/models/errors/getrefreshlibrarymetadatalibraryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetRefreshLibraryMetadataLibraryErrors - -## Example Usage - -```typescript -import { GetRefreshLibraryMetadataLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetRefreshLibraryMetadataLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getrefreshlibrarymetadataunauthorized.md b/docs/sdk/models/errors/getrefreshlibrarymetadataunauthorized.md deleted file mode 100644 index 1c8fd64e..00000000 --- a/docs/sdk/models/errors/getrefreshlibrarymetadataunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetRefreshLibraryMetadataUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetRefreshLibraryMetadataUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetRefreshLibraryMetadataLibraryErrors](../../../sdk/models/errors/getrefreshlibrarymetadatalibraryerrors.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/getresizedphotobadrequest.md b/docs/sdk/models/errors/getresizedphotobadrequest.md deleted file mode 100644 index ad518326..00000000 --- a/docs/sdk/models/errors/getresizedphotobadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetResizedPhotoBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetResizedPhotoBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | [errors.GetResizedPhotoErrors](../../../sdk/models/errors/getresizedphotoerrors.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/getresizedphotoerrors.md b/docs/sdk/models/errors/getresizedphotoerrors.md deleted file mode 100644 index 129dca12..00000000 --- a/docs/sdk/models/errors/getresizedphotoerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetResizedPhotoErrors - -## Example Usage - -```typescript -import { GetResizedPhotoErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetResizedPhotoErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getresizedphotoservererrors.md b/docs/sdk/models/errors/getresizedphotoservererrors.md deleted file mode 100644 index 64a42b26..00000000 --- a/docs/sdk/models/errors/getresizedphotoservererrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetResizedPhotoServerErrors - -## Example Usage - -```typescript -import { GetResizedPhotoServerErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetResizedPhotoServerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getresizedphotounauthorized.md b/docs/sdk/models/errors/getresizedphotounauthorized.md deleted file mode 100644 index d0873a7a..00000000 --- a/docs/sdk/models/errors/getresizedphotounauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetResizedPhotoUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetResizedPhotoUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetResizedPhotoServerErrors](../../../sdk/models/errors/getresizedphotoservererrors.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/getresourcesstatisticsbadrequest.md b/docs/sdk/models/errors/getresourcesstatisticsbadrequest.md deleted file mode 100644 index 2c1772e1..00000000 --- a/docs/sdk/models/errors/getresourcesstatisticsbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetResourcesStatisticsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetResourcesStatisticsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetResourcesStatisticsErrors](../../../sdk/models/errors/getresourcesstatisticserrors.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/getresourcesstatisticserrors.md b/docs/sdk/models/errors/getresourcesstatisticserrors.md deleted file mode 100644 index 265471e9..00000000 --- a/docs/sdk/models/errors/getresourcesstatisticserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetResourcesStatisticsErrors - -## Example Usage - -```typescript -import { GetResourcesStatisticsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetResourcesStatisticsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getresourcesstatisticsstatisticserrors.md b/docs/sdk/models/errors/getresourcesstatisticsstatisticserrors.md deleted file mode 100644 index 82e87186..00000000 --- a/docs/sdk/models/errors/getresourcesstatisticsstatisticserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetResourcesStatisticsStatisticsErrors - -## Example Usage - -```typescript -import { GetResourcesStatisticsStatisticsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetResourcesStatisticsStatisticsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getresourcesstatisticsunauthorized.md b/docs/sdk/models/errors/getresourcesstatisticsunauthorized.md deleted file mode 100644 index 1e90ddb0..00000000 --- a/docs/sdk/models/errors/getresourcesstatisticsunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetResourcesStatisticsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetResourcesStatisticsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetResourcesStatisticsStatisticsErrors](../../../sdk/models/errors/getresourcesstatisticsstatisticserrors.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/getsearchalllibrariesbadrequest.md b/docs/sdk/models/errors/getsearchalllibrariesbadrequest.md deleted file mode 100644 index cfa498a4..00000000 --- a/docs/sdk/models/errors/getsearchalllibrariesbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetSearchAllLibrariesBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetSearchAllLibrariesBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetSearchAllLibrariesErrors](../../../sdk/models/errors/getsearchalllibrarieserrors.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/getsearchalllibrarieserrors.md b/docs/sdk/models/errors/getsearchalllibrarieserrors.md deleted file mode 100644 index a10ffd0c..00000000 --- a/docs/sdk/models/errors/getsearchalllibrarieserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetSearchAllLibrariesErrors - -## Example Usage - -```typescript -import { GetSearchAllLibrariesErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetSearchAllLibrariesErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getsearchalllibrarieslibraryerrors.md b/docs/sdk/models/errors/getsearchalllibrarieslibraryerrors.md deleted file mode 100644 index f7541f5f..00000000 --- a/docs/sdk/models/errors/getsearchalllibrarieslibraryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetSearchAllLibrariesLibraryErrors - -## Example Usage - -```typescript -import { GetSearchAllLibrariesLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetSearchAllLibrariesLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getsearchalllibrariesunauthorized.md b/docs/sdk/models/errors/getsearchalllibrariesunauthorized.md deleted file mode 100644 index 09ae2904..00000000 --- a/docs/sdk/models/errors/getsearchalllibrariesunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetSearchAllLibrariesUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetSearchAllLibrariesUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetSearchAllLibrariesLibraryErrors](../../../sdk/models/errors/getsearchalllibrarieslibraryerrors.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/getsearchlibrarybadrequest.md b/docs/sdk/models/errors/getsearchlibrarybadrequest.md deleted file mode 100644 index 262774e4..00000000 --- a/docs/sdk/models/errors/getsearchlibrarybadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetSearchLibraryBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetSearchLibraryBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `errors` | [errors.GetSearchLibraryErrors](../../../sdk/models/errors/getsearchlibraryerrors.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/getsearchlibraryerrors.md b/docs/sdk/models/errors/getsearchlibraryerrors.md deleted file mode 100644 index eed26eef..00000000 --- a/docs/sdk/models/errors/getsearchlibraryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetSearchLibraryErrors - -## Example Usage - -```typescript -import { GetSearchLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetSearchLibraryErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getsearchlibrarylibraryerrors.md b/docs/sdk/models/errors/getsearchlibrarylibraryerrors.md deleted file mode 100644 index 76aa207b..00000000 --- a/docs/sdk/models/errors/getsearchlibrarylibraryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetSearchLibraryLibraryErrors - -## Example Usage - -```typescript -import { GetSearchLibraryLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetSearchLibraryLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getsearchlibraryunauthorized.md b/docs/sdk/models/errors/getsearchlibraryunauthorized.md deleted file mode 100644 index 27f52db1..00000000 --- a/docs/sdk/models/errors/getsearchlibraryunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetSearchLibraryUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetSearchLibraryUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetSearchLibraryLibraryErrors](../../../sdk/models/errors/getsearchlibrarylibraryerrors.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/getsearchresultsbadrequest.md b/docs/sdk/models/errors/getsearchresultsbadrequest.md deleted file mode 100644 index 5493c5d8..00000000 --- a/docs/sdk/models/errors/getsearchresultsbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetSearchResultsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetSearchResultsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `errors` | [errors.GetSearchResultsErrors](../../../sdk/models/errors/getsearchresultserrors.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/getsearchresultserrors.md b/docs/sdk/models/errors/getsearchresultserrors.md deleted file mode 100644 index e3794d08..00000000 --- a/docs/sdk/models/errors/getsearchresultserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetSearchResultsErrors - -## Example Usage - -```typescript -import { GetSearchResultsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetSearchResultsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getsearchresultssearcherrors.md b/docs/sdk/models/errors/getsearchresultssearcherrors.md deleted file mode 100644 index 7724c4c8..00000000 --- a/docs/sdk/models/errors/getsearchresultssearcherrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetSearchResultsSearchErrors - -## Example Usage - -```typescript -import { GetSearchResultsSearchErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetSearchResultsSearchErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getsearchresultsunauthorized.md b/docs/sdk/models/errors/getsearchresultsunauthorized.md deleted file mode 100644 index bb78606f..00000000 --- a/docs/sdk/models/errors/getsearchresultsunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetSearchResultsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetSearchResultsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetSearchResultsSearchErrors](../../../sdk/models/errors/getsearchresultssearcherrors.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/getserveractivitiesactivitieserrors.md b/docs/sdk/models/errors/getserveractivitiesactivitieserrors.md deleted file mode 100644 index 37598fbd..00000000 --- a/docs/sdk/models/errors/getserveractivitiesactivitieserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetServerActivitiesActivitiesErrors - -## Example Usage - -```typescript -import { GetServerActivitiesActivitiesErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetServerActivitiesActivitiesErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getserveractivitiesbadrequest.md b/docs/sdk/models/errors/getserveractivitiesbadrequest.md deleted file mode 100644 index 6715c0ee..00000000 --- a/docs/sdk/models/errors/getserveractivitiesbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetServerActivitiesBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetServerActivitiesBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetServerActivitiesErrors](../../../sdk/models/errors/getserveractivitieserrors.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/getserveractivitieserrors.md b/docs/sdk/models/errors/getserveractivitieserrors.md deleted file mode 100644 index 62b87b24..00000000 --- a/docs/sdk/models/errors/getserveractivitieserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetServerActivitiesErrors - -## Example Usage - -```typescript -import { GetServerActivitiesErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetServerActivitiesErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getserveractivitiesunauthorized.md b/docs/sdk/models/errors/getserveractivitiesunauthorized.md deleted file mode 100644 index d3096ae1..00000000 --- a/docs/sdk/models/errors/getserveractivitiesunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetServerActivitiesUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetServerActivitiesUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetServerActivitiesActivitiesErrors](../../../sdk/models/errors/getserveractivitiesactivitieserrors.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/getservercapabilitiesbadrequest.md b/docs/sdk/models/errors/getservercapabilitiesbadrequest.md deleted file mode 100644 index b103e750..00000000 --- a/docs/sdk/models/errors/getservercapabilitiesbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetServerCapabilitiesBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetServerCapabilitiesBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `errors` | [errors.Errors](../../../sdk/models/errors/errors.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/getservercapabilitieserrors.md b/docs/sdk/models/errors/getservercapabilitieserrors.md deleted file mode 100644 index e46cc7e2..00000000 --- a/docs/sdk/models/errors/getservercapabilitieserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetServerCapabilitiesErrors - -## Example Usage - -```typescript -import { GetServerCapabilitiesErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetServerCapabilitiesErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getservercapabilitiesunauthorized.md b/docs/sdk/models/errors/getservercapabilitiesunauthorized.md deleted file mode 100644 index 4ce689ba..00000000 --- a/docs/sdk/models/errors/getservercapabilitiesunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetServerCapabilitiesUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetServerCapabilitiesUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetServerCapabilitiesErrors](../../../sdk/models/errors/getservercapabilitieserrors.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/getserveridentityrequesttimeout.md b/docs/sdk/models/errors/getserveridentityrequesttimeout.md deleted file mode 100644 index 166d2d5c..00000000 --- a/docs/sdk/models/errors/getserveridentityrequesttimeout.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetServerIdentityRequestTimeout - -Request Timeout - -## Example Usage - -```typescript -import { GetServerIdentityRequestTimeout } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 408 | -| `message` | *string* | :heavy_minus_sign: | N/A | The server timed out waiting for the request. | -| `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/getserverlistbadrequest.md b/docs/sdk/models/errors/getserverlistbadrequest.md deleted file mode 100644 index 045ea411..00000000 --- a/docs/sdk/models/errors/getserverlistbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetServerListBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetServerListBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `errors` | [errors.GetServerListErrors](../../../sdk/models/errors/getserverlisterrors.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/getserverlisterrors.md b/docs/sdk/models/errors/getserverlisterrors.md deleted file mode 100644 index 34370bfe..00000000 --- a/docs/sdk/models/errors/getserverlisterrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetServerListErrors - -## Example Usage - -```typescript -import { GetServerListErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetServerListErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getserverlistservererrors.md b/docs/sdk/models/errors/getserverlistservererrors.md deleted file mode 100644 index eaf070c4..00000000 --- a/docs/sdk/models/errors/getserverlistservererrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetServerListServerErrors - -## Example Usage - -```typescript -import { GetServerListServerErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetServerListServerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getserverlistunauthorized.md b/docs/sdk/models/errors/getserverlistunauthorized.md deleted file mode 100644 index f6846308..00000000 --- a/docs/sdk/models/errors/getserverlistunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetServerListUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetServerListUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetServerListServerErrors](../../../sdk/models/errors/getserverlistservererrors.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/getserverpreferencesbadrequest.md b/docs/sdk/models/errors/getserverpreferencesbadrequest.md deleted file mode 100644 index 3eec63dd..00000000 --- a/docs/sdk/models/errors/getserverpreferencesbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetServerPreferencesBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetServerPreferencesBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetServerPreferencesErrors](../../../sdk/models/errors/getserverpreferenceserrors.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/getserverpreferenceserrors.md b/docs/sdk/models/errors/getserverpreferenceserrors.md deleted file mode 100644 index 42d9ab28..00000000 --- a/docs/sdk/models/errors/getserverpreferenceserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetServerPreferencesErrors - -## Example Usage - -```typescript -import { GetServerPreferencesErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetServerPreferencesErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getserverpreferencesservererrors.md b/docs/sdk/models/errors/getserverpreferencesservererrors.md deleted file mode 100644 index 5ab928d1..00000000 --- a/docs/sdk/models/errors/getserverpreferencesservererrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetServerPreferencesServerErrors - -## Example Usage - -```typescript -import { GetServerPreferencesServerErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetServerPreferencesServerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getserverpreferencesunauthorized.md b/docs/sdk/models/errors/getserverpreferencesunauthorized.md deleted file mode 100644 index 4f6cf54d..00000000 --- a/docs/sdk/models/errors/getserverpreferencesunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetServerPreferencesUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetServerPreferencesUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetServerPreferencesServerErrors](../../../sdk/models/errors/getserverpreferencesservererrors.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/getserverresourcesbadrequest.md b/docs/sdk/models/errors/getserverresourcesbadrequest.md deleted file mode 100644 index ecca39c8..00000000 --- a/docs/sdk/models/errors/getserverresourcesbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetServerResourcesBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetServerResourcesBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetServerResourcesErrors](../../../sdk/models/errors/getserverresourceserrors.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/getserverresourceserrors.md b/docs/sdk/models/errors/getserverresourceserrors.md deleted file mode 100644 index 7fa7b1f8..00000000 --- a/docs/sdk/models/errors/getserverresourceserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetServerResourcesErrors - -## Example Usage - -```typescript -import { GetServerResourcesErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetServerResourcesErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getserverresourcesplexerrors.md b/docs/sdk/models/errors/getserverresourcesplexerrors.md deleted file mode 100644 index 6988e053..00000000 --- a/docs/sdk/models/errors/getserverresourcesplexerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetServerResourcesPlexErrors - -## Example Usage - -```typescript -import { GetServerResourcesPlexErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetServerResourcesPlexErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getserverresourcesunauthorized.md b/docs/sdk/models/errors/getserverresourcesunauthorized.md deleted file mode 100644 index 18f074bc..00000000 --- a/docs/sdk/models/errors/getserverresourcesunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetServerResourcesUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetServerResourcesUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetServerResourcesPlexErrors](../../../sdk/models/errors/getserverresourcesplexerrors.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/getsessionhistorybadrequest.md b/docs/sdk/models/errors/getsessionhistorybadrequest.md deleted file mode 100644 index 6104e6c6..00000000 --- a/docs/sdk/models/errors/getsessionhistorybadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetSessionHistoryBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetSessionHistoryBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `errors` | [errors.GetSessionHistoryErrors](../../../sdk/models/errors/getsessionhistoryerrors.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/getsessionhistoryerrors.md b/docs/sdk/models/errors/getsessionhistoryerrors.md deleted file mode 100644 index 70c769b9..00000000 --- a/docs/sdk/models/errors/getsessionhistoryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetSessionHistoryErrors - -## Example Usage - -```typescript -import { GetSessionHistoryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetSessionHistoryErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getsessionhistorysessionserrors.md b/docs/sdk/models/errors/getsessionhistorysessionserrors.md deleted file mode 100644 index f68309f9..00000000 --- a/docs/sdk/models/errors/getsessionhistorysessionserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetSessionHistorySessionsErrors - -## Example Usage - -```typescript -import { GetSessionHistorySessionsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetSessionHistorySessionsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getsessionhistoryunauthorized.md b/docs/sdk/models/errors/getsessionhistoryunauthorized.md deleted file mode 100644 index 8b4cc7e7..00000000 --- a/docs/sdk/models/errors/getsessionhistoryunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetSessionHistoryUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetSessionHistoryUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetSessionHistorySessionsErrors](../../../sdk/models/errors/getsessionhistorysessionserrors.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/getsessionsbadrequest.md b/docs/sdk/models/errors/getsessionsbadrequest.md deleted file mode 100644 index 8e0b48cf..00000000 --- a/docs/sdk/models/errors/getsessionsbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetSessionsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetSessionsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `errors` | [errors.GetSessionsErrors](../../../sdk/models/errors/getsessionserrors.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/getsessionserrors.md b/docs/sdk/models/errors/getsessionserrors.md deleted file mode 100644 index 671b5a2b..00000000 --- a/docs/sdk/models/errors/getsessionserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetSessionsErrors - -## Example Usage - -```typescript -import { GetSessionsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetSessionsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getsessionssessionserrors.md b/docs/sdk/models/errors/getsessionssessionserrors.md deleted file mode 100644 index 2964e3be..00000000 --- a/docs/sdk/models/errors/getsessionssessionserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetSessionsSessionsErrors - -## Example Usage - -```typescript -import { GetSessionsSessionsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetSessionsSessionsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getsessionsunauthorized.md b/docs/sdk/models/errors/getsessionsunauthorized.md deleted file mode 100644 index 9bb49d83..00000000 --- a/docs/sdk/models/errors/getsessionsunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetSessionsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetSessionsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetSessionsSessionsErrors](../../../sdk/models/errors/getsessionssessionserrors.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/getsourceconnectioninformationauthenticationerrors.md b/docs/sdk/models/errors/getsourceconnectioninformationauthenticationerrors.md deleted file mode 100644 index 80a09a96..00000000 --- a/docs/sdk/models/errors/getsourceconnectioninformationauthenticationerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetSourceConnectionInformationAuthenticationErrors - -## Example Usage - -```typescript -import { GetSourceConnectionInformationAuthenticationErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetSourceConnectionInformationAuthenticationErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getsourceconnectioninformationbadrequest.md b/docs/sdk/models/errors/getsourceconnectioninformationbadrequest.md deleted file mode 100644 index a144bc13..00000000 --- a/docs/sdk/models/errors/getsourceconnectioninformationbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetSourceConnectionInformationBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetSourceConnectionInformationBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetSourceConnectionInformationErrors](../../../sdk/models/errors/getsourceconnectioninformationerrors.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/getsourceconnectioninformationerrors.md b/docs/sdk/models/errors/getsourceconnectioninformationerrors.md deleted file mode 100644 index ee70e819..00000000 --- a/docs/sdk/models/errors/getsourceconnectioninformationerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetSourceConnectionInformationErrors - -## Example Usage - -```typescript -import { GetSourceConnectionInformationErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetSourceConnectionInformationErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getsourceconnectioninformationunauthorized.md b/docs/sdk/models/errors/getsourceconnectioninformationunauthorized.md deleted file mode 100644 index 6b1ec190..00000000 --- a/docs/sdk/models/errors/getsourceconnectioninformationunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetSourceConnectionInformationUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetSourceConnectionInformationUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetSourceConnectionInformationAuthenticationErrors](../../../sdk/models/errors/getsourceconnectioninformationauthenticationerrors.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/getstatisticsbadrequest.md b/docs/sdk/models/errors/getstatisticsbadrequest.md deleted file mode 100644 index 005f480b..00000000 --- a/docs/sdk/models/errors/getstatisticsbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetStatisticsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetStatisticsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `errors` | [errors.GetStatisticsErrors](../../../sdk/models/errors/getstatisticserrors.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/getstatisticserrors.md b/docs/sdk/models/errors/getstatisticserrors.md deleted file mode 100644 index 7df79970..00000000 --- a/docs/sdk/models/errors/getstatisticserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetStatisticsErrors - -## Example Usage - -```typescript -import { GetStatisticsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetStatisticsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getstatisticsstatisticserrors.md b/docs/sdk/models/errors/getstatisticsstatisticserrors.md deleted file mode 100644 index 27c6b3f7..00000000 --- a/docs/sdk/models/errors/getstatisticsstatisticserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetStatisticsStatisticsErrors - -## Example Usage - -```typescript -import { GetStatisticsStatisticsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetStatisticsStatisticsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getstatisticsunauthorized.md b/docs/sdk/models/errors/getstatisticsunauthorized.md deleted file mode 100644 index 438211b7..00000000 --- a/docs/sdk/models/errors/getstatisticsunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetStatisticsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetStatisticsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetStatisticsStatisticsErrors](../../../sdk/models/errors/getstatisticsstatisticserrors.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/getthumbimagebadrequest.md b/docs/sdk/models/errors/getthumbimagebadrequest.md deleted file mode 100644 index 683a49b2..00000000 --- a/docs/sdk/models/errors/getthumbimagebadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetThumbImageBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetThumbImageBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `errors` | [errors.GetThumbImageErrors](../../../sdk/models/errors/getthumbimageerrors.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/getthumbimageerrors.md b/docs/sdk/models/errors/getthumbimageerrors.md deleted file mode 100644 index 8f6bfe5b..00000000 --- a/docs/sdk/models/errors/getthumbimageerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetThumbImageErrors - -## Example Usage - -```typescript -import { GetThumbImageErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetThumbImageErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getthumbimagemediaerrors.md b/docs/sdk/models/errors/getthumbimagemediaerrors.md deleted file mode 100644 index 9d341ed4..00000000 --- a/docs/sdk/models/errors/getthumbimagemediaerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetThumbImageMediaErrors - -## Example Usage - -```typescript -import { GetThumbImageMediaErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetThumbImageMediaErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getthumbimageunauthorized.md b/docs/sdk/models/errors/getthumbimageunauthorized.md deleted file mode 100644 index 10567bdf..00000000 --- a/docs/sdk/models/errors/getthumbimageunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetThumbImageUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetThumbImageUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetThumbImageMediaErrors](../../../sdk/models/errors/getthumbimagemediaerrors.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/gettimelinebadrequest.md b/docs/sdk/models/errors/gettimelinebadrequest.md deleted file mode 100644 index fa4cfc5c..00000000 --- a/docs/sdk/models/errors/gettimelinebadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetTimelineBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetTimelineBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `errors` | [errors.GetTimelineErrors](../../../sdk/models/errors/gettimelineerrors.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/gettimelineerrors.md b/docs/sdk/models/errors/gettimelineerrors.md deleted file mode 100644 index 39a64b30..00000000 --- a/docs/sdk/models/errors/gettimelineerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetTimelineErrors - -## Example Usage - -```typescript -import { GetTimelineErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetTimelineErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/gettimelineunauthorized.md b/docs/sdk/models/errors/gettimelineunauthorized.md deleted file mode 100644 index b7e12bba..00000000 --- a/docs/sdk/models/errors/gettimelineunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetTimelineUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetTimelineUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `errors` | [errors.GetTimelineVideoErrors](../../../sdk/models/errors/gettimelinevideoerrors.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/gettimelinevideoerrors.md b/docs/sdk/models/errors/gettimelinevideoerrors.md deleted file mode 100644 index ad34cc0f..00000000 --- a/docs/sdk/models/errors/gettimelinevideoerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetTimelineVideoErrors - -## Example Usage - -```typescript -import { GetTimelineVideoErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetTimelineVideoErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/gettokenbypinidbadrequest.md b/docs/sdk/models/errors/gettokenbypinidbadrequest.md deleted file mode 100644 index 8aff7909..00000000 --- a/docs/sdk/models/errors/gettokenbypinidbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# 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 deleted file mode 100644 index 490aab67..00000000 --- a/docs/sdk/models/errors/gettokenbypiniderrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetTokenByPinIdErrors - -## Example Usage - -```typescript -import { GetTokenByPinIdErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetTokenByPinIdErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/gettokenbypinidplexerrors.md b/docs/sdk/models/errors/gettokenbypinidplexerrors.md deleted file mode 100644 index d569b452..00000000 --- a/docs/sdk/models/errors/gettokenbypinidplexerrors.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetTokenByPinIdPlexErrors - -## Example Usage - -```typescript -import { GetTokenByPinIdPlexErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetTokenByPinIdPlexErrors = { - code: 1020, - message: "Code not found or expired", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1020 | -| `message` | *string* | :heavy_minus_sign: | N/A | Code not found or expired | \ No newline at end of file diff --git a/docs/sdk/models/errors/gettokenbypinidresponsebody.md b/docs/sdk/models/errors/gettokenbypinidresponsebody.md deleted file mode 100644 index 21492a90..00000000 --- a/docs/sdk/models/errors/gettokenbypinidresponsebody.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetTokenByPinIdResponseBody - -Not Found or Expired - -## Example Usage - -```typescript -import { GetTokenByPinIdResponseBody } 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/gettokendetailsauthenticationerrors.md b/docs/sdk/models/errors/gettokendetailsauthenticationerrors.md deleted file mode 100644 index e1bd60d6..00000000 --- a/docs/sdk/models/errors/gettokendetailsauthenticationerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetTokenDetailsAuthenticationErrors - -## Example Usage - -```typescript -import { GetTokenDetailsAuthenticationErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetTokenDetailsAuthenticationErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/gettokendetailsbadrequest.md b/docs/sdk/models/errors/gettokendetailsbadrequest.md deleted file mode 100644 index dc8b0b2a..00000000 --- a/docs/sdk/models/errors/gettokendetailsbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# 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/gettokendetailserrors.md b/docs/sdk/models/errors/gettokendetailserrors.md deleted file mode 100644 index fdede137..00000000 --- a/docs/sdk/models/errors/gettokendetailserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetTokenDetailsErrors - -## Example Usage - -```typescript -import { GetTokenDetailsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetTokenDetailsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/gettokendetailsunauthorized.md b/docs/sdk/models/errors/gettokendetailsunauthorized.md deleted file mode 100644 index de4123d7..00000000 --- a/docs/sdk/models/errors/gettokendetailsunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# 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/gettopwatchedcontentbadrequest.md b/docs/sdk/models/errors/gettopwatchedcontentbadrequest.md deleted file mode 100644 index 8487d6a4..00000000 --- a/docs/sdk/models/errors/gettopwatchedcontentbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetTopWatchedContentBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetTopWatchedContentBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetTopWatchedContentErrors](../../../sdk/models/errors/gettopwatchedcontenterrors.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/gettopwatchedcontenterrors.md b/docs/sdk/models/errors/gettopwatchedcontenterrors.md deleted file mode 100644 index 58f27253..00000000 --- a/docs/sdk/models/errors/gettopwatchedcontenterrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetTopWatchedContentErrors - -## Example Usage - -```typescript -import { GetTopWatchedContentErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetTopWatchedContentErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/gettopwatchedcontentlibraryerrors.md b/docs/sdk/models/errors/gettopwatchedcontentlibraryerrors.md deleted file mode 100644 index 28deb481..00000000 --- a/docs/sdk/models/errors/gettopwatchedcontentlibraryerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetTopWatchedContentLibraryErrors - -## Example Usage - -```typescript -import { GetTopWatchedContentLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetTopWatchedContentLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/gettopwatchedcontentunauthorized.md b/docs/sdk/models/errors/gettopwatchedcontentunauthorized.md deleted file mode 100644 index 3cd343a4..00000000 --- a/docs/sdk/models/errors/gettopwatchedcontentunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetTopWatchedContentUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetTopWatchedContentUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetTopWatchedContentLibraryErrors](../../../sdk/models/errors/gettopwatchedcontentlibraryerrors.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/gettranscodesessionsbadrequest.md b/docs/sdk/models/errors/gettranscodesessionsbadrequest.md deleted file mode 100644 index 5a042ce4..00000000 --- a/docs/sdk/models/errors/gettranscodesessionsbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetTranscodeSessionsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetTranscodeSessionsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetTranscodeSessionsErrors](../../../sdk/models/errors/gettranscodesessionserrors.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/gettranscodesessionserrors.md b/docs/sdk/models/errors/gettranscodesessionserrors.md deleted file mode 100644 index 0689531c..00000000 --- a/docs/sdk/models/errors/gettranscodesessionserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetTranscodeSessionsErrors - -## Example Usage - -```typescript -import { GetTranscodeSessionsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetTranscodeSessionsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/gettranscodesessionssessionserrors.md b/docs/sdk/models/errors/gettranscodesessionssessionserrors.md deleted file mode 100644 index e206090f..00000000 --- a/docs/sdk/models/errors/gettranscodesessionssessionserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetTranscodeSessionsSessionsErrors - -## Example Usage - -```typescript -import { GetTranscodeSessionsSessionsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetTranscodeSessionsSessionsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/gettranscodesessionsunauthorized.md b/docs/sdk/models/errors/gettranscodesessionsunauthorized.md deleted file mode 100644 index 8b7f677a..00000000 --- a/docs/sdk/models/errors/gettranscodesessionsunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetTranscodeSessionsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetTranscodeSessionsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetTranscodeSessionsSessionsErrors](../../../sdk/models/errors/gettranscodesessionssessionserrors.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/gettransienttokenauthenticationerrors.md b/docs/sdk/models/errors/gettransienttokenauthenticationerrors.md deleted file mode 100644 index c613151b..00000000 --- a/docs/sdk/models/errors/gettransienttokenauthenticationerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetTransientTokenAuthenticationErrors - -## Example Usage - -```typescript -import { GetTransientTokenAuthenticationErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetTransientTokenAuthenticationErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/gettransienttokenbadrequest.md b/docs/sdk/models/errors/gettransienttokenbadrequest.md deleted file mode 100644 index 363d3800..00000000 --- a/docs/sdk/models/errors/gettransienttokenbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetTransientTokenBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetTransientTokenBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `errors` | [errors.GetTransientTokenErrors](../../../sdk/models/errors/gettransienttokenerrors.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/gettransienttokenerrors.md b/docs/sdk/models/errors/gettransienttokenerrors.md deleted file mode 100644 index 29cb6ddc..00000000 --- a/docs/sdk/models/errors/gettransienttokenerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetTransientTokenErrors - -## Example Usage - -```typescript -import { GetTransientTokenErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetTransientTokenErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/gettransienttokenunauthorized.md b/docs/sdk/models/errors/gettransienttokenunauthorized.md deleted file mode 100644 index e0cc237f..00000000 --- a/docs/sdk/models/errors/gettransienttokenunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetTransientTokenUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetTransientTokenUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetTransientTokenAuthenticationErrors](../../../sdk/models/errors/gettransienttokenauthenticationerrors.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/getupdatestatusbadrequest.md b/docs/sdk/models/errors/getupdatestatusbadrequest.md deleted file mode 100644 index 843db175..00000000 --- a/docs/sdk/models/errors/getupdatestatusbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetUpdateStatusBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetUpdateStatusBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | [errors.GetUpdateStatusErrors](../../../sdk/models/errors/getupdatestatuserrors.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/getupdatestatuserrors.md b/docs/sdk/models/errors/getupdatestatuserrors.md deleted file mode 100644 index 4be84ac7..00000000 --- a/docs/sdk/models/errors/getupdatestatuserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetUpdateStatusErrors - -## Example Usage - -```typescript -import { GetUpdateStatusErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetUpdateStatusErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getupdatestatusunauthorized.md b/docs/sdk/models/errors/getupdatestatusunauthorized.md deleted file mode 100644 index 9169a770..00000000 --- a/docs/sdk/models/errors/getupdatestatusunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetUpdateStatusUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetUpdateStatusUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetUpdateStatusUpdaterErrors](../../../sdk/models/errors/getupdatestatusupdatererrors.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/getupdatestatusupdatererrors.md b/docs/sdk/models/errors/getupdatestatusupdatererrors.md deleted file mode 100644 index 632db38a..00000000 --- a/docs/sdk/models/errors/getupdatestatusupdatererrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetUpdateStatusUpdaterErrors - -## Example Usage - -```typescript -import { GetUpdateStatusUpdaterErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetUpdateStatusUpdaterErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getuserfriendsbadrequest.md b/docs/sdk/models/errors/getuserfriendsbadrequest.md deleted file mode 100644 index 6cf7b5b2..00000000 --- a/docs/sdk/models/errors/getuserfriendsbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetUserFriendsBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetUserFriendsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `errors` | [errors.GetUserFriendsErrors](../../../sdk/models/errors/getuserfriendserrors.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/getuserfriendserrors.md b/docs/sdk/models/errors/getuserfriendserrors.md deleted file mode 100644 index 99b6c58b..00000000 --- a/docs/sdk/models/errors/getuserfriendserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetUserFriendsErrors - -## Example Usage - -```typescript -import { GetUserFriendsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetUserFriendsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getuserfriendsplexerrors.md b/docs/sdk/models/errors/getuserfriendsplexerrors.md deleted file mode 100644 index 8495a709..00000000 --- a/docs/sdk/models/errors/getuserfriendsplexerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetUserFriendsPlexErrors - -## Example Usage - -```typescript -import { GetUserFriendsPlexErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetUserFriendsPlexErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getuserfriendsunauthorized.md b/docs/sdk/models/errors/getuserfriendsunauthorized.md deleted file mode 100644 index 5031f848..00000000 --- a/docs/sdk/models/errors/getuserfriendsunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetUserFriendsUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetUserFriendsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetUserFriendsPlexErrors](../../../sdk/models/errors/getuserfriendsplexerrors.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/getusersbadrequest.md b/docs/sdk/models/errors/getusersbadrequest.md deleted file mode 100644 index a195cad5..00000000 --- a/docs/sdk/models/errors/getusersbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetUsersBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetUsersBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `errors` | [errors.GetUsersErrors](../../../sdk/models/errors/getuserserrors.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/getuserserrors.md b/docs/sdk/models/errors/getuserserrors.md deleted file mode 100644 index d5dfca94..00000000 --- a/docs/sdk/models/errors/getuserserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetUsersErrors - -## Example Usage - -```typescript -import { GetUsersErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetUsersErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getusersunauthorized.md b/docs/sdk/models/errors/getusersunauthorized.md deleted file mode 100644 index 5be70093..00000000 --- a/docs/sdk/models/errors/getusersunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetUsersUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetUsersUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `errors` | [errors.GetUsersUsersErrors](../../../sdk/models/errors/getusersuserserrors.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/getusersuserserrors.md b/docs/sdk/models/errors/getusersuserserrors.md deleted file mode 100644 index e4a3fdba..00000000 --- a/docs/sdk/models/errors/getusersuserserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetUsersUsersErrors - -## Example Usage - -```typescript -import { GetUsersUsersErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetUsersUsersErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getwatchlistbadrequest.md b/docs/sdk/models/errors/getwatchlistbadrequest.md deleted file mode 100644 index aa084904..00000000 --- a/docs/sdk/models/errors/getwatchlistbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetWatchListBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetWatchListBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `errors` | [errors.GetWatchListErrors](../../../sdk/models/errors/getwatchlisterrors.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/getwatchlisterrors.md b/docs/sdk/models/errors/getwatchlisterrors.md deleted file mode 100644 index f2378ea6..00000000 --- a/docs/sdk/models/errors/getwatchlisterrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetWatchListErrors - -## Example Usage - -```typescript -import { GetWatchListErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetWatchListErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/getwatchlistunauthorized.md b/docs/sdk/models/errors/getwatchlistunauthorized.md deleted file mode 100644 index 8f0fb397..00000000 --- a/docs/sdk/models/errors/getwatchlistunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetWatchListUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetWatchListUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetWatchListWatchlistErrors](../../../sdk/models/errors/getwatchlistwatchlisterrors.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/getwatchlistwatchlisterrors.md b/docs/sdk/models/errors/getwatchlistwatchlisterrors.md deleted file mode 100644 index 6256ebb4..00000000 --- a/docs/sdk/models/errors/getwatchlistwatchlisterrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetWatchListWatchlistErrors - -## Example Usage - -```typescript -import { GetWatchListWatchlistErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: GetWatchListWatchlistErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/loglinebadrequest.md b/docs/sdk/models/errors/loglinebadrequest.md deleted file mode 100644 index 850191da..00000000 --- a/docs/sdk/models/errors/loglinebadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# LogLineBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { LogLineBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `errors` | [errors.LogLineErrors](../../../sdk/models/errors/loglineerrors.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/loglineerrors.md b/docs/sdk/models/errors/loglineerrors.md deleted file mode 100644 index 2bfa4d3e..00000000 --- a/docs/sdk/models/errors/loglineerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# LogLineErrors - -## Example Usage - -```typescript -import { LogLineErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: LogLineErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/loglinelogerrors.md b/docs/sdk/models/errors/loglinelogerrors.md deleted file mode 100644 index f82431d2..00000000 --- a/docs/sdk/models/errors/loglinelogerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# LogLineLogErrors - -## Example Usage - -```typescript -import { LogLineLogErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: LogLineLogErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/loglineunauthorized.md b/docs/sdk/models/errors/loglineunauthorized.md deleted file mode 100644 index a48880c7..00000000 --- a/docs/sdk/models/errors/loglineunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# LogLineUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { LogLineUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `errors` | [errors.LogLineLogErrors](../../../sdk/models/errors/loglinelogerrors.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/logmultilinebadrequest.md b/docs/sdk/models/errors/logmultilinebadrequest.md deleted file mode 100644 index 0a4dcb9d..00000000 --- a/docs/sdk/models/errors/logmultilinebadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# LogMultiLineBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { LogMultiLineBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `errors` | [errors.LogMultiLineErrors](../../../sdk/models/errors/logmultilineerrors.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/logmultilineerrors.md b/docs/sdk/models/errors/logmultilineerrors.md deleted file mode 100644 index b35fdfee..00000000 --- a/docs/sdk/models/errors/logmultilineerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# LogMultiLineErrors - -## Example Usage - -```typescript -import { LogMultiLineErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: LogMultiLineErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/logmultilinelogerrors.md b/docs/sdk/models/errors/logmultilinelogerrors.md deleted file mode 100644 index 293c96ca..00000000 --- a/docs/sdk/models/errors/logmultilinelogerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# LogMultiLineLogErrors - -## Example Usage - -```typescript -import { LogMultiLineLogErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: LogMultiLineLogErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/logmultilineunauthorized.md b/docs/sdk/models/errors/logmultilineunauthorized.md deleted file mode 100644 index cbed2b5b..00000000 --- a/docs/sdk/models/errors/logmultilineunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# LogMultiLineUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { LogMultiLineUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | [errors.LogMultiLineLogErrors](../../../sdk/models/errors/logmultilinelogerrors.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/markplayedbadrequest.md b/docs/sdk/models/errors/markplayedbadrequest.md deleted file mode 100644 index 977ef4a0..00000000 --- a/docs/sdk/models/errors/markplayedbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# MarkPlayedBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { MarkPlayedBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `errors` | [errors.MarkPlayedErrors](../../../sdk/models/errors/markplayederrors.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/markplayederrors.md b/docs/sdk/models/errors/markplayederrors.md deleted file mode 100644 index 1ac9da9a..00000000 --- a/docs/sdk/models/errors/markplayederrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# MarkPlayedErrors - -## Example Usage - -```typescript -import { MarkPlayedErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: MarkPlayedErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/markplayedmediaerrors.md b/docs/sdk/models/errors/markplayedmediaerrors.md deleted file mode 100644 index 797557cc..00000000 --- a/docs/sdk/models/errors/markplayedmediaerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# MarkPlayedMediaErrors - -## Example Usage - -```typescript -import { MarkPlayedMediaErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: MarkPlayedMediaErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/markplayedunauthorized.md b/docs/sdk/models/errors/markplayedunauthorized.md deleted file mode 100644 index 5e156bc0..00000000 --- a/docs/sdk/models/errors/markplayedunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# MarkPlayedUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { MarkPlayedUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | [errors.MarkPlayedMediaErrors](../../../sdk/models/errors/markplayedmediaerrors.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/markunplayedbadrequest.md b/docs/sdk/models/errors/markunplayedbadrequest.md deleted file mode 100644 index f9de478e..00000000 --- a/docs/sdk/models/errors/markunplayedbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# MarkUnplayedBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { MarkUnplayedBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `errors` | [errors.MarkUnplayedErrors](../../../sdk/models/errors/markunplayederrors.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/markunplayederrors.md b/docs/sdk/models/errors/markunplayederrors.md deleted file mode 100644 index c0c67ead..00000000 --- a/docs/sdk/models/errors/markunplayederrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# MarkUnplayedErrors - -## Example Usage - -```typescript -import { MarkUnplayedErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: MarkUnplayedErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/markunplayedmediaerrors.md b/docs/sdk/models/errors/markunplayedmediaerrors.md deleted file mode 100644 index 8bb88348..00000000 --- a/docs/sdk/models/errors/markunplayedmediaerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# MarkUnplayedMediaErrors - -## Example Usage - -```typescript -import { MarkUnplayedMediaErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: MarkUnplayedMediaErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/markunplayedunauthorized.md b/docs/sdk/models/errors/markunplayedunauthorized.md deleted file mode 100644 index baa80da1..00000000 --- a/docs/sdk/models/errors/markunplayedunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# MarkUnplayedUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { MarkUnplayedUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `errors` | [errors.MarkUnplayedMediaErrors](../../../sdk/models/errors/markunplayedmediaerrors.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/performsearchbadrequest.md b/docs/sdk/models/errors/performsearchbadrequest.md deleted file mode 100644 index d8f86bac..00000000 --- a/docs/sdk/models/errors/performsearchbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# PerformSearchBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { PerformSearchBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `errors` | [errors.PerformSearchErrors](../../../sdk/models/errors/performsearcherrors.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/performsearcherrors.md b/docs/sdk/models/errors/performsearcherrors.md deleted file mode 100644 index 84bd8fa1..00000000 --- a/docs/sdk/models/errors/performsearcherrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# PerformSearchErrors - -## Example Usage - -```typescript -import { PerformSearchErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: PerformSearchErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/performsearchsearcherrors.md b/docs/sdk/models/errors/performsearchsearcherrors.md deleted file mode 100644 index 06ffe8ea..00000000 --- a/docs/sdk/models/errors/performsearchsearcherrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# PerformSearchSearchErrors - -## Example Usage - -```typescript -import { PerformSearchSearchErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: PerformSearchSearchErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/performsearchunauthorized.md b/docs/sdk/models/errors/performsearchunauthorized.md deleted file mode 100644 index 8170ea67..00000000 --- a/docs/sdk/models/errors/performsearchunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# PerformSearchUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { PerformSearchUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `errors` | [errors.PerformSearchSearchErrors](../../../sdk/models/errors/performsearchsearcherrors.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/performvoicesearchbadrequest.md b/docs/sdk/models/errors/performvoicesearchbadrequest.md deleted file mode 100644 index d3fb6b9f..00000000 --- a/docs/sdk/models/errors/performvoicesearchbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# PerformVoiceSearchBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { PerformVoiceSearchBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `errors` | [errors.PerformVoiceSearchErrors](../../../sdk/models/errors/performvoicesearcherrors.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/performvoicesearcherrors.md b/docs/sdk/models/errors/performvoicesearcherrors.md deleted file mode 100644 index 97950a37..00000000 --- a/docs/sdk/models/errors/performvoicesearcherrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# PerformVoiceSearchErrors - -## Example Usage - -```typescript -import { PerformVoiceSearchErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: PerformVoiceSearchErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/performvoicesearchsearcherrors.md b/docs/sdk/models/errors/performvoicesearchsearcherrors.md deleted file mode 100644 index a81b2eeb..00000000 --- a/docs/sdk/models/errors/performvoicesearchsearcherrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# PerformVoiceSearchSearchErrors - -## Example Usage - -```typescript -import { PerformVoiceSearchSearchErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: PerformVoiceSearchSearchErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/performvoicesearchunauthorized.md b/docs/sdk/models/errors/performvoicesearchunauthorized.md deleted file mode 100644 index e9e09e88..00000000 --- a/docs/sdk/models/errors/performvoicesearchunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# PerformVoiceSearchUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { PerformVoiceSearchUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.PerformVoiceSearchSearchErrors](../../../sdk/models/errors/performvoicesearchsearcherrors.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/postuserssignindataauthenticationerrors.md b/docs/sdk/models/errors/postuserssignindataauthenticationerrors.md deleted file mode 100644 index 133e6836..00000000 --- a/docs/sdk/models/errors/postuserssignindataauthenticationerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# PostUsersSignInDataAuthenticationErrors - -## Example Usage - -```typescript -import { PostUsersSignInDataAuthenticationErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: PostUsersSignInDataAuthenticationErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/postuserssignindatabadrequest.md b/docs/sdk/models/errors/postuserssignindatabadrequest.md deleted file mode 100644 index 674a83bd..00000000 --- a/docs/sdk/models/errors/postuserssignindatabadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# PostUsersSignInDataBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { PostUsersSignInDataBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `errors` | [errors.PostUsersSignInDataErrors](../../../sdk/models/errors/postuserssignindataerrors.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/postuserssignindataerrors.md b/docs/sdk/models/errors/postuserssignindataerrors.md deleted file mode 100644 index dc049d7c..00000000 --- a/docs/sdk/models/errors/postuserssignindataerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# PostUsersSignInDataErrors - -## Example Usage - -```typescript -import { PostUsersSignInDataErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: PostUsersSignInDataErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/postuserssignindataunauthorized.md b/docs/sdk/models/errors/postuserssignindataunauthorized.md deleted file mode 100644 index 3c74889c..00000000 --- a/docs/sdk/models/errors/postuserssignindataunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# PostUsersSignInDataUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { PostUsersSignInDataUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.PostUsersSignInDataAuthenticationErrors](../../../sdk/models/errors/postuserssignindataauthenticationerrors.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/startalltasksbadrequest.md b/docs/sdk/models/errors/startalltasksbadrequest.md deleted file mode 100644 index 395e1cfb..00000000 --- a/docs/sdk/models/errors/startalltasksbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# StartAllTasksBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { StartAllTasksBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `errors` | [errors.StartAllTasksErrors](../../../sdk/models/errors/startalltaskserrors.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/startalltasksbutlererrors.md b/docs/sdk/models/errors/startalltasksbutlererrors.md deleted file mode 100644 index cbfc92e1..00000000 --- a/docs/sdk/models/errors/startalltasksbutlererrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# StartAllTasksButlerErrors - -## Example Usage - -```typescript -import { StartAllTasksButlerErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: StartAllTasksButlerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/startalltaskserrors.md b/docs/sdk/models/errors/startalltaskserrors.md deleted file mode 100644 index 168050dd..00000000 --- a/docs/sdk/models/errors/startalltaskserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# StartAllTasksErrors - -## Example Usage - -```typescript -import { StartAllTasksErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: StartAllTasksErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/startalltasksunauthorized.md b/docs/sdk/models/errors/startalltasksunauthorized.md deleted file mode 100644 index 233fa389..00000000 --- a/docs/sdk/models/errors/startalltasksunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# StartAllTasksUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { StartAllTasksUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `errors` | [errors.StartAllTasksButlerErrors](../../../sdk/models/errors/startalltasksbutlererrors.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/starttaskbadrequest.md b/docs/sdk/models/errors/starttaskbadrequest.md deleted file mode 100644 index 76a5dd56..00000000 --- a/docs/sdk/models/errors/starttaskbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# StartTaskBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { StartTaskBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `errors` | [errors.StartTaskErrors](../../../sdk/models/errors/starttaskerrors.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/starttaskbutlererrors.md b/docs/sdk/models/errors/starttaskbutlererrors.md deleted file mode 100644 index 63e0e589..00000000 --- a/docs/sdk/models/errors/starttaskbutlererrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# StartTaskButlerErrors - -## Example Usage - -```typescript -import { StartTaskButlerErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: StartTaskButlerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/starttaskerrors.md b/docs/sdk/models/errors/starttaskerrors.md deleted file mode 100644 index 4f95963d..00000000 --- a/docs/sdk/models/errors/starttaskerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# StartTaskErrors - -## Example Usage - -```typescript -import { StartTaskErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: StartTaskErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/starttaskunauthorized.md b/docs/sdk/models/errors/starttaskunauthorized.md deleted file mode 100644 index 3c3c7008..00000000 --- a/docs/sdk/models/errors/starttaskunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# StartTaskUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { StartTaskUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | [errors.StartTaskButlerErrors](../../../sdk/models/errors/starttaskbutlererrors.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/startuniversaltranscodebadrequest.md b/docs/sdk/models/errors/startuniversaltranscodebadrequest.md deleted file mode 100644 index 372abd46..00000000 --- a/docs/sdk/models/errors/startuniversaltranscodebadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# StartUniversalTranscodeBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { StartUniversalTranscodeBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `errors` | [errors.StartUniversalTranscodeErrors](../../../sdk/models/errors/startuniversaltranscodeerrors.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/startuniversaltranscodeerrors.md b/docs/sdk/models/errors/startuniversaltranscodeerrors.md deleted file mode 100644 index 1929e736..00000000 --- a/docs/sdk/models/errors/startuniversaltranscodeerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# StartUniversalTranscodeErrors - -## Example Usage - -```typescript -import { StartUniversalTranscodeErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: StartUniversalTranscodeErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/startuniversaltranscodeunauthorized.md b/docs/sdk/models/errors/startuniversaltranscodeunauthorized.md deleted file mode 100644 index 69a95705..00000000 --- a/docs/sdk/models/errors/startuniversaltranscodeunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# StartUniversalTranscodeUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { StartUniversalTranscodeUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.StartUniversalTranscodeVideoErrors](../../../sdk/models/errors/startuniversaltranscodevideoerrors.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/startuniversaltranscodevideoerrors.md b/docs/sdk/models/errors/startuniversaltranscodevideoerrors.md deleted file mode 100644 index 1b05b2d6..00000000 --- a/docs/sdk/models/errors/startuniversaltranscodevideoerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# StartUniversalTranscodeVideoErrors - -## Example Usage - -```typescript -import { StartUniversalTranscodeVideoErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: StartUniversalTranscodeVideoErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/stopalltasksbadrequest.md b/docs/sdk/models/errors/stopalltasksbadrequest.md deleted file mode 100644 index 8887f1d1..00000000 --- a/docs/sdk/models/errors/stopalltasksbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# StopAllTasksBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { StopAllTasksBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `errors` | [errors.StopAllTasksErrors](../../../sdk/models/errors/stopalltaskserrors.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/stopalltasksbutlererrors.md b/docs/sdk/models/errors/stopalltasksbutlererrors.md deleted file mode 100644 index 717413ea..00000000 --- a/docs/sdk/models/errors/stopalltasksbutlererrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# StopAllTasksButlerErrors - -## Example Usage - -```typescript -import { StopAllTasksButlerErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: StopAllTasksButlerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/stopalltaskserrors.md b/docs/sdk/models/errors/stopalltaskserrors.md deleted file mode 100644 index 8f87b170..00000000 --- a/docs/sdk/models/errors/stopalltaskserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# StopAllTasksErrors - -## Example Usage - -```typescript -import { StopAllTasksErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: StopAllTasksErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/stopalltasksunauthorized.md b/docs/sdk/models/errors/stopalltasksunauthorized.md deleted file mode 100644 index 818020a3..00000000 --- a/docs/sdk/models/errors/stopalltasksunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# StopAllTasksUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { StopAllTasksUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `errors` | [errors.StopAllTasksButlerErrors](../../../sdk/models/errors/stopalltasksbutlererrors.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/stoptaskbadrequest.md b/docs/sdk/models/errors/stoptaskbadrequest.md deleted file mode 100644 index 9babd9da..00000000 --- a/docs/sdk/models/errors/stoptaskbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# StopTaskBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { StopTaskBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `errors` | [errors.StopTaskErrors](../../../sdk/models/errors/stoptaskerrors.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/stoptaskbutlererrors.md b/docs/sdk/models/errors/stoptaskbutlererrors.md deleted file mode 100644 index 4fd898bf..00000000 --- a/docs/sdk/models/errors/stoptaskbutlererrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# StopTaskButlerErrors - -## Example Usage - -```typescript -import { StopTaskButlerErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: StopTaskButlerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/stoptaskerrors.md b/docs/sdk/models/errors/stoptaskerrors.md deleted file mode 100644 index 85e6ba7c..00000000 --- a/docs/sdk/models/errors/stoptaskerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# StopTaskErrors - -## Example Usage - -```typescript -import { StopTaskErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: StopTaskErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/stoptaskunauthorized.md b/docs/sdk/models/errors/stoptaskunauthorized.md deleted file mode 100644 index a6f355d9..00000000 --- a/docs/sdk/models/errors/stoptaskunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# StopTaskUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { StopTaskUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `errors` | [errors.StopTaskButlerErrors](../../../sdk/models/errors/stoptaskbutlererrors.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/stoptranscodesessionbadrequest.md b/docs/sdk/models/errors/stoptranscodesessionbadrequest.md deleted file mode 100644 index 2f135c9d..00000000 --- a/docs/sdk/models/errors/stoptranscodesessionbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# StopTranscodeSessionBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { StopTranscodeSessionBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `errors` | [errors.StopTranscodeSessionErrors](../../../sdk/models/errors/stoptranscodesessionerrors.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/stoptranscodesessionerrors.md b/docs/sdk/models/errors/stoptranscodesessionerrors.md deleted file mode 100644 index 14fcb188..00000000 --- a/docs/sdk/models/errors/stoptranscodesessionerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# StopTranscodeSessionErrors - -## Example Usage - -```typescript -import { StopTranscodeSessionErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: StopTranscodeSessionErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/stoptranscodesessionsessionserrors.md b/docs/sdk/models/errors/stoptranscodesessionsessionserrors.md deleted file mode 100644 index 8b6d2ae0..00000000 --- a/docs/sdk/models/errors/stoptranscodesessionsessionserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# StopTranscodeSessionSessionsErrors - -## Example Usage - -```typescript -import { StopTranscodeSessionSessionsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: StopTranscodeSessionSessionsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/stoptranscodesessionunauthorized.md b/docs/sdk/models/errors/stoptranscodesessionunauthorized.md deleted file mode 100644 index bdcb59f2..00000000 --- a/docs/sdk/models/errors/stoptranscodesessionunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# StopTranscodeSessionUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { StopTranscodeSessionUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.StopTranscodeSessionSessionsErrors](../../../sdk/models/errors/stoptranscodesessionsessionserrors.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/updateplaylistbadrequest.md b/docs/sdk/models/errors/updateplaylistbadrequest.md deleted file mode 100644 index fcc5b115..00000000 --- a/docs/sdk/models/errors/updateplaylistbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# UpdatePlaylistBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { UpdatePlaylistBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `errors` | [errors.UpdatePlaylistErrors](../../../sdk/models/errors/updateplaylisterrors.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/updateplaylisterrors.md b/docs/sdk/models/errors/updateplaylisterrors.md deleted file mode 100644 index fe15ccf0..00000000 --- a/docs/sdk/models/errors/updateplaylisterrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# UpdatePlaylistErrors - -## Example Usage - -```typescript -import { UpdatePlaylistErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: UpdatePlaylistErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/updateplaylistplaylistserrors.md b/docs/sdk/models/errors/updateplaylistplaylistserrors.md deleted file mode 100644 index 1a154e84..00000000 --- a/docs/sdk/models/errors/updateplaylistplaylistserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# UpdatePlaylistPlaylistsErrors - -## Example Usage - -```typescript -import { UpdatePlaylistPlaylistsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: UpdatePlaylistPlaylistsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/updateplaylistunauthorized.md b/docs/sdk/models/errors/updateplaylistunauthorized.md deleted file mode 100644 index c205789d..00000000 --- a/docs/sdk/models/errors/updateplaylistunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# UpdatePlaylistUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { UpdatePlaylistUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `errors` | [errors.UpdatePlaylistPlaylistsErrors](../../../sdk/models/errors/updateplaylistplaylistserrors.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/updateplayprogressbadrequest.md b/docs/sdk/models/errors/updateplayprogressbadrequest.md deleted file mode 100644 index bdb79d5c..00000000 --- a/docs/sdk/models/errors/updateplayprogressbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# UpdatePlayProgressBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { UpdatePlayProgressBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `errors` | [errors.UpdatePlayProgressErrors](../../../sdk/models/errors/updateplayprogresserrors.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/updateplayprogresserrors.md b/docs/sdk/models/errors/updateplayprogresserrors.md deleted file mode 100644 index 96010734..00000000 --- a/docs/sdk/models/errors/updateplayprogresserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# UpdatePlayProgressErrors - -## Example Usage - -```typescript -import { UpdatePlayProgressErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: UpdatePlayProgressErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/updateplayprogressmediaerrors.md b/docs/sdk/models/errors/updateplayprogressmediaerrors.md deleted file mode 100644 index 539866a2..00000000 --- a/docs/sdk/models/errors/updateplayprogressmediaerrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# UpdatePlayProgressMediaErrors - -## Example Usage - -```typescript -import { UpdatePlayProgressMediaErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: UpdatePlayProgressMediaErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/updateplayprogressunauthorized.md b/docs/sdk/models/errors/updateplayprogressunauthorized.md deleted file mode 100644 index f79e8c8d..00000000 --- a/docs/sdk/models/errors/updateplayprogressunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# UpdatePlayProgressUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { UpdatePlayProgressUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `errors` | [errors.UpdatePlayProgressMediaErrors](../../../sdk/models/errors/updateplayprogressmediaerrors.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/uploadplaylistbadrequest.md b/docs/sdk/models/errors/uploadplaylistbadrequest.md deleted file mode 100644 index 2a34b504..00000000 --- a/docs/sdk/models/errors/uploadplaylistbadrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# UploadPlaylistBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { UploadPlaylistBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `errors` | [errors.UploadPlaylistErrors](../../../sdk/models/errors/uploadplaylisterrors.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/uploadplaylisterrors.md b/docs/sdk/models/errors/uploadplaylisterrors.md deleted file mode 100644 index 196b81d0..00000000 --- a/docs/sdk/models/errors/uploadplaylisterrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# UploadPlaylistErrors - -## Example Usage - -```typescript -import { UploadPlaylistErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: UploadPlaylistErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *number* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/sdk/models/errors/uploadplaylistplaylistserrors.md b/docs/sdk/models/errors/uploadplaylistplaylistserrors.md deleted file mode 100644 index 8e72d39b..00000000 --- a/docs/sdk/models/errors/uploadplaylistplaylistserrors.md +++ /dev/null @@ -1,21 +0,0 @@ -# UploadPlaylistPlaylistsErrors - -## Example Usage - -```typescript -import { UploadPlaylistPlaylistsErrors } from "@lukehagar/plexjs/sdk/models/errors"; - -let value: UploadPlaylistPlaylistsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *number* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *string* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *number* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/sdk/models/errors/uploadplaylistunauthorized.md b/docs/sdk/models/errors/uploadplaylistunauthorized.md deleted file mode 100644 index 36a8cce0..00000000 --- a/docs/sdk/models/errors/uploadplaylistunauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# UploadPlaylistUnauthorized - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { UploadPlaylistUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `errors` | [errors.UploadPlaylistPlaylistsErrors](../../../sdk/models/errors/uploadplaylistplaylistserrors.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/operations/account.md b/docs/sdk/models/operations/account.md index 168c86d5..02991b3d 100644 --- a/docs/sdk/models/operations/account.md +++ b/docs/sdk/models/operations/account.md @@ -5,27 +5,12 @@ ```typescript 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", -}; +let value: Account = {}; ``` ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `id` | *number* | :heavy_minus_sign: | N/A | 238960586 | -| `key` | *string* | :heavy_minus_sign: | N/A | /accounts/238960586 | -| `name` | *string* | :heavy_minus_sign: | N/A | Diane | -| `defaultAudioLanguage` | *string* | :heavy_minus_sign: | N/A | en | -| `autoSelectAudio` | *boolean* | :heavy_minus_sign: | N/A | true | -| `defaultSubtitleLanguage` | *string* | :heavy_minus_sign: | N/A | en | -| `subtitleMode` | *number* | :heavy_minus_sign: | N/A | 1 | -| `thumb` | *string* | :heavy_minus_sign: | N/A | https://plex.tv/users/50d83634246da1de/avatar?c=1707110967 | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `globalViewCount` | *number* | :heavy_minus_sign: | N/A | +| `id` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/action.md b/docs/sdk/models/operations/action.md index eec67680..4e5f36ee 100644 --- a/docs/sdk/models/operations/action.md +++ b/docs/sdk/models/operations/action.md @@ -1,19 +1,19 @@ # Action +The action to perform for this item on this optimizer queue + ## Example Usage ```typescript import { Action } from "@lukehagar/plexjs/sdk/models/operations"; -let value: Action = { - id: "addToContinueWatching", - key: "/actions/addToContinueWatching", -}; +let value: Action = Action.Enable; ``` -## Fields +## Values -| Field | Type | Required | Description | Example | -| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | addToContinueWatching | -| `key` | *string* | :heavy_check_mark: | N/A | /actions/addToContinueWatching | \ No newline at end of file +| Name | Value | +| ----------- | ----------- | +| `Reprocess` | reprocess | +| `Disable` | disable | +| `Enable` | enable | \ No newline at end of file diff --git a/docs/sdk/models/operations/activedirection.md b/docs/sdk/models/operations/activedirection.md deleted file mode 100644 index a5b29668..00000000 --- a/docs/sdk/models/operations/activedirection.md +++ /dev/null @@ -1,19 +0,0 @@ -# ActiveDirection - -The direction of the sort. Can be either `asc` or `desc`. - - -## Example Usage - -```typescript -import { ActiveDirection } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: ActiveDirection = ActiveDirection.Ascending; -``` - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Ascending` | asc | -| `Descending` | desc | \ No newline at end of file diff --git a/docs/sdk/models/operations/activity.md b/docs/sdk/models/operations/activity.md index b2fb8f02..8f8af8f5 100644 --- a/docs/sdk/models/operations/activity.md +++ b/docs/sdk/models/operations/activity.md @@ -10,13 +10,14 @@ let value: Activity = {}; ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `uuid` | *string* | :heavy_minus_sign: | N/A | -| `type` | *string* | :heavy_minus_sign: | N/A | -| `cancellable` | *boolean* | :heavy_minus_sign: | N/A | -| `userID` | *number* | :heavy_minus_sign: | N/A | -| `title` | *string* | :heavy_minus_sign: | N/A | -| `subtitle` | *string* | :heavy_minus_sign: | N/A | -| `progress` | *number* | :heavy_minus_sign: | N/A | -| `context` | [operations.Context](../../../sdk/models/operations/context.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `cancellable` | *boolean* | :heavy_minus_sign: | Indicates whether this activity can be cancelled | +| `context` | Record | :heavy_minus_sign: | An object with additional values | +| `progress` | *number* | :heavy_minus_sign: | A progress percentage. A value of -1 means the progress is indeterminate | +| `response` | Record | :heavy_minus_sign: | An object with the response to the async opperation | +| `subtitle` | *string* | :heavy_minus_sign: | A user-friendly sub-title for this activity | +| `title` | *string* | :heavy_minus_sign: | A user-friendly title for this activity | +| `type` | *string* | :heavy_minus_sign: | The type of activity | +| `userID` | *number* | :heavy_minus_sign: | The user this activity belongs to | +| `uuid` | *string* | :heavy_minus_sign: | The ID of the activity | \ No newline at end of file diff --git a/docs/sdk/models/operations/addcollectionitemsglobals.md b/docs/sdk/models/operations/addcollectionitemsglobals.md new file mode 100644 index 00000000..805aabe6 --- /dev/null +++ b/docs/sdk/models/operations/addcollectionitemsglobals.md @@ -0,0 +1,35 @@ +# AddCollectionItemsGlobals + +## Example Usage + +```typescript +import { AddCollectionItemsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddCollectionItemsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/addcollectionitemsrequest.md b/docs/sdk/models/operations/addcollectionitemsrequest.md new file mode 100644 index 00000000..a7500527 --- /dev/null +++ b/docs/sdk/models/operations/addcollectionitemsrequest.md @@ -0,0 +1,29 @@ +# AddCollectionItemsRequest + +## Example Usage + +```typescript +import { AddCollectionItemsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddCollectionItemsRequest = { + collectionId: 705686, + uri: "https://mad-handle.biz/", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `collectionId` | *number* | :heavy_check_mark: | The collection id | | +| `uri` | *string* | :heavy_check_mark: | The URI describing the items to add to this collection | | \ No newline at end of file diff --git a/docs/sdk/models/operations/addcollectionitemsresponse.md b/docs/sdk/models/operations/addcollectionitemsresponse.md new file mode 100644 index 00000000..e06ccf2e --- /dev/null +++ b/docs/sdk/models/operations/addcollectionitemsresponse.md @@ -0,0 +1,21 @@ +# AddCollectionItemsResponse + +## Example Usage + +```typescript +import { AddCollectionItemsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddCollectionItemsResponse = { + contentType: "", + statusCode: 637232, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/adddeviceglobals.md b/docs/sdk/models/operations/adddeviceglobals.md new file mode 100644 index 00000000..a5611eb5 --- /dev/null +++ b/docs/sdk/models/operations/adddeviceglobals.md @@ -0,0 +1,35 @@ +# AddDeviceGlobals + +## Example Usage + +```typescript +import { AddDeviceGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddDeviceGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/adddevicerequest.md b/docs/sdk/models/operations/adddevicerequest.md new file mode 100644 index 00000000..e366a4bd --- /dev/null +++ b/docs/sdk/models/operations/adddevicerequest.md @@ -0,0 +1,27 @@ +# AddDeviceRequest + +## Example Usage + +```typescript +import { AddDeviceRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddDeviceRequest = { + uri: "http://10.0.0.5", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `uri` | *string* | :heavy_minus_sign: | The URI of the device. | http://10.0.0.5 | \ No newline at end of file diff --git a/docs/sdk/models/operations/adddeviceresponse.md b/docs/sdk/models/operations/adddeviceresponse.md new file mode 100644 index 00000000..13bf61a5 --- /dev/null +++ b/docs/sdk/models/operations/adddeviceresponse.md @@ -0,0 +1,21 @@ +# AddDeviceResponse + +## Example Usage + +```typescript +import { AddDeviceResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddDeviceResponse = { + contentType: "", + statusCode: 298653, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithDevice` | [shared.MediaContainerWithDevice](../../../sdk/models/shared/mediacontainerwithdevice.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/adddevicetodvrdvr.md b/docs/sdk/models/operations/adddevicetodvrdvr.md new file mode 100644 index 00000000..e4624b02 --- /dev/null +++ b/docs/sdk/models/operations/adddevicetodvrdvr.md @@ -0,0 +1,19 @@ +# AddDeviceToDVRDVR + +## Example Usage + +```typescript +import { AddDeviceToDVRDVR } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddDeviceToDVRDVR = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `device` | [shared.Device](../../../sdk/models/shared/device.md)[] | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `language` | *string* | :heavy_minus_sign: | N/A | +| `lineup` | *string* | :heavy_minus_sign: | N/A | +| `uuid` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/adddevicetodvrglobals.md b/docs/sdk/models/operations/adddevicetodvrglobals.md new file mode 100644 index 00000000..398ed4b8 --- /dev/null +++ b/docs/sdk/models/operations/adddevicetodvrglobals.md @@ -0,0 +1,35 @@ +# AddDeviceToDVRGlobals + +## Example Usage + +```typescript +import { AddDeviceToDVRGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddDeviceToDVRGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/adddevicetodvrmediacontainer.md b/docs/sdk/models/operations/adddevicetodvrmediacontainer.md new file mode 100644 index 00000000..527dea71 --- /dev/null +++ b/docs/sdk/models/operations/adddevicetodvrmediacontainer.md @@ -0,0 +1,16 @@ +# AddDeviceToDVRMediaContainer + +## Example Usage + +```typescript +import { AddDeviceToDVRMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddDeviceToDVRMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.AddDeviceToDVRMediaContainerMediaContainer](../../../sdk/models/operations/adddevicetodvrmediacontainermediacontainer.md) | :heavy_minus_sign: | N/A | +| `dvr` | [operations.AddDeviceToDVRDVR](../../../sdk/models/operations/adddevicetodvrdvr.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/adddevicetodvrmediacontainermediacontainer.md b/docs/sdk/models/operations/adddevicetodvrmediacontainermediacontainer.md new file mode 100644 index 00000000..c37632a1 --- /dev/null +++ b/docs/sdk/models/operations/adddevicetodvrmediacontainermediacontainer.md @@ -0,0 +1,24 @@ +# AddDeviceToDVRMediaContainerMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { AddDeviceToDVRMediaContainerMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddDeviceToDVRMediaContainerMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `status` | *number* | :heavy_minus_sign: | A status indicator. If present and non-zero, indicates an error | \ No newline at end of file diff --git a/docs/sdk/models/operations/adddevicetodvrrequest.md b/docs/sdk/models/operations/adddevicetodvrrequest.md new file mode 100644 index 00000000..9bc312a8 --- /dev/null +++ b/docs/sdk/models/operations/adddevicetodvrrequest.md @@ -0,0 +1,29 @@ +# AddDeviceToDVRRequest + +## Example Usage + +```typescript +import { AddDeviceToDVRRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddDeviceToDVRRequest = { + dvrId: 595771, + deviceId: 611322, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `dvrId` | *number* | :heavy_check_mark: | The ID of the DVR. | | +| `deviceId` | *number* | :heavy_check_mark: | The ID of the device to add. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/adddevicetodvrresponse.md b/docs/sdk/models/operations/adddevicetodvrresponse.md new file mode 100644 index 00000000..162e4f6c --- /dev/null +++ b/docs/sdk/models/operations/adddevicetodvrresponse.md @@ -0,0 +1,29 @@ +# AddDeviceToDVRResponse + +## Example Usage + +```typescript +import { AddDeviceToDVRResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddDeviceToDVRResponse = { + contentType: "", + statusCode: 350017, + headers: { + "key": [ + "", + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.AddDeviceToDVRResponseBody](../../../sdk/models/operations/adddevicetodvrresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/adddevicetodvrresponsebody.md b/docs/sdk/models/operations/adddevicetodvrresponsebody.md new file mode 100644 index 00000000..e0d7a7b8 --- /dev/null +++ b/docs/sdk/models/operations/adddevicetodvrresponsebody.md @@ -0,0 +1,17 @@ +# AddDeviceToDVRResponseBody + +OK + +## Example Usage + +```typescript +import { AddDeviceToDVRResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddDeviceToDVRResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.AddDeviceToDVRMediaContainer](../../../sdk/models/operations/adddevicetodvrmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/adddownloadqueueitemsglobals.md b/docs/sdk/models/operations/adddownloadqueueitemsglobals.md new file mode 100644 index 00000000..1dbe4a31 --- /dev/null +++ b/docs/sdk/models/operations/adddownloadqueueitemsglobals.md @@ -0,0 +1,35 @@ +# AddDownloadQueueItemsGlobals + +## Example Usage + +```typescript +import { AddDownloadQueueItemsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddDownloadQueueItemsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/adddownloadqueueitemsmediacontainer.md b/docs/sdk/models/operations/adddownloadqueueitemsmediacontainer.md new file mode 100644 index 00000000..ee3654c4 --- /dev/null +++ b/docs/sdk/models/operations/adddownloadqueueitemsmediacontainer.md @@ -0,0 +1,24 @@ +# AddDownloadQueueItemsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { AddDownloadQueueItemsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddDownloadQueueItemsMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `addedQueueItems` | [operations.AddedQueueItem](../../../sdk/models/operations/addedqueueitem.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/adddownloadqueueitemsrequest.md b/docs/sdk/models/operations/adddownloadqueueitemsrequest.md new file mode 100644 index 00000000..11fc9d88 --- /dev/null +++ b/docs/sdk/models/operations/adddownloadqueueitemsrequest.md @@ -0,0 +1,85 @@ +# AddDownloadQueueItemsRequest + +## Example Usage + +```typescript +import { AddDownloadQueueItemsRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { AdvancedSubtitles, BoolInt, LocationParameter, Protocol, Subtitles } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: AddDownloadQueueItemsRequest = { + queueId: 44894, + keys: [ + "/library/metadata/3", + "/library/metadata/6", + ], + advancedSubtitles: AdvancedSubtitles.Burn, + audioBoost: 50, + audioChannelCount: 5, + autoAdjustQuality: BoolInt.One, + autoAdjustSubtitle: BoolInt.One, + directPlay: BoolInt.One, + directStream: BoolInt.One, + directStreamAudio: BoolInt.One, + disableResolutionRotation: BoolInt.One, + hasMDE: BoolInt.One, + location: LocationParameter.Wan, + mediaBufferSize: 102400, + mediaIndex: 0, + musicBitrate: 5000, + offset: 90.5, + partIndex: 0, + path: "/library/metadata/151671", + peakBitrate: 12000, + photoResolution: "1080x1080", + protocol: Protocol.Dash, + secondsPerSegment: 5, + subtitleSize: 50, + subtitles: Subtitles.Sidecar, + videoBitrate: 12000, + videoQuality: 50, + videoResolution: "1080x1080", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `queueId` | *number* | :heavy_check_mark: | The queue id | | +| `keys` | *string*[] | :heavy_check_mark: | Keys to add | [
"/library/metadata/3",
"/library/metadata/6"
] | +| `advancedSubtitles` | [shared.AdvancedSubtitles](../../../sdk/models/shared/advancedsubtitles.md) | :heavy_minus_sign: | Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost
| burn | +| `audioBoost` | *number* | :heavy_minus_sign: | Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) | 50 | +| `audioChannelCount` | *number* | :heavy_minus_sign: | Target video number of audio channels. | 5 | +| `autoAdjustQuality` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates the client supports ABR. | 1 | +| `autoAdjustSubtitle` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates if the server should adjust subtitles based on Voice Activity Data. | 1 | +| `directPlay` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates the client supports direct playing the indicated content. | 1 | +| `directStream` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates the client supports direct streaming the video of the indicated content. | 1 | +| `directStreamAudio` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates the client supports direct streaming the audio of the indicated content. | 1 | +| `disableResolutionRotation` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates if resolution should be adjusted for orientation. | 1 | +| `hasMDE` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 | 1 | +| `location` | [shared.LocationParameter](../../../sdk/models/shared/locationparameter.md) | :heavy_minus_sign: | Network type of the client, can be used to help determine target bitrate. | wan | +| `mediaBufferSize` | *number* | :heavy_minus_sign: | Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. | 102400 | +| `mediaIndex` | *number* | :heavy_minus_sign: | Index of the media to transcode. -1 or not specified indicates let the server choose. | 0 | +| `musicBitrate` | *number* | :heavy_minus_sign: | Target bitrate for audio only files (in kbps, used to transcode). | 5000 | +| `offset` | *number* | :heavy_minus_sign: | Offset from the start of the media (in seconds). | 90.5 | +| `partIndex` | *number* | :heavy_minus_sign: | Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode | 0 | +| `path` | *string* | :heavy_minus_sign: | Internal PMS path of the media to transcode. | /library/metadata/151671 | +| `peakBitrate` | *number* | :heavy_minus_sign: | Maximum bitrate (in kbps) to use in ABR. | 12000 | +| `photoResolution` | *string* | :heavy_minus_sign: | Target photo resolution. | 1080x1080 | +| `protocol` | [shared.Protocol](../../../sdk/models/shared/protocol.md) | :heavy_minus_sign: | Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022)
| dash | +| `secondsPerSegment` | *number* | :heavy_minus_sign: | Number of seconds to include in each transcoded segment | 5 | +| `subtitleSize` | *number* | :heavy_minus_sign: | Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) | 50 | +| `subtitles` | [shared.Subtitles](../../../sdk/models/shared/subtitles.md) | :heavy_minus_sign: | Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream
| Burn | +| `videoBitrate` | *number* | :heavy_minus_sign: | Target video bitrate (in kbps). | 12000 | +| `videoQuality` | *number* | :heavy_minus_sign: | Target photo quality. | 50 | +| `videoResolution` | *string* | :heavy_minus_sign: | Target maximum video resolution. | 1080x1080 | \ No newline at end of file diff --git a/docs/sdk/models/operations/adddownloadqueueitemsresponse.md b/docs/sdk/models/operations/adddownloadqueueitemsresponse.md new file mode 100644 index 00000000..d5fa6396 --- /dev/null +++ b/docs/sdk/models/operations/adddownloadqueueitemsresponse.md @@ -0,0 +1,21 @@ +# AddDownloadQueueItemsResponse + +## Example Usage + +```typescript +import { AddDownloadQueueItemsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddDownloadQueueItemsResponse = { + contentType: "", + statusCode: 35315, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.AddDownloadQueueItemsResponseBody](../../../sdk/models/operations/adddownloadqueueitemsresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/adddownloadqueueitemsresponsebody.md b/docs/sdk/models/operations/adddownloadqueueitemsresponsebody.md new file mode 100644 index 00000000..6d0ec8f1 --- /dev/null +++ b/docs/sdk/models/operations/adddownloadqueueitemsresponsebody.md @@ -0,0 +1,17 @@ +# AddDownloadQueueItemsResponseBody + +OK + +## Example Usage + +```typescript +import { AddDownloadQueueItemsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddDownloadQueueItemsResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.AddDownloadQueueItemsMediaContainer](../../../sdk/models/operations/adddownloadqueueitemsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/addedqueueitem.md b/docs/sdk/models/operations/addedqueueitem.md new file mode 100644 index 00000000..90dc22ad --- /dev/null +++ b/docs/sdk/models/operations/addedqueueitem.md @@ -0,0 +1,16 @@ +# AddedQueueItem + +## Example Usage + +```typescript +import { AddedQueueItem } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddedQueueItem = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | The queue item id that was added or the existing one if an item already exists in this queue with the same parameters | +| `key` | *string* | :heavy_minus_sign: | The key added to the queue | \ No newline at end of file diff --git a/docs/sdk/models/operations/addextrasglobals.md b/docs/sdk/models/operations/addextrasglobals.md new file mode 100644 index 00000000..f6540fa9 --- /dev/null +++ b/docs/sdk/models/operations/addextrasglobals.md @@ -0,0 +1,35 @@ +# AddExtrasGlobals + +## Example Usage + +```typescript +import { AddExtrasGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddExtrasGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/addextrasrequest.md b/docs/sdk/models/operations/addextrasrequest.md new file mode 100644 index 00000000..3263926f --- /dev/null +++ b/docs/sdk/models/operations/addextrasrequest.md @@ -0,0 +1,31 @@ +# AddExtrasRequest + +## Example Usage + +```typescript +import { AddExtrasRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddExtrasRequest = { + ids: "", + url: "https://agitated-tribe.name/", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `extraType` | *number* | :heavy_minus_sign: | The metadata type of the extra | | +| `url` | *string* | :heavy_check_mark: | The URL of the extra | | +| `title` | *string* | :heavy_minus_sign: | The title to filter by or assign | | \ No newline at end of file diff --git a/docs/sdk/models/operations/addextrasresponse.md b/docs/sdk/models/operations/addextrasresponse.md new file mode 100644 index 00000000..0aff465b --- /dev/null +++ b/docs/sdk/models/operations/addextrasresponse.md @@ -0,0 +1,20 @@ +# AddExtrasResponse + +## Example Usage + +```typescript +import { AddExtrasResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddExtrasResponse = { + contentType: "", + statusCode: 968715, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/addlineupdvr.md b/docs/sdk/models/operations/addlineupdvr.md new file mode 100644 index 00000000..4f6b9cd6 --- /dev/null +++ b/docs/sdk/models/operations/addlineupdvr.md @@ -0,0 +1,19 @@ +# AddLineupDVR + +## Example Usage + +```typescript +import { AddLineupDVR } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddLineupDVR = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `device` | [shared.Device](../../../sdk/models/shared/device.md)[] | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `language` | *string* | :heavy_minus_sign: | N/A | +| `lineup` | *string* | :heavy_minus_sign: | N/A | +| `uuid` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/addlineupglobals.md b/docs/sdk/models/operations/addlineupglobals.md new file mode 100644 index 00000000..623a3f7c --- /dev/null +++ b/docs/sdk/models/operations/addlineupglobals.md @@ -0,0 +1,35 @@ +# AddLineupGlobals + +## Example Usage + +```typescript +import { AddLineupGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddLineupGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/addlineupmediacontainer.md b/docs/sdk/models/operations/addlineupmediacontainer.md new file mode 100644 index 00000000..b77bfa99 --- /dev/null +++ b/docs/sdk/models/operations/addlineupmediacontainer.md @@ -0,0 +1,16 @@ +# AddLineupMediaContainer + +## Example Usage + +```typescript +import { AddLineupMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddLineupMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.AddLineupMediaContainerMediaContainer](../../../sdk/models/operations/addlineupmediacontainermediacontainer.md) | :heavy_minus_sign: | N/A | +| `dvr` | [operations.AddLineupDVR](../../../sdk/models/operations/addlineupdvr.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/addlineupmediacontainermediacontainer.md b/docs/sdk/models/operations/addlineupmediacontainermediacontainer.md new file mode 100644 index 00000000..36e15c5c --- /dev/null +++ b/docs/sdk/models/operations/addlineupmediacontainermediacontainer.md @@ -0,0 +1,24 @@ +# AddLineupMediaContainerMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { AddLineupMediaContainerMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddLineupMediaContainerMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `status` | *number* | :heavy_minus_sign: | A status indicator. If present and non-zero, indicates an error | \ No newline at end of file diff --git a/docs/sdk/models/operations/addlineuprequest.md b/docs/sdk/models/operations/addlineuprequest.md new file mode 100644 index 00000000..65c705ab --- /dev/null +++ b/docs/sdk/models/operations/addlineuprequest.md @@ -0,0 +1,29 @@ +# AddLineupRequest + +## Example Usage + +```typescript +import { AddLineupRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddLineupRequest = { + dvrId: 950730, + lineup: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `dvrId` | *number* | :heavy_check_mark: | The ID of the DVR. | | +| `lineup` | *string* | :heavy_check_mark: | The lineup to delete | | \ No newline at end of file diff --git a/docs/sdk/models/operations/addlineupresponse.md b/docs/sdk/models/operations/addlineupresponse.md new file mode 100644 index 00000000..3cef164f --- /dev/null +++ b/docs/sdk/models/operations/addlineupresponse.md @@ -0,0 +1,23 @@ +# AddLineupResponse + +## Example Usage + +```typescript +import { AddLineupResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddLineupResponse = { + contentType: "", + statusCode: 652088, + headers: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.AddLineupResponseBody](../../../sdk/models/operations/addlineupresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/addlineupresponsebody.md b/docs/sdk/models/operations/addlineupresponsebody.md new file mode 100644 index 00000000..8b972e46 --- /dev/null +++ b/docs/sdk/models/operations/addlineupresponsebody.md @@ -0,0 +1,17 @@ +# AddLineupResponseBody + +OK + +## Example Usage + +```typescript +import { AddLineupResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddLineupResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.AddLineupMediaContainer](../../../sdk/models/operations/addlineupmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/addplaylistcontentsmediacontainer.md b/docs/sdk/models/operations/addplaylistcontentsmediacontainer.md deleted file mode 100644 index 872ee744..00000000 --- a/docs/sdk/models/operations/addplaylistcontentsmediacontainer.md +++ /dev/null @@ -1,39 +0,0 @@ -# AddPlaylistContentsMediaContainer - -## Example Usage - -```typescript -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, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 1 | -| `leafCountAdded` | *number* | :heavy_minus_sign: | N/A | 1 | -| `leafCountRequested` | *number* | :heavy_minus_sign: | N/A | 1 | -| `metadata` | [operations.AddPlaylistContentsMetadata](../../../sdk/models/operations/addplaylistcontentsmetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/addplaylistcontentsmetadata.md b/docs/sdk/models/operations/addplaylistcontentsmetadata.md deleted file mode 100644 index 98931b9f..00000000 --- a/docs/sdk/models/operations/addplaylistcontentsmetadata.md +++ /dev/null @@ -1,41 +0,0 @@ -# AddPlaylistContentsMetadata - -## Example Usage - -```typescript -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, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 94 | -| `key` | *string* | :heavy_minus_sign: | N/A | /playlists/94/items | -| `guid` | *string* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2 | -| `type` | *string* | :heavy_minus_sign: | N/A | playlist | -| `title` | *string* | :heavy_minus_sign: | N/A | A great playlist | -| `summary` | *string* | :heavy_minus_sign: | N/A | One of my great playlists | -| `smart` | *boolean* | :heavy_minus_sign: | N/A | false | -| `playlistType` | *string* | :heavy_minus_sign: | N/A | video | -| `composite` | *string* | :heavy_minus_sign: | N/A | /playlists/94/composite/1705800070 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 423000 | -| `leafCount` | *number* | :heavy_minus_sign: | N/A | 3 | -| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1705716458 | -| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705800070 | \ No newline at end of file diff --git a/docs/sdk/models/operations/addplaylistcontentsrequest.md b/docs/sdk/models/operations/addplaylistcontentsrequest.md deleted file mode 100644 index 93f8b885..00000000 --- a/docs/sdk/models/operations/addplaylistcontentsrequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# AddPlaylistContentsRequest - -## Example Usage - -```typescript -import { AddPlaylistContentsRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: AddPlaylistContentsRequest = { - playlistID: 1207.42, - uri: "server://12345/com.plexapp.plugins.library/library/metadata/1", - playQueueID: 123, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | | -| `uri` | *string* | :heavy_check_mark: | the content URI for the playlist | server://12345/com.plexapp.plugins.library/library/metadata/1 | -| `playQueueID` | *number* | :heavy_minus_sign: | the play queue to add to a playlist | 123 | \ No newline at end of file diff --git a/docs/sdk/models/operations/addplaylistcontentsresponse.md b/docs/sdk/models/operations/addplaylistcontentsresponse.md deleted file mode 100644 index 0d4def50..00000000 --- a/docs/sdk/models/operations/addplaylistcontentsresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# AddPlaylistContentsResponse - -## Example Usage - -```typescript -import { AddPlaylistContentsResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: AddPlaylistContentsResponse = { - contentType: "", - statusCode: 736053, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.AddPlaylistContentsResponseBody](../../../sdk/models/operations/addplaylistcontentsresponsebody.md) | :heavy_minus_sign: | Playlist Updated | \ No newline at end of file diff --git a/docs/sdk/models/operations/addplaylistcontentsresponsebody.md b/docs/sdk/models/operations/addplaylistcontentsresponsebody.md deleted file mode 100644 index 0186c79e..00000000 --- a/docs/sdk/models/operations/addplaylistcontentsresponsebody.md +++ /dev/null @@ -1,40 +0,0 @@ -# AddPlaylistContentsResponseBody - -Playlist Updated - -## Example Usage - -```typescript -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, - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.AddPlaylistContentsMediaContainer](../../../sdk/models/operations/addplaylistcontentsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/addplaylistitemsglobals.md b/docs/sdk/models/operations/addplaylistitemsglobals.md new file mode 100644 index 00000000..e285df44 --- /dev/null +++ b/docs/sdk/models/operations/addplaylistitemsglobals.md @@ -0,0 +1,35 @@ +# AddPlaylistItemsGlobals + +## Example Usage + +```typescript +import { AddPlaylistItemsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddPlaylistItemsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/addplaylistitemsrequest.md b/docs/sdk/models/operations/addplaylistitemsrequest.md new file mode 100644 index 00000000..a88bdc03 --- /dev/null +++ b/docs/sdk/models/operations/addplaylistitemsrequest.md @@ -0,0 +1,29 @@ +# AddPlaylistItemsRequest + +## Example Usage + +```typescript +import { AddPlaylistItemsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddPlaylistItemsRequest = { + playlistId: 174404, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *number* | :heavy_check_mark: | The ID of the playlist | | +| `uri` | *string* | :heavy_minus_sign: | The content URI for the playlist. | | +| `playQueueID` | *number* | :heavy_minus_sign: | The play queue to add to a playlist. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/addplaylistitemsresponse.md b/docs/sdk/models/operations/addplaylistitemsresponse.md new file mode 100644 index 00000000..4519d852 --- /dev/null +++ b/docs/sdk/models/operations/addplaylistitemsresponse.md @@ -0,0 +1,21 @@ +# AddPlaylistItemsResponse + +## Example Usage + +```typescript +import { AddPlaylistItemsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddPlaylistItemsResponse = { + contentType: "", + statusCode: 789450, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithPlaylistMetadata` | [shared.MediaContainerWithPlaylistMetadata](../../../sdk/models/shared/mediacontainerwithplaylistmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/addproviderglobals.md b/docs/sdk/models/operations/addproviderglobals.md new file mode 100644 index 00000000..2e784735 --- /dev/null +++ b/docs/sdk/models/operations/addproviderglobals.md @@ -0,0 +1,35 @@ +# AddProviderGlobals + +## Example Usage + +```typescript +import { AddProviderGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddProviderGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/addproviderrequest.md b/docs/sdk/models/operations/addproviderrequest.md new file mode 100644 index 00000000..a9e1115c --- /dev/null +++ b/docs/sdk/models/operations/addproviderrequest.md @@ -0,0 +1,27 @@ +# AddProviderRequest + +## Example Usage + +```typescript +import { AddProviderRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddProviderRequest = { + url: "https://bright-unique.biz/", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `url` | *string* | :heavy_check_mark: | The URL of the media provider to add. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/addproviderresponse.md b/docs/sdk/models/operations/addproviderresponse.md new file mode 100644 index 00000000..d773017a --- /dev/null +++ b/docs/sdk/models/operations/addproviderresponse.md @@ -0,0 +1,20 @@ +# AddProviderResponse + +## Example Usage + +```typescript +import { AddProviderResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddProviderResponse = { + contentType: "", + statusCode: 30014, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/addsectionglobals.md b/docs/sdk/models/operations/addsectionglobals.md new file mode 100644 index 00000000..d7f9d668 --- /dev/null +++ b/docs/sdk/models/operations/addsectionglobals.md @@ -0,0 +1,35 @@ +# AddSectionGlobals + +## Example Usage + +```typescript +import { AddSectionGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddSectionGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/addsectionprefs.md b/docs/sdk/models/operations/addsectionprefs.md new file mode 100644 index 00000000..e1cafb2c --- /dev/null +++ b/docs/sdk/models/operations/addsectionprefs.md @@ -0,0 +1,16 @@ +# AddSectionPrefs + +The preferences for this section + +## Example Usage + +```typescript +import { AddSectionPrefs } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddSectionPrefs = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdk/models/operations/addsectionrequest.md b/docs/sdk/models/operations/addsectionrequest.md new file mode 100644 index 00000000..7c6179b0 --- /dev/null +++ b/docs/sdk/models/operations/addsectionrequest.md @@ -0,0 +1,47 @@ +# AddSectionRequest + +## Example Usage + +```typescript +import { AddSectionRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: AddSectionRequest = { + name: "", + type: 583726, + agent: "", + language: "", + locations: [ + "O:\fatboy\\Media\\Ripped\\Music", + "O:\fatboy\\Media\\My Music", + ], + prefs: {}, + relative: BoolInt.One, + importFromiTunes: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `name` | *string* | :heavy_check_mark: | The name of the new section | | +| `type` | *number* | :heavy_check_mark: | The type of library section | | +| `scanner` | *string* | :heavy_minus_sign: | The scanner this section should use | | +| `agent` | *string* | :heavy_check_mark: | The agent this section should use for metadata | | +| `metadataAgentProviderGroupId` | *string* | :heavy_minus_sign: | The agent group id for this section | | +| `language` | *string* | :heavy_check_mark: | The language of this section | | +| `locations` | *string*[] | :heavy_minus_sign: | The locations on disk to add to this section | [
"O:\\fatboy\\Media\\Ripped\\Music",
"O:\\fatboy\\Media\\My Music"
] | +| `prefs` | [operations.AddSectionPrefs](../../../sdk/models/operations/addsectionprefs.md) | :heavy_minus_sign: | The preferences for this section | {
"collectionMode": 2,
"hidden": 0
} | +| `relative` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | If set, paths are relative to `Media Upload` path | 1 | +| `importFromiTunes` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | If set, import media from iTunes. | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/addsectionresponse.md b/docs/sdk/models/operations/addsectionresponse.md new file mode 100644 index 00000000..20bb8eac --- /dev/null +++ b/docs/sdk/models/operations/addsectionresponse.md @@ -0,0 +1,21 @@ +# AddSectionResponse + +## Example Usage + +```typescript +import { AddSectionResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddSectionResponse = { + contentType: "", + statusCode: 465224, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `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 | +| `slashGetResponses200` | [shared.SlashGetResponses200](../../../sdk/models/shared/slashgetresponses200.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/addsubtitlesglobals.md b/docs/sdk/models/operations/addsubtitlesglobals.md new file mode 100644 index 00000000..19039ce0 --- /dev/null +++ b/docs/sdk/models/operations/addsubtitlesglobals.md @@ -0,0 +1,35 @@ +# AddSubtitlesGlobals + +## Example Usage + +```typescript +import { AddSubtitlesGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddSubtitlesGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/addsubtitlesrequest.md b/docs/sdk/models/operations/addsubtitlesrequest.md new file mode 100644 index 00000000..41dea345 --- /dev/null +++ b/docs/sdk/models/operations/addsubtitlesrequest.md @@ -0,0 +1,37 @@ +# AddSubtitlesRequest + +## Example Usage + +```typescript +import { AddSubtitlesRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: AddSubtitlesRequest = { + ids: "", + forced: BoolInt.One, + hearingImpaired: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `title` | *string* | :heavy_minus_sign: | N/A | | +| `language` | *string* | :heavy_minus_sign: | N/A | | +| `mediaItemID` | *number* | :heavy_minus_sign: | N/A | | +| `url` | *string* | :heavy_minus_sign: | The URL of the subtitle. If not provided, the contents of the subtitle must be in the post body | | +| `format` | *string* | :heavy_minus_sign: | N/A | | +| `forced` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | N/A | 1 | +| `hearingImpaired` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/addsubtitlesresponse.md b/docs/sdk/models/operations/addsubtitlesresponse.md new file mode 100644 index 00000000..73e83c72 --- /dev/null +++ b/docs/sdk/models/operations/addsubtitlesresponse.md @@ -0,0 +1,20 @@ +# AddSubtitlesResponse + +## Example Usage + +```typescript +import { AddSubtitlesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddSubtitlesResponse = { + contentType: "", + statusCode: 406595, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/addtoplayqueueglobals.md b/docs/sdk/models/operations/addtoplayqueueglobals.md new file mode 100644 index 00000000..a7037a50 --- /dev/null +++ b/docs/sdk/models/operations/addtoplayqueueglobals.md @@ -0,0 +1,35 @@ +# AddToPlayQueueGlobals + +## Example Usage + +```typescript +import { AddToPlayQueueGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddToPlayQueueGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/addtoplayqueuerequest.md b/docs/sdk/models/operations/addtoplayqueuerequest.md new file mode 100644 index 00000000..c6c00ff1 --- /dev/null +++ b/docs/sdk/models/operations/addtoplayqueuerequest.md @@ -0,0 +1,32 @@ +# AddToPlayQueueRequest + +## Example Usage + +```typescript +import { AddToPlayQueueRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: AddToPlayQueueRequest = { + playQueueId: 354193, + next: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playQueueId` | *number* | :heavy_check_mark: | The ID of the play queue. | | +| `uri` | *string* | :heavy_minus_sign: | The content URI for what we're adding to the queue. | | +| `playlistID` | *string* | :heavy_minus_sign: | The ID of the playlist to add to the playQueue. | | +| `next` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Play this item next (defaults to 0 - queueing at the end of manually queued items). | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/addtoplayqueueresponse.md b/docs/sdk/models/operations/addtoplayqueueresponse.md new file mode 100644 index 00000000..7afda07b --- /dev/null +++ b/docs/sdk/models/operations/addtoplayqueueresponse.md @@ -0,0 +1,21 @@ +# AddToPlayQueueResponse + +## Example Usage + +```typescript +import { AddToPlayQueueResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AddToPlayQueueResponse = { + contentType: "", + statusCode: 727375, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithPlaylistMetadata` | [shared.MediaContainerWithPlaylistMetadata](../../../sdk/models/shared/mediacontainerwithplaylistmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/advancedsubtitles.md b/docs/sdk/models/operations/advancedsubtitles.md new file mode 100644 index 00000000..a1660cd2 --- /dev/null +++ b/docs/sdk/models/operations/advancedsubtitles.md @@ -0,0 +1,20 @@ +# AdvancedSubtitles + +## Example Usage + +```typescript +import { AdvancedSubtitles } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AdvancedSubtitles = AdvancedSubtitles.Auto; +``` + +## Values + +| Name | Value | +| ----------- | ----------- | +| `Auto` | auto | +| `Burn` | burn | +| `None` | none | +| `Sidecar` | sidecar | +| `Embedded` | embedded | +| `Segmented` | segmented | \ No newline at end of file diff --git a/docs/sdk/models/operations/alllibraries.md b/docs/sdk/models/operations/alllibraries.md deleted file mode 100644 index 1c585d09..00000000 --- a/docs/sdk/models/operations/alllibraries.md +++ /dev/null @@ -1,18 +0,0 @@ -# AllLibraries - -Indicates if the user has access to all libraries. - -## Example Usage - -```typescript -import { AllLibraries } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: AllLibraries = AllLibraries.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/allowcameraupload.md b/docs/sdk/models/operations/allowcameraupload.md deleted file mode 100644 index 83910ffd..00000000 --- a/docs/sdk/models/operations/allowcameraupload.md +++ /dev/null @@ -1,18 +0,0 @@ -# AllowCameraUpload - -Indicates if the user is allowed to upload from a camera. - -## Example Usage - -```typescript -import { AllowCameraUpload } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: AllowCameraUpload = AllowCameraUpload.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/allowchannels.md b/docs/sdk/models/operations/allowchannels.md deleted file mode 100644 index 9a0560d9..00000000 --- a/docs/sdk/models/operations/allowchannels.md +++ /dev/null @@ -1,18 +0,0 @@ -# AllowChannels - -Indicates if the user has access to channels. - -## Example Usage - -```typescript -import { AllowChannels } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: AllowChannels = AllowChannels.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/allowsubtitleadmin.md b/docs/sdk/models/operations/allowsubtitleadmin.md deleted file mode 100644 index e6342bb4..00000000 --- a/docs/sdk/models/operations/allowsubtitleadmin.md +++ /dev/null @@ -1,18 +0,0 @@ -# AllowSubtitleAdmin - -Indicates if the user can manage subtitles. - -## Example Usage - -```typescript -import { AllowSubtitleAdmin } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: AllowSubtitleAdmin = AllowSubtitleAdmin.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/allowsync.md b/docs/sdk/models/operations/allowsync.md deleted file mode 100644 index 93e4f80b..00000000 --- a/docs/sdk/models/operations/allowsync.md +++ /dev/null @@ -1,18 +0,0 @@ -# AllowSync - -Indicates if the user is allowed to sync media. - -## Example Usage - -```typescript -import { AllowSync } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: AllowSync = AllowSync.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/allowtuners.md b/docs/sdk/models/operations/allowtuners.md deleted file mode 100644 index 8875b6c4..00000000 --- a/docs/sdk/models/operations/allowtuners.md +++ /dev/null @@ -1,18 +0,0 @@ -# AllowTuners - -Indicates if the user is allowed to use tuners. - -## Example Usage - -```typescript -import { AllowTuners } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: AllowTuners = AllowTuners.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/analyzemetadataglobals.md b/docs/sdk/models/operations/analyzemetadataglobals.md new file mode 100644 index 00000000..3aa37cb3 --- /dev/null +++ b/docs/sdk/models/operations/analyzemetadataglobals.md @@ -0,0 +1,35 @@ +# AnalyzeMetadataGlobals + +## Example Usage + +```typescript +import { AnalyzeMetadataGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AnalyzeMetadataGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/analyzemetadatarequest.md b/docs/sdk/models/operations/analyzemetadatarequest.md new file mode 100644 index 00000000..146965f2 --- /dev/null +++ b/docs/sdk/models/operations/analyzemetadatarequest.md @@ -0,0 +1,29 @@ +# AnalyzeMetadataRequest + +## Example Usage + +```typescript +import { AnalyzeMetadataRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AnalyzeMetadataRequest = { + ids: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `thumbOffset` | *number* | :heavy_minus_sign: | Set the offset to be used for thumbnails | | +| `artOffset` | *number* | :heavy_minus_sign: | Set the offset to be used for artwork | | \ No newline at end of file diff --git a/docs/sdk/models/operations/analyzemetadataresponse.md b/docs/sdk/models/operations/analyzemetadataresponse.md new file mode 100644 index 00000000..79c2fbd0 --- /dev/null +++ b/docs/sdk/models/operations/analyzemetadataresponse.md @@ -0,0 +1,20 @@ +# AnalyzeMetadataResponse + +## Example Usage + +```typescript +import { AnalyzeMetadataResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AnalyzeMetadataResponse = { + contentType: "", + statusCode: 941124, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/applyupdatesglobals.md b/docs/sdk/models/operations/applyupdatesglobals.md new file mode 100644 index 00000000..150180dc --- /dev/null +++ b/docs/sdk/models/operations/applyupdatesglobals.md @@ -0,0 +1,35 @@ +# ApplyUpdatesGlobals + +## Example Usage + +```typescript +import { ApplyUpdatesGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ApplyUpdatesGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/applyupdatesrequest.md b/docs/sdk/models/operations/applyupdatesrequest.md index 764dfa31..0f8aacdc 100644 --- a/docs/sdk/models/operations/applyupdatesrequest.md +++ b/docs/sdk/models/operations/applyupdatesrequest.md @@ -3,17 +3,28 @@ ## Example Usage ```typescript -import { ApplyUpdatesRequest, Skip, Tonight } from "@lukehagar/plexjs/sdk/models/operations"; +import { ApplyUpdatesRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; let value: ApplyUpdatesRequest = { - tonight: Tonight.One, - skip: Skip.One, + tonight: BoolInt.One, + skip: BoolInt.One, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tonight` | [operations.Tonight](../../../sdk/models/operations/tonight.md) | :heavy_minus_sign: | 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 | 1 | -| `skip` | [operations.Skip](../../../sdk/models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. | 1 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `tonight` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | 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 immediately. | 1 | +| `skip` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/attributes.md b/docs/sdk/models/operations/attributes.md deleted file mode 100644 index 6509f6dc..00000000 --- a/docs/sdk/models/operations/attributes.md +++ /dev/null @@ -1,21 +0,0 @@ -# Attributes - -Attributes associated with the marker. - -## Example Usage - -```typescript -import { Attributes } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Attributes = { - id: 306970, - version: 4, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | The identifier for the attributes. | 306970 | -| `version` | *number* | :heavy_minus_sign: | The version number of the marker attributes. | 4 | \ No newline at end of file diff --git a/docs/sdk/models/operations/autocompleteglobals.md b/docs/sdk/models/operations/autocompleteglobals.md new file mode 100644 index 00000000..1aabbf8d --- /dev/null +++ b/docs/sdk/models/operations/autocompleteglobals.md @@ -0,0 +1,35 @@ +# AutocompleteGlobals + +## Example Usage + +```typescript +import { AutocompleteGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AutocompleteGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/autocompleterequest.md b/docs/sdk/models/operations/autocompleterequest.md new file mode 100644 index 00000000..fd5a4bf7 --- /dev/null +++ b/docs/sdk/models/operations/autocompleterequest.md @@ -0,0 +1,30 @@ +# AutocompleteRequest + +## Example Usage + +```typescript +import { AutocompleteRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AutocompleteRequest = { + sectionId: 594987, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | +| `type` | *number* | :heavy_minus_sign: | Item type | | +| `fieldQuery` | *string* | :heavy_minus_sign: | The "field" stands in for any field, the value is a partial string for matching | | +| `mediaQuery` | [shared.MediaQuery](../../../sdk/models/shared/mediaquery.md) | :heavy_minus_sign: | This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries | | \ No newline at end of file diff --git a/docs/sdk/models/operations/autocompleteresponse.md b/docs/sdk/models/operations/autocompleteresponse.md new file mode 100644 index 00000000..c3ee69e3 --- /dev/null +++ b/docs/sdk/models/operations/autocompleteresponse.md @@ -0,0 +1,34 @@ +# AutocompleteResponse + +## Example Usage + +```typescript +import { AutocompleteResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: AutocompleteResponse = { + contentType: "", + statusCode: 451053, + headers: { + "key": [ + "", + ], + "key1": [ + "", + ], + "key2": [ + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/autoselectsubtitle.md b/docs/sdk/models/operations/autoselectsubtitle.md deleted file mode 100644 index a326f475..00000000 --- a/docs/sdk/models/operations/autoselectsubtitle.md +++ /dev/null @@ -1,18 +0,0 @@ -# AutoSelectSubtitle - -The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) - -## Example Usage - -```typescript -import { AutoSelectSubtitle } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: AutoSelectSubtitle = AutoSelectSubtitle.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/bandwidth.md b/docs/sdk/models/operations/bandwidth.md new file mode 100644 index 00000000..d931b8a8 --- /dev/null +++ b/docs/sdk/models/operations/bandwidth.md @@ -0,0 +1,17 @@ +# Bandwidth + +## Example Usage + +```typescript +import { Bandwidth } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: Bandwidth = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `bandwidth` | *number* | :heavy_minus_sign: | The bandwidth at this time in kbps | +| `resolution` | *string* | :heavy_minus_sign: | The user-friendly resolution at this time | +| `time` | *number* | :heavy_minus_sign: | Media playback time where this bandwidth started | \ No newline at end of file diff --git a/docs/sdk/models/operations/bandwidths.md b/docs/sdk/models/operations/bandwidths.md new file mode 100644 index 00000000..cb538b89 --- /dev/null +++ b/docs/sdk/models/operations/bandwidths.md @@ -0,0 +1,17 @@ +# Bandwidths + +A list of media times and bandwidths when trascoding is using with auto adjustment of bandwidth + +## Example Usage + +```typescript +import { Bandwidths } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: Bandwidths = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `bandwidth` | [operations.Bandwidth](../../../sdk/models/operations/bandwidth.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/billing.md b/docs/sdk/models/operations/billing.md deleted file mode 100644 index 2eab8d46..00000000 --- a/docs/sdk/models/operations/billing.md +++ /dev/null @@ -1,19 +0,0 @@ -# Billing - -## Example Usage - -```typescript -import { Billing } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Billing = { - internalPaymentMethod: {}, - paymentMethodId: 575569, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `internalPaymentMethod` | [operations.InternalPaymentMethod](../../../sdk/models/operations/internalpaymentmethod.md) | :heavy_check_mark: | N/A | -| `paymentMethodId` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/butlertask.md b/docs/sdk/models/operations/butlertask.md index e1d68ec9..52784262 100644 --- a/docs/sdk/models/operations/butlertask.md +++ b/docs/sdk/models/operations/butlertask.md @@ -5,22 +5,16 @@ ```typescript 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", -}; +let value: ButlerTask = {}; ``` ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | N/A | BackupDatabase | -| `interval` | *number* | :heavy_minus_sign: | N/A | 3 | -| `scheduleRandomized` | *boolean* | :heavy_minus_sign: | N/A | | -| `enabled` | *boolean* | :heavy_minus_sign: | N/A | | -| `title` | *string* | :heavy_minus_sign: | N/A | Backup Database | -| `description` | *string* | :heavy_minus_sign: | N/A | Create a backup copy of the server's database in the configured backup directory | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `description` | *string* | :heavy_minus_sign: | A user-friendly description of the task | +| `enabled` | *boolean* | :heavy_minus_sign: | Whether this task is enabled or not | +| `interval` | *number* | :heavy_minus_sign: | The interval (in days) of when this task is run. A value of 1 is run every day, 7 is every week, etc. | +| `name` | *string* | :heavy_minus_sign: | The name of the task | +| `scheduleRandomized` | *boolean* | :heavy_minus_sign: | Indicates whether the timing of the task is randomized within the butler interval | +| `title` | *string* | :heavy_minus_sign: | A user-friendly title of the task | \ No newline at end of file diff --git a/docs/sdk/models/operations/butlertasks.md b/docs/sdk/models/operations/butlertasks.md index 167dcd55..77d7b457 100644 --- a/docs/sdk/models/operations/butlertasks.md +++ b/docs/sdk/models/operations/butlertasks.md @@ -5,17 +5,7 @@ ```typescript 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", - }, - ], -}; +let value: ButlerTasks = {}; ``` ## Fields diff --git a/docs/sdk/models/operations/cancelactivityglobals.md b/docs/sdk/models/operations/cancelactivityglobals.md new file mode 100644 index 00000000..a4138722 --- /dev/null +++ b/docs/sdk/models/operations/cancelactivityglobals.md @@ -0,0 +1,35 @@ +# CancelActivityGlobals + +## Example Usage + +```typescript +import { CancelActivityGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CancelActivityGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/cancelactivityrequest.md b/docs/sdk/models/operations/cancelactivityrequest.md new file mode 100644 index 00000000..51126492 --- /dev/null +++ b/docs/sdk/models/operations/cancelactivityrequest.md @@ -0,0 +1,27 @@ +# CancelActivityRequest + +## Example Usage + +```typescript +import { CancelActivityRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CancelActivityRequest = { + activityId: "d6199ba1-fb5e-4cae-bf17-1a5369c1cf1e", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `activityId` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. | d6199ba1-fb5e-4cae-bf17-1a5369c1cf1e | \ No newline at end of file diff --git a/docs/sdk/models/operations/cancelactivityresponse.md b/docs/sdk/models/operations/cancelactivityresponse.md new file mode 100644 index 00000000..00b00f6c --- /dev/null +++ b/docs/sdk/models/operations/cancelactivityresponse.md @@ -0,0 +1,20 @@ +# CancelActivityResponse + +## Example Usage + +```typescript +import { CancelActivityResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CancelActivityResponse = { + contentType: "", + statusCode: 891380, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/cancelgrabglobals.md b/docs/sdk/models/operations/cancelgrabglobals.md new file mode 100644 index 00000000..b21b56fc --- /dev/null +++ b/docs/sdk/models/operations/cancelgrabglobals.md @@ -0,0 +1,35 @@ +# CancelGrabGlobals + +## Example Usage + +```typescript +import { CancelGrabGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CancelGrabGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/cancelgrabrequest.md b/docs/sdk/models/operations/cancelgrabrequest.md new file mode 100644 index 00000000..a8704c9e --- /dev/null +++ b/docs/sdk/models/operations/cancelgrabrequest.md @@ -0,0 +1,27 @@ +# CancelGrabRequest + +## Example Usage + +```typescript +import { CancelGrabRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CancelGrabRequest = { + operationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `operationId` | *string* | :heavy_check_mark: | The ID of the operation. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/cancelgrabresponse.md b/docs/sdk/models/operations/cancelgrabresponse.md new file mode 100644 index 00000000..35f6cc9d --- /dev/null +++ b/docs/sdk/models/operations/cancelgrabresponse.md @@ -0,0 +1,20 @@ +# CancelGrabResponse + +## Example Usage + +```typescript +import { CancelGrabResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CancelGrabResponse = { + contentType: "", + statusCode: 762769, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/cancelrefreshglobals.md b/docs/sdk/models/operations/cancelrefreshglobals.md new file mode 100644 index 00000000..23323b12 --- /dev/null +++ b/docs/sdk/models/operations/cancelrefreshglobals.md @@ -0,0 +1,35 @@ +# CancelRefreshGlobals + +## Example Usage + +```typescript +import { CancelRefreshGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CancelRefreshGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/cancelrefreshrequest.md b/docs/sdk/models/operations/cancelrefreshrequest.md new file mode 100644 index 00000000..fee52741 --- /dev/null +++ b/docs/sdk/models/operations/cancelrefreshrequest.md @@ -0,0 +1,27 @@ +# CancelRefreshRequest + +## Example Usage + +```typescript +import { CancelRefreshRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CancelRefreshRequest = { + sectionId: 569134, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/sdk/models/operations/cancelrefreshresponse.md b/docs/sdk/models/operations/cancelrefreshresponse.md new file mode 100644 index 00000000..f5552953 --- /dev/null +++ b/docs/sdk/models/operations/cancelrefreshresponse.md @@ -0,0 +1,20 @@ +# CancelRefreshResponse + +## Example Usage + +```typescript +import { CancelRefreshResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CancelRefreshResponse = { + contentType: "", + statusCode: 662485, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/cancelserveractivitiesrequest.md b/docs/sdk/models/operations/cancelserveractivitiesrequest.md deleted file mode 100644 index 3631e801..00000000 --- a/docs/sdk/models/operations/cancelserveractivitiesrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# CancelServerActivitiesRequest - -## Example Usage - -```typescript -import { CancelServerActivitiesRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: CancelServerActivitiesRequest = { - activityUUID: "25b71ed5-0f9d-461c-baa7-d404e9e10d3e", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `activityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. | 25b71ed5-0f9d-461c-baa7-d404e9e10d3e | \ No newline at end of file diff --git a/docs/sdk/models/operations/cancelserveractivitiesresponse.md b/docs/sdk/models/operations/cancelserveractivitiesresponse.md deleted file mode 100644 index d72dc32f..00000000 --- a/docs/sdk/models/operations/cancelserveractivitiesresponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# CancelServerActivitiesResponse - -## Example Usage - -```typescript -import { CancelServerActivitiesResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: CancelServerActivitiesResponse = { - contentType: "", - statusCode: 192797, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/channelmappingbykey.md b/docs/sdk/models/operations/channelmappingbykey.md new file mode 100644 index 00000000..525f0226 --- /dev/null +++ b/docs/sdk/models/operations/channelmappingbykey.md @@ -0,0 +1,16 @@ +# ChannelMappingByKey + +The mapping of changes, passed as a map of device channel to lineup key. + +## Example Usage + +```typescript +import { ChannelMappingByKey } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ChannelMappingByKey = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdk/models/operations/chapter.md b/docs/sdk/models/operations/chapter.md deleted file mode 100644 index b8a29916..00000000 --- a/docs/sdk/models/operations/chapter.md +++ /dev/null @@ -1,29 +0,0 @@ -# Chapter - -The thumbnail for the chapter - -## Example Usage - -```typescript -import { Chapter } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Chapter = { - id: 4, - filter: "thumb=4", - index: 1, - startTimeOffset: 0, - endTimeOffset: 100100, - thumb: "/library/media/46883/chapterImages/1", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `id` | *number* | :heavy_check_mark: | N/A | 4 | -| `filter` | *string* | :heavy_check_mark: | N/A | thumb=4 | -| `index` | *number* | :heavy_check_mark: | N/A | 1 | -| `startTimeOffset` | *number* | :heavy_check_mark: | N/A | 0 | -| `endTimeOffset` | *number* | :heavy_check_mark: | N/A | 100100 | -| `thumb` | *string* | :heavy_check_mark: | N/A | /library/media/46883/chapterImages/1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/checkforupdatesrequest.md b/docs/sdk/models/operations/checkforupdatesrequest.md deleted file mode 100644 index 69634ba1..00000000 --- a/docs/sdk/models/operations/checkforupdatesrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# CheckForUpdatesRequest - -## Example Usage - -```typescript -import { CheckForUpdatesRequest, Download } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: CheckForUpdatesRequest = { - download: Download.One, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `download` | [operations.Download](../../../sdk/models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/checkforupdatesresponse.md b/docs/sdk/models/operations/checkforupdatesresponse.md deleted file mode 100644 index 8f2b0516..00000000 --- a/docs/sdk/models/operations/checkforupdatesresponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# CheckForUpdatesResponse - -## Example Usage - -```typescript -import { CheckForUpdatesResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: CheckForUpdatesResponse = { - contentType: "", - statusCode: 395012, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/checkupdatesglobals.md b/docs/sdk/models/operations/checkupdatesglobals.md new file mode 100644 index 00000000..75ed3154 --- /dev/null +++ b/docs/sdk/models/operations/checkupdatesglobals.md @@ -0,0 +1,35 @@ +# CheckUpdatesGlobals + +## Example Usage + +```typescript +import { CheckUpdatesGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CheckUpdatesGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/checkupdatesrequest.md b/docs/sdk/models/operations/checkupdatesrequest.md new file mode 100644 index 00000000..6c5fbf2f --- /dev/null +++ b/docs/sdk/models/operations/checkupdatesrequest.md @@ -0,0 +1,28 @@ +# CheckUpdatesRequest + +## Example Usage + +```typescript +import { CheckUpdatesRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: CheckUpdatesRequest = { + download: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `download` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/checkupdatesresponse.md b/docs/sdk/models/operations/checkupdatesresponse.md new file mode 100644 index 00000000..62a27d48 --- /dev/null +++ b/docs/sdk/models/operations/checkupdatesresponse.md @@ -0,0 +1,20 @@ +# CheckUpdatesResponse + +## Example Usage + +```typescript +import { CheckUpdatesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CheckUpdatesResponse = { + contentType: "", + statusCode: 957467, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/chromasubsampling.md b/docs/sdk/models/operations/chromasubsampling.md new file mode 100644 index 00000000..7e7ec7b3 --- /dev/null +++ b/docs/sdk/models/operations/chromasubsampling.md @@ -0,0 +1,25 @@ +# ChromaSubsampling + +Use the specified chroma subsambling. + - 0: 411 + - 1: 420 + - 2: 422 + - 3: 444 +Defaults to 3 (444) + +## Example Usage + +```typescript +import { ChromaSubsampling } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ChromaSubsampling = ChromaSubsampling.Two; +``` + +## Values + +| Name | Value | +| ------- | ------- | +| `Zero` | 0 | +| `One` | 1 | +| `Two` | 2 | +| `Three` | 3 | \ No newline at end of file diff --git a/docs/sdk/models/operations/cleanbundlesresponse.md b/docs/sdk/models/operations/cleanbundlesresponse.md new file mode 100644 index 00000000..d7a68709 --- /dev/null +++ b/docs/sdk/models/operations/cleanbundlesresponse.md @@ -0,0 +1,20 @@ +# CleanBundlesResponse + +## Example Usage + +```typescript +import { CleanBundlesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CleanBundlesResponse = { + contentType: "", + statusCode: 909877, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/clearplaylistcontentsrequest.md b/docs/sdk/models/operations/clearplaylistcontentsrequest.md deleted file mode 100644 index f67dd726..00000000 --- a/docs/sdk/models/operations/clearplaylistcontentsrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# ClearPlaylistContentsRequest - -## Example Usage - -```typescript -import { ClearPlaylistContentsRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: ClearPlaylistContentsRequest = { - playlistID: 5077.01, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | \ No newline at end of file diff --git a/docs/sdk/models/operations/clearplaylistcontentsresponse.md b/docs/sdk/models/operations/clearplaylistcontentsresponse.md deleted file mode 100644 index acc6f845..00000000 --- a/docs/sdk/models/operations/clearplaylistcontentsresponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# ClearPlaylistContentsResponse - -## Example Usage - -```typescript -import { ClearPlaylistContentsResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: ClearPlaylistContentsResponse = { - contentType: "", - statusCode: 406986, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/clearplaylistitemsglobals.md b/docs/sdk/models/operations/clearplaylistitemsglobals.md new file mode 100644 index 00000000..871e8a10 --- /dev/null +++ b/docs/sdk/models/operations/clearplaylistitemsglobals.md @@ -0,0 +1,35 @@ +# ClearPlaylistItemsGlobals + +## Example Usage + +```typescript +import { ClearPlaylistItemsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ClearPlaylistItemsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/clearplaylistitemsrequest.md b/docs/sdk/models/operations/clearplaylistitemsrequest.md new file mode 100644 index 00000000..edcdee9d --- /dev/null +++ b/docs/sdk/models/operations/clearplaylistitemsrequest.md @@ -0,0 +1,27 @@ +# ClearPlaylistItemsRequest + +## Example Usage + +```typescript +import { ClearPlaylistItemsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ClearPlaylistItemsRequest = { + playlistId: 236302, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *number* | :heavy_check_mark: | The ID of the playlist | | \ No newline at end of file diff --git a/docs/sdk/models/operations/clearplaylistitemsresponse.md b/docs/sdk/models/operations/clearplaylistitemsresponse.md new file mode 100644 index 00000000..f16b63ee --- /dev/null +++ b/docs/sdk/models/operations/clearplaylistitemsresponse.md @@ -0,0 +1,21 @@ +# ClearPlaylistItemsResponse + +## Example Usage + +```typescript +import { ClearPlaylistItemsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ClearPlaylistItemsResponse = { + contentType: "", + statusCode: 304497, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithPlaylistMetadata` | [shared.MediaContainerWithPlaylistMetadata](../../../sdk/models/shared/mediacontainerwithplaylistmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/clearplayqueueglobals.md b/docs/sdk/models/operations/clearplayqueueglobals.md new file mode 100644 index 00000000..29678cc0 --- /dev/null +++ b/docs/sdk/models/operations/clearplayqueueglobals.md @@ -0,0 +1,35 @@ +# ClearPlayQueueGlobals + +## Example Usage + +```typescript +import { ClearPlayQueueGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ClearPlayQueueGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/clearplayqueuerequest.md b/docs/sdk/models/operations/clearplayqueuerequest.md new file mode 100644 index 00000000..e991d325 --- /dev/null +++ b/docs/sdk/models/operations/clearplayqueuerequest.md @@ -0,0 +1,27 @@ +# ClearPlayQueueRequest + +## Example Usage + +```typescript +import { ClearPlayQueueRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ClearPlayQueueRequest = { + playQueueId: 442842, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playQueueId` | *number* | :heavy_check_mark: | The ID of the play queue. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/clearplayqueueresponse.md b/docs/sdk/models/operations/clearplayqueueresponse.md new file mode 100644 index 00000000..49eec6e9 --- /dev/null +++ b/docs/sdk/models/operations/clearplayqueueresponse.md @@ -0,0 +1,21 @@ +# ClearPlayQueueResponse + +## Example Usage + +```typescript +import { ClearPlayQueueResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ClearPlayQueueResponse = { + contentType: "", + statusCode: 80007, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithPlaylistMetadata` | [shared.MediaContainerWithPlaylistMetadata](../../../sdk/models/shared/mediacontainerwithplaylistmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/collection.md b/docs/sdk/models/operations/collection.md deleted file mode 100644 index 6b47139f..00000000 --- a/docs/sdk/models/operations/collection.md +++ /dev/null @@ -1,17 +0,0 @@ -# Collection - -## Example Usage - -```typescript -import { Collection } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Collection = { - tag: "My Awesome Collection", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `tag` | *string* | :heavy_check_mark: | The user-made collection this media item belongs to | My Awesome Collection | \ No newline at end of file diff --git a/docs/sdk/models/operations/computechannelmapchannelmapping.md b/docs/sdk/models/operations/computechannelmapchannelmapping.md new file mode 100644 index 00000000..926b44da --- /dev/null +++ b/docs/sdk/models/operations/computechannelmapchannelmapping.md @@ -0,0 +1,18 @@ +# ComputeChannelMapChannelMapping + +## Example Usage + +```typescript +import { ComputeChannelMapChannelMapping } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ComputeChannelMapChannelMapping = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `channelKey` | *string* | :heavy_minus_sign: | N/A | +| `deviceIdentifier` | *string* | :heavy_minus_sign: | The channel description on the device | +| `favorite` | *boolean* | :heavy_minus_sign: | N/A | +| `lineupIdentifier` | *string* | :heavy_minus_sign: | The channel identifier in the lineup | \ No newline at end of file diff --git a/docs/sdk/models/operations/computechannelmapglobals.md b/docs/sdk/models/operations/computechannelmapglobals.md new file mode 100644 index 00000000..ad25b3cd --- /dev/null +++ b/docs/sdk/models/operations/computechannelmapglobals.md @@ -0,0 +1,35 @@ +# ComputeChannelMapGlobals + +## Example Usage + +```typescript +import { ComputeChannelMapGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ComputeChannelMapGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/computechannelmapmediacontainer.md b/docs/sdk/models/operations/computechannelmapmediacontainer.md new file mode 100644 index 00000000..dfc3f737 --- /dev/null +++ b/docs/sdk/models/operations/computechannelmapmediacontainer.md @@ -0,0 +1,24 @@ +# ComputeChannelMapMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { ComputeChannelMapMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ComputeChannelMapMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `channelMapping` | [operations.ComputeChannelMapChannelMapping](../../../sdk/models/operations/computechannelmapchannelmapping.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/computechannelmaprequest.md b/docs/sdk/models/operations/computechannelmaprequest.md new file mode 100644 index 00000000..41fff8cc --- /dev/null +++ b/docs/sdk/models/operations/computechannelmaprequest.md @@ -0,0 +1,29 @@ +# ComputeChannelMapRequest + +## Example Usage + +```typescript +import { ComputeChannelMapRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ComputeChannelMapRequest = { + device: "Desktop", + lineup: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `device` | *string* | :heavy_check_mark: | The URI describing the device | | +| `lineup` | *string* | :heavy_check_mark: | The URI describing the lineup | | \ No newline at end of file diff --git a/docs/sdk/models/operations/computechannelmapresponse.md b/docs/sdk/models/operations/computechannelmapresponse.md new file mode 100644 index 00000000..940a39f2 --- /dev/null +++ b/docs/sdk/models/operations/computechannelmapresponse.md @@ -0,0 +1,23 @@ +# ComputeChannelMapResponse + +## Example Usage + +```typescript +import { ComputeChannelMapResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ComputeChannelMapResponse = { + contentType: "", + statusCode: 3379, + headers: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.ComputeChannelMapResponseBody](../../../sdk/models/operations/computechannelmapresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/computechannelmapresponsebody.md b/docs/sdk/models/operations/computechannelmapresponsebody.md new file mode 100644 index 00000000..d6297abf --- /dev/null +++ b/docs/sdk/models/operations/computechannelmapresponsebody.md @@ -0,0 +1,17 @@ +# ComputeChannelMapResponseBody + +OK + +## Example Usage + +```typescript +import { ComputeChannelMapResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ComputeChannelMapResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.ComputeChannelMapMediaContainer](../../../sdk/models/operations/computechannelmapmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/connection.md b/docs/sdk/models/operations/connection.md new file mode 100644 index 00000000..d6fb33fb --- /dev/null +++ b/docs/sdk/models/operations/connection.md @@ -0,0 +1,20 @@ +# Connection + +## Example Usage + +```typescript +import { Connection } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: Connection = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `address` | *string* | :heavy_minus_sign: | N/A | +| `local` | *boolean* | :heavy_minus_sign: | Indicates if the connection is the server's LAN address | +| `port` | *number* | :heavy_minus_sign: | N/A | +| `protocol` | *string* | :heavy_minus_sign: | N/A | +| `relay` | *boolean* | :heavy_minus_sign: | Indicates the connection is over a relayed connection | +| `uri` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/connections.md b/docs/sdk/models/operations/connections.md deleted file mode 100644 index 92204585..00000000 --- a/docs/sdk/models/operations/connections.md +++ /dev/null @@ -1,29 +0,0 @@ -# Connections - -## Example Usage - -```typescript -import { Connections, Protocol } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Connections = { - protocol: Protocol.Http, - address: "84577 W 9th Street", - port: 610910, - uri: "https://dearest-custom.net", - local: true, - relay: true, - iPv6: true, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `protocol` | [operations.Protocol](../../../sdk/models/operations/protocol.md) | :heavy_check_mark: | The protocol used for the connection (http, https, etc) | http | -| `address` | *string* | :heavy_check_mark: | The (ip) address or domain name used for the connection | | -| `port` | *number* | :heavy_check_mark: | The port used for the connection | | -| `uri` | *string* | :heavy_check_mark: | The full URI of the connection | | -| `local` | *boolean* | :heavy_check_mark: | If the connection is local address | | -| `relay` | *boolean* | :heavy_check_mark: | If the connection is relayed through plex.direct | | -| `iPv6` | *boolean* | :heavy_check_mark: | If the connection is using IPv6 | | \ No newline at end of file diff --git a/docs/sdk/models/operations/connectwebsocketglobals.md b/docs/sdk/models/operations/connectwebsocketglobals.md new file mode 100644 index 00000000..13d1d303 --- /dev/null +++ b/docs/sdk/models/operations/connectwebsocketglobals.md @@ -0,0 +1,35 @@ +# ConnectWebSocketGlobals + +## Example Usage + +```typescript +import { ConnectWebSocketGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ConnectWebSocketGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/connectwebsocketrequest.md b/docs/sdk/models/operations/connectwebsocketrequest.md new file mode 100644 index 00000000..222137fa --- /dev/null +++ b/docs/sdk/models/operations/connectwebsocketrequest.md @@ -0,0 +1,25 @@ +# ConnectWebSocketRequest + +## Example Usage + +```typescript +import { ConnectWebSocketRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ConnectWebSocketRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `filter` | *string*[] | :heavy_minus_sign: | By default, all events except logs are sent. A rich filtering mechanism is provided to allow clients to opt into or out of each event type using the `filters` parameter. For example:

- `filters=-log`: All event types except logs (the default).
- `filters=foo,bar`: Only the foo and bar event types.
- `filters=`: All events types.
- `filters=-foo,bar`: All event types except foo and bar.
| | \ No newline at end of file diff --git a/docs/sdk/models/operations/connectwebsocketresponse.md b/docs/sdk/models/operations/connectwebsocketresponse.md new file mode 100644 index 00000000..2b963631 --- /dev/null +++ b/docs/sdk/models/operations/connectwebsocketresponse.md @@ -0,0 +1,18 @@ +# ConnectWebSocketResponse + +## Example Usage + +```typescript +import { ConnectWebSocketResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | +| `responseStream` | *ReadableStream* | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/context.md b/docs/sdk/models/operations/context.md deleted file mode 100644 index e9e42439..00000000 --- a/docs/sdk/models/operations/context.md +++ /dev/null @@ -1,15 +0,0 @@ -# Context - -## Example Usage - -```typescript -import { Context } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Context = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `librarySectionID` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/country.md b/docs/sdk/models/operations/country.md deleted file mode 100644 index b9e97a81..00000000 --- a/docs/sdk/models/operations/country.md +++ /dev/null @@ -1,23 +0,0 @@ -# Country - -The filter query string for country media items. - -## Example Usage - -```typescript -import { Country } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Country = { - id: 259, - tag: "United States of America", - filter: "country=19", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | The unique identifier for the country.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | -| `tag` | *string* | :heavy_check_mark: | The country of origin of this media item | United States of America | -| `filter` | *string* | :heavy_check_mark: | N/A | country=19 | \ No newline at end of file diff --git a/docs/sdk/models/operations/createcollectionglobals.md b/docs/sdk/models/operations/createcollectionglobals.md new file mode 100644 index 00000000..8087860f --- /dev/null +++ b/docs/sdk/models/operations/createcollectionglobals.md @@ -0,0 +1,35 @@ +# CreateCollectionGlobals + +## Example Usage + +```typescript +import { CreateCollectionGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateCollectionGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/createcollectionrequest.md b/docs/sdk/models/operations/createcollectionrequest.md new file mode 100644 index 00000000..be90b71a --- /dev/null +++ b/docs/sdk/models/operations/createcollectionrequest.md @@ -0,0 +1,31 @@ +# CreateCollectionRequest + +## Example Usage + +```typescript +import { CreateCollectionRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateCollectionRequest = { + sectionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *string* | :heavy_check_mark: | The section where this collection will be created | | +| `title` | *string* | :heavy_minus_sign: | The title to filter by or assign | | +| `smart` | *boolean* | :heavy_minus_sign: | Whether this is a smart collection/playlist | | +| `uri` | *string* | :heavy_minus_sign: | The URI for processing the smart collection. Required for a smart collection | | +| `type` | *number* | :heavy_minus_sign: | The metadata type to filter by | | \ No newline at end of file diff --git a/docs/sdk/models/operations/createcollectionresponse.md b/docs/sdk/models/operations/createcollectionresponse.md new file mode 100644 index 00000000..abcaf3a1 --- /dev/null +++ b/docs/sdk/models/operations/createcollectionresponse.md @@ -0,0 +1,21 @@ +# CreateCollectionResponse + +## Example Usage + +```typescript +import { CreateCollectionResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateCollectionResponse = { + contentType: "", + statusCode: 875447, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/createcustomhubglobals.md b/docs/sdk/models/operations/createcustomhubglobals.md new file mode 100644 index 00000000..6cca6d38 --- /dev/null +++ b/docs/sdk/models/operations/createcustomhubglobals.md @@ -0,0 +1,35 @@ +# CreateCustomHubGlobals + +## Example Usage + +```typescript +import { CreateCustomHubGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateCustomHubGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/createcustomhubrequest.md b/docs/sdk/models/operations/createcustomhubrequest.md new file mode 100644 index 00000000..6bba929c --- /dev/null +++ b/docs/sdk/models/operations/createcustomhubrequest.md @@ -0,0 +1,36 @@ +# CreateCustomHubRequest + +## Example Usage + +```typescript +import { CreateCustomHubRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: CreateCustomHubRequest = { + sectionId: 94028, + metadataItemId: 822624, + promotedToRecommended: BoolInt.One, + promotedToOwnHome: BoolInt.One, + promotedToSharedHome: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | The section ID for the hubs to reorder | | +| `metadataItemId` | *number* | :heavy_check_mark: | The metadata item on which to base this hub. This must currently be a collection | | +| `promotedToRecommended` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Whether this hub should be displayed in recommended | 1 | +| `promotedToOwnHome` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Whether this hub should be displayed in admin's home | 1 | +| `promotedToSharedHome` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Whether this hub should be displayed in shared user's home | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/createcustomhubresponse.md b/docs/sdk/models/operations/createcustomhubresponse.md new file mode 100644 index 00000000..eb63b549 --- /dev/null +++ b/docs/sdk/models/operations/createcustomhubresponse.md @@ -0,0 +1,20 @@ +# CreateCustomHubResponse + +## Example Usage + +```typescript +import { CreateCustomHubResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateCustomHubResponse = { + contentType: "", + statusCode: 783015, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/createdownloadqueuedownloadqueue.md b/docs/sdk/models/operations/createdownloadqueuedownloadqueue.md new file mode 100644 index 00000000..b4db3c3b --- /dev/null +++ b/docs/sdk/models/operations/createdownloadqueuedownloadqueue.md @@ -0,0 +1,17 @@ +# CreateDownloadQueueDownloadQueue + +## Example Usage + +```typescript +import { CreateDownloadQueueDownloadQueue } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateDownloadQueueDownloadQueue = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `itemCount` | *number* | :heavy_minus_sign: | N/A | +| `status` | [operations.CreateDownloadQueueStatus](../../../sdk/models/operations/createdownloadqueuestatus.md) | :heavy_minus_sign: | The state of this queue
- deciding: At least one item is still being decided
- waiting: At least one item is waiting for transcode and none are currently transcoding
- processing: At least one item is being transcoded
- done: All items are available (or potentially expired)
- error: At least one item has encountered an error
| \ No newline at end of file diff --git a/docs/sdk/models/operations/createdownloadqueuemediacontainer.md b/docs/sdk/models/operations/createdownloadqueuemediacontainer.md new file mode 100644 index 00000000..93ab15b0 --- /dev/null +++ b/docs/sdk/models/operations/createdownloadqueuemediacontainer.md @@ -0,0 +1,24 @@ +# CreateDownloadQueueMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { CreateDownloadQueueMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateDownloadQueueMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `downloadQueue` | [operations.CreateDownloadQueueDownloadQueue](../../../sdk/models/operations/createdownloadqueuedownloadqueue.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/createdownloadqueueresponse.md b/docs/sdk/models/operations/createdownloadqueueresponse.md new file mode 100644 index 00000000..3a92c04f --- /dev/null +++ b/docs/sdk/models/operations/createdownloadqueueresponse.md @@ -0,0 +1,21 @@ +# CreateDownloadQueueResponse + +## Example Usage + +```typescript +import { CreateDownloadQueueResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateDownloadQueueResponse = { + contentType: "", + statusCode: 200056, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.CreateDownloadQueueResponseBody](../../../sdk/models/operations/createdownloadqueueresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/createdownloadqueueresponsebody.md b/docs/sdk/models/operations/createdownloadqueueresponsebody.md new file mode 100644 index 00000000..901e85eb --- /dev/null +++ b/docs/sdk/models/operations/createdownloadqueueresponsebody.md @@ -0,0 +1,17 @@ +# CreateDownloadQueueResponseBody + +OK + +## Example Usage + +```typescript +import { CreateDownloadQueueResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateDownloadQueueResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.CreateDownloadQueueMediaContainer](../../../sdk/models/operations/createdownloadqueuemediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/createdownloadqueuestatus.md b/docs/sdk/models/operations/createdownloadqueuestatus.md new file mode 100644 index 00000000..09f4dea1 --- /dev/null +++ b/docs/sdk/models/operations/createdownloadqueuestatus.md @@ -0,0 +1,27 @@ +# CreateDownloadQueueStatus + +The state of this queue + - deciding: At least one item is still being decided + - waiting: At least one item is waiting for transcode and none are currently transcoding + - processing: At least one item is being transcoded + - done: All items are available (or potentially expired) + - error: At least one item has encountered an error + + +## Example Usage + +```typescript +import { CreateDownloadQueueStatus } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateDownloadQueueStatus = CreateDownloadQueueStatus.Error; +``` + +## Values + +| Name | Value | +| ------------ | ------------ | +| `Deciding` | deciding | +| `Waiting` | waiting | +| `Processing` | processing | +| `Done` | done | +| `Error` | error | \ No newline at end of file diff --git a/docs/sdk/models/operations/createdvrglobals.md b/docs/sdk/models/operations/createdvrglobals.md new file mode 100644 index 00000000..8bcc776c --- /dev/null +++ b/docs/sdk/models/operations/createdvrglobals.md @@ -0,0 +1,35 @@ +# CreateDVRGlobals + +## Example Usage + +```typescript +import { CreateDVRGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateDVRGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/createdvrrequest.md b/docs/sdk/models/operations/createdvrrequest.md new file mode 100644 index 00000000..b80d0e9e --- /dev/null +++ b/docs/sdk/models/operations/createdvrrequest.md @@ -0,0 +1,33 @@ +# CreateDVRRequest + +## Example Usage + +```typescript +import { CreateDVRRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateDVRRequest = { + lineup: "lineup://tv.plex.providers.epg.onconnect/USA-HI51418-DEFAULT", + device: [ + "device[]=device://tv.plex.grabbers.hdhomerun/1053C0CA", + ], + language: "eng", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `lineup` | *string* | :heavy_minus_sign: | The EPG lineup. | lineup://tv.plex.providers.epg.onconnect/USA-HI51418-DEFAULT | +| `device` | *string*[] | :heavy_minus_sign: | The device. | device[]=device://tv.plex.grabbers.hdhomerun/1053C0CA | +| `language` | *string* | :heavy_minus_sign: | The language. | eng | \ No newline at end of file diff --git a/docs/sdk/models/operations/createdvrresponse.md b/docs/sdk/models/operations/createdvrresponse.md new file mode 100644 index 00000000..e13e1347 --- /dev/null +++ b/docs/sdk/models/operations/createdvrresponse.md @@ -0,0 +1,28 @@ +# CreateDVRResponse + +## Example Usage + +```typescript +import { CreateDVRResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateDVRResponse = { + contentType: "", + statusCode: 414065, + headers: { + "key": [ + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `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 | +| `dvrRequestHandlerSlashGetResponses200` | [shared.DvrRequestHandlerSlashGetResponses200](../../../sdk/models/shared/dvrrequesthandlerslashgetresponses200.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/createmarkerattributes.md b/docs/sdk/models/operations/createmarkerattributes.md new file mode 100644 index 00000000..b2430614 --- /dev/null +++ b/docs/sdk/models/operations/createmarkerattributes.md @@ -0,0 +1,16 @@ +# CreateMarkerAttributes + +The attributes to assign to this marker + +## Example Usage + +```typescript +import { CreateMarkerAttributes } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateMarkerAttributes = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdk/models/operations/createmarkerglobals.md b/docs/sdk/models/operations/createmarkerglobals.md new file mode 100644 index 00000000..4151f7e8 --- /dev/null +++ b/docs/sdk/models/operations/createmarkerglobals.md @@ -0,0 +1,35 @@ +# CreateMarkerGlobals + +## Example Usage + +```typescript +import { CreateMarkerGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateMarkerGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/createmarkermediacontainer.md b/docs/sdk/models/operations/createmarkermediacontainer.md new file mode 100644 index 00000000..b93a9e64 --- /dev/null +++ b/docs/sdk/models/operations/createmarkermediacontainer.md @@ -0,0 +1,30 @@ +# CreateMarkerMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { CreateMarkerMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateMarkerMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `color` | *string* | :heavy_minus_sign: | N/A | +| `endTimeOffset` | *number* | :heavy_minus_sign: | N/A | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `startTimeOffset` | *number* | :heavy_minus_sign: | N/A | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `type` | [operations.CreateMarkerType](../../../sdk/models/operations/createmarkertype.md) | :heavy_minus_sign: | N/A | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/createmarkerrequest.md b/docs/sdk/models/operations/createmarkerrequest.md new file mode 100644 index 00000000..e92db3f9 --- /dev/null +++ b/docs/sdk/models/operations/createmarkerrequest.md @@ -0,0 +1,34 @@ +# CreateMarkerRequest + +## Example Usage + +```typescript +import { CreateMarkerRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateMarkerRequest = { + ids: "", + type: 573388, + startTimeOffset: 296852, + attributes: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `type` | *number* | :heavy_check_mark: | The type of marker to edit/create | | +| `startTimeOffset` | *number* | :heavy_check_mark: | The start time of the marker | | +| `endTimeOffset` | *number* | :heavy_minus_sign: | The end time of the marker | | +| `attributes` | [operations.CreateMarkerAttributes](../../../sdk/models/operations/createmarkerattributes.md) | :heavy_minus_sign: | The attributes to assign to this marker | {
"title": "My favorite spot"
} | \ No newline at end of file diff --git a/docs/sdk/models/operations/createmarkerresponse.md b/docs/sdk/models/operations/createmarkerresponse.md new file mode 100644 index 00000000..d7a442a0 --- /dev/null +++ b/docs/sdk/models/operations/createmarkerresponse.md @@ -0,0 +1,21 @@ +# CreateMarkerResponse + +## Example Usage + +```typescript +import { CreateMarkerResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateMarkerResponse = { + contentType: "", + statusCode: 530183, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.CreateMarkerResponseBody](../../../sdk/models/operations/createmarkerresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/createmarkerresponsebody.md b/docs/sdk/models/operations/createmarkerresponsebody.md new file mode 100644 index 00000000..8d2fc9c1 --- /dev/null +++ b/docs/sdk/models/operations/createmarkerresponsebody.md @@ -0,0 +1,17 @@ +# CreateMarkerResponseBody + +OK + +## Example Usage + +```typescript +import { CreateMarkerResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateMarkerResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.CreateMarkerMediaContainer](../../../sdk/models/operations/createmarkermediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/createmarkertype.md b/docs/sdk/models/operations/createmarkertype.md new file mode 100644 index 00000000..9438c470 --- /dev/null +++ b/docs/sdk/models/operations/createmarkertype.md @@ -0,0 +1,19 @@ +# CreateMarkerType + +## Example Usage + +```typescript +import { CreateMarkerType } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateMarkerType = CreateMarkerType.Intro; +``` + +## Values + +| Name | Value | +| ------------ | ------------ | +| `Intro` | intro | +| `Commercial` | commercial | +| `Bookmark` | bookmark | +| `Resume` | resume | +| `Credit` | credit | \ No newline at end of file diff --git a/docs/sdk/models/operations/createplaylistglobals.md b/docs/sdk/models/operations/createplaylistglobals.md new file mode 100644 index 00000000..dcc0bab2 --- /dev/null +++ b/docs/sdk/models/operations/createplaylistglobals.md @@ -0,0 +1,35 @@ +# CreatePlaylistGlobals + +## Example Usage + +```typescript +import { CreatePlaylistGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreatePlaylistGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/createplaylistmediacontainer.md b/docs/sdk/models/operations/createplaylistmediacontainer.md deleted file mode 100644 index 2dab667d..00000000 --- a/docs/sdk/models/operations/createplaylistmediacontainer.md +++ /dev/null @@ -1,38 +0,0 @@ -# CreatePlaylistMediaContainer - -## Example Usage - -```typescript -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, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 7 | -| `metadata` | [operations.CreatePlaylistMetadata](../../../sdk/models/operations/createplaylistmetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/createplaylistmetadata.md b/docs/sdk/models/operations/createplaylistmetadata.md deleted file mode 100644 index 1140776a..00000000 --- a/docs/sdk/models/operations/createplaylistmetadata.md +++ /dev/null @@ -1,47 +0,0 @@ -# CreatePlaylistMetadata - -## Example Usage - -```typescript -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, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 96 | -| `key` | *string* | :heavy_minus_sign: | N/A | /playlists/96/items | -| `guid` | *string* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55 | -| `type` | *string* | :heavy_minus_sign: | N/A | playlist | -| `title` | *string* | :heavy_minus_sign: | N/A | A Great Playlist | -| `summary` | *string* | :heavy_minus_sign: | N/A | What a great playlist | -| `smart` | *boolean* | :heavy_minus_sign: | N/A | false | -| `playlistType` | *string* | :heavy_minus_sign: | N/A | video | -| `icon` | *string* | :heavy_minus_sign: | N/A | playlist://image.smart | -| `viewCount` | *number* | :heavy_minus_sign: | N/A | 1 | -| `lastViewedAt` | *number* | :heavy_minus_sign: | N/A | 1705719589 | -| `leafCount` | *number* | :heavy_minus_sign: | N/A | 1 | -| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1705719589 | -| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705724593 | -| `composite` | *string* | :heavy_minus_sign: | N/A | /playlists/96/composite/1705724593 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 141000 | \ No newline at end of file diff --git a/docs/sdk/models/operations/createplaylistqueryparamtype.md b/docs/sdk/models/operations/createplaylistqueryparamtype.md deleted file mode 100644 index 9c971df9..00000000 --- a/docs/sdk/models/operations/createplaylistqueryparamtype.md +++ /dev/null @@ -1,22 +0,0 @@ -# CreatePlaylistQueryParamType - -type of playlist to create - -## Example Usage - -```typescript -import { CreatePlaylistQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: CreatePlaylistQueryParamType = CreatePlaylistQueryParamType.Photo; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Audio` | audio | -| `Video` | video | -| `Photo` | photo | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/createplaylistrequest.md b/docs/sdk/models/operations/createplaylistrequest.md index 39035308..5ea0134a 100644 --- a/docs/sdk/models/operations/createplaylistrequest.md +++ b/docs/sdk/models/operations/createplaylistrequest.md @@ -3,22 +3,24 @@ ## Example Usage ```typescript -import { CreatePlaylistQueryParamType, CreatePlaylistRequest, Smart } from "@lukehagar/plexjs/sdk/models/operations"; +import { CreatePlaylistRequest } from "@lukehagar/plexjs/sdk/models/operations"; -let value: CreatePlaylistRequest = { - title: "", - type: CreatePlaylistQueryParamType.Audio, - smart: Smart.Zero, - uri: "https://courageous-futon.net", -}; +let value: CreatePlaylistRequest = {}; ``` ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `title` | *string* | :heavy_check_mark: | name of the playlist | -| `type` | [operations.CreatePlaylistQueryParamType](../../../sdk/models/operations/createplaylistqueryparamtype.md) | :heavy_check_mark: | type of playlist to create | -| `smart` | [operations.Smart](../../../sdk/models/operations/smart.md) | :heavy_check_mark: | whether the playlist is smart or not | -| `uri` | *string* | :heavy_check_mark: | the content URI for the playlist | -| `playQueueID` | *number* | :heavy_minus_sign: | the play queue to copy to a playlist | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `uri` | *string* | :heavy_minus_sign: | The content URI for what we're playing (e.g. `library://...`). | | +| `playQueueID` | *number* | :heavy_minus_sign: | To create a playlist from an existing play queue. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/createplaylistresponse.md b/docs/sdk/models/operations/createplaylistresponse.md index c9c6702f..42d448ba 100644 --- a/docs/sdk/models/operations/createplaylistresponse.md +++ b/docs/sdk/models/operations/createplaylistresponse.md @@ -13,9 +13,9 @@ let value: CreatePlaylistResponse = { ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.CreatePlaylistResponseBody](../../../sdk/models/operations/createplaylistresponsebody.md) | :heavy_minus_sign: | returns all playlists | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithPlaylistMetadata` | [shared.MediaContainerWithPlaylistMetadata](../../../sdk/models/shared/mediacontainerwithplaylistmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/createplaylistresponsebody.md b/docs/sdk/models/operations/createplaylistresponsebody.md deleted file mode 100644 index 42799839..00000000 --- a/docs/sdk/models/operations/createplaylistresponsebody.md +++ /dev/null @@ -1,41 +0,0 @@ -# CreatePlaylistResponseBody - -returns all playlists - -## Example Usage - -```typescript -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, - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.CreatePlaylistMediaContainer](../../../sdk/models/operations/createplaylistmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/createplayqueueglobals.md b/docs/sdk/models/operations/createplayqueueglobals.md new file mode 100644 index 00000000..813c618f --- /dev/null +++ b/docs/sdk/models/operations/createplayqueueglobals.md @@ -0,0 +1,35 @@ +# CreatePlayQueueGlobals + +## Example Usage + +```typescript +import { CreatePlayQueueGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreatePlayQueueGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/createplayqueuemediacontainer.md b/docs/sdk/models/operations/createplayqueuemediacontainer.md new file mode 100644 index 00000000..a11f4c33 --- /dev/null +++ b/docs/sdk/models/operations/createplayqueuemediacontainer.md @@ -0,0 +1,32 @@ +# CreatePlayQueueMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { CreatePlayQueueMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreatePlayQueueMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `playQueueID` | *number* | :heavy_minus_sign: | The ID of the play queue, which is used in subsequent requests. | +| `playQueueLastAddedItemID` | *string* | :heavy_minus_sign: | Defines where the "Up Next" region starts | +| `playQueueSelectedItemID` | *number* | :heavy_minus_sign: | The queue item ID of the currently selected item. | +| `playQueueSelectedItemOffset` | *number* | :heavy_minus_sign: | The offset of the selected item in the play queue, from the beginning of the queue. | +| `playQueueSelectedMetadataItemID` | *number* | :heavy_minus_sign: | The metadata item ID of the currently selected item (matches `ratingKey` attribute in metadata item if the media provider is a library). | +| `playQueueShuffled` | *boolean* | :heavy_minus_sign: | Whether or not the queue is shuffled. | +| `playQueueSourceURI` | *string* | :heavy_minus_sign: | The original URI used to create the play queue. | +| `playQueueTotalCount` | *number* | :heavy_minus_sign: | The total number of items in the play queue. | +| `playQueueVersion` | *number* | :heavy_minus_sign: | The version of the play queue. It increments every time a change is made to the play queue to assist clients in knowing when to refresh. | \ No newline at end of file diff --git a/docs/sdk/models/operations/createplayqueuerequest.md b/docs/sdk/models/operations/createplayqueuerequest.md new file mode 100644 index 00000000..415ab71c --- /dev/null +++ b/docs/sdk/models/operations/createplayqueuerequest.md @@ -0,0 +1,42 @@ +# CreatePlayQueueRequest + +## Example Usage + +```typescript +import { CreatePlayQueueRequest, CreatePlayQueueType } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: CreatePlayQueueRequest = { + type: CreatePlayQueueType.Audio, + shuffle: BoolInt.One, + repeat: BoolInt.One, + continuous: BoolInt.One, + recursive: BoolInt.One, + onDeck: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `uri` | *string* | :heavy_minus_sign: | The content URI for what we're playing. | | +| `playlistID` | *number* | :heavy_minus_sign: | the ID of the playlist we're playing. | | +| `type` | [operations.CreatePlayQueueType](../../../sdk/models/operations/createplayqueuetype.md) | :heavy_check_mark: | The type of play queue to create | | +| `key` | *string* | :heavy_minus_sign: | The key of the first item to play, defaults to the first in the play queue. | | +| `shuffle` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Whether to shuffle the playlist, defaults to 0. | 1 | +| `repeat` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | If the PQ is bigger than the window, fill any empty space with wraparound items, defaults to 0. | 1 | +| `continuous` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Whether to create a continuous play queue (e.g. from an episode), defaults to 0. | 1 | +| `extrasPrefixCount` | *number* | :heavy_minus_sign: | Number of trailers to prepend a movie with not including the pre-roll. If omitted the pre-roll will not be returned in the play queue. When resuming a movie `extrasPrefixCount` should be omitted as a parameter instead of passing 0. | | +| `recursive` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Only applies to queues of type photo, whether to retrieve all descendent photos from an album or section, defaults to 1. | 1 | +| `onDeck` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Only applies to queues of type show or seasons, whether to return a queue that is started on the On Deck episode if one exists. Otherwise begins the play queue on the beginning of the show or season. | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/createplayqueueresponse.md b/docs/sdk/models/operations/createplayqueueresponse.md new file mode 100644 index 00000000..78a86509 --- /dev/null +++ b/docs/sdk/models/operations/createplayqueueresponse.md @@ -0,0 +1,29 @@ +# CreatePlayQueueResponse + +## Example Usage + +```typescript +import { CreatePlayQueueResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreatePlayQueueResponse = { + contentType: "", + statusCode: 529249, + headers: { + "key": [], + "key1": [ + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.CreatePlayQueueResponseBody](../../../sdk/models/operations/createplayqueueresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/createplayqueueresponsebody.md b/docs/sdk/models/operations/createplayqueueresponsebody.md new file mode 100644 index 00000000..83db487c --- /dev/null +++ b/docs/sdk/models/operations/createplayqueueresponsebody.md @@ -0,0 +1,17 @@ +# CreatePlayQueueResponseBody + +OK + +## Example Usage + +```typescript +import { CreatePlayQueueResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreatePlayQueueResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.CreatePlayQueueMediaContainer](../../../sdk/models/operations/createplayqueuemediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/createplayqueuetype.md b/docs/sdk/models/operations/createplayqueuetype.md new file mode 100644 index 00000000..34b6b666 --- /dev/null +++ b/docs/sdk/models/operations/createplayqueuetype.md @@ -0,0 +1,19 @@ +# CreatePlayQueueType + +The type of play queue to create + +## Example Usage + +```typescript +import { CreatePlayQueueType } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreatePlayQueueType = CreatePlayQueueType.Video; +``` + +## Values + +| Name | Value | +| ------- | ------- | +| `Audio` | audio | +| `Video` | video | +| `Photo` | photo | \ No newline at end of file diff --git a/docs/sdk/models/operations/createsubscriptionglobals.md b/docs/sdk/models/operations/createsubscriptionglobals.md new file mode 100644 index 00000000..f91db4c5 --- /dev/null +++ b/docs/sdk/models/operations/createsubscriptionglobals.md @@ -0,0 +1,35 @@ +# CreateSubscriptionGlobals + +## Example Usage + +```typescript +import { CreateSubscriptionGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateSubscriptionGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/createsubscriptionmediacontainer.md b/docs/sdk/models/operations/createsubscriptionmediacontainer.md new file mode 100644 index 00000000..39555e30 --- /dev/null +++ b/docs/sdk/models/operations/createsubscriptionmediacontainer.md @@ -0,0 +1,183 @@ +# CreateSubscriptionMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { CreateSubscriptionMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateSubscriptionMediaContainer = { + mediaSubscription: [ + { + mediaGrabOperation: [ + { + metadata: { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: + "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + }, + ], + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `mediaSubscription` | [shared.MediaSubscription](../../../sdk/models/shared/mediasubscription.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/createsubscriptionprefs.md b/docs/sdk/models/operations/createsubscriptionprefs.md new file mode 100644 index 00000000..35198cc5 --- /dev/null +++ b/docs/sdk/models/operations/createsubscriptionprefs.md @@ -0,0 +1,16 @@ +# CreateSubscriptionPrefs + +Subscription preferences. + +## Example Usage + +```typescript +import { CreateSubscriptionPrefs } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateSubscriptionPrefs = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdk/models/operations/createsubscriptionrequest.md b/docs/sdk/models/operations/createsubscriptionrequest.md new file mode 100644 index 00000000..a4baf9bd --- /dev/null +++ b/docs/sdk/models/operations/createsubscriptionrequest.md @@ -0,0 +1,37 @@ +# CreateSubscriptionRequest + +## Example Usage + +```typescript +import { CreateSubscriptionRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateSubscriptionRequest = { + targetLibrarySectionID: 1, + targetSectionLocationID: 3, + type: 2, + hints: {}, + prefs: {}, + params: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `targetLibrarySectionID` | *number* | :heavy_minus_sign: | The library section into which we'll grab the media. Not actually required when the subscription is to a playlist. | 1 | +| `targetSectionLocationID` | *number* | :heavy_minus_sign: | The section location into which to grab. | 3 | +| `type` | *number* | :heavy_minus_sign: | The type of the thing we're subscribing too (e.g. show, season). | 2 | +| `hints` | [operations.Hints](../../../sdk/models/operations/hints.md) | :heavy_minus_sign: | Hints describing what we're looking for. Note: The hint `ratingKey` is required for downloading from a PMS remote. | {
"title": "Family Guy"
} | +| `prefs` | [operations.CreateSubscriptionPrefs](../../../sdk/models/operations/createsubscriptionprefs.md) | :heavy_minus_sign: | Subscription preferences. | {
"minVideoQuality": 720
} | +| `params` | [operations.Params](../../../sdk/models/operations/params.md) | :heavy_minus_sign: | Subscription parameters.
- `mediaProviderID`: Required for downloads to indicate which MP the subscription will download into
- `source`: Required for downloads to indicate the source of the downloaded content.
| {
"mediaProviderID": 1
} | \ No newline at end of file diff --git a/docs/sdk/models/operations/createsubscriptionresponse.md b/docs/sdk/models/operations/createsubscriptionresponse.md new file mode 100644 index 00000000..6be2dfde --- /dev/null +++ b/docs/sdk/models/operations/createsubscriptionresponse.md @@ -0,0 +1,29 @@ +# CreateSubscriptionResponse + +## Example Usage + +```typescript +import { CreateSubscriptionResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateSubscriptionResponse = { + contentType: "", + statusCode: 405156, + headers: { + "key": [ + "", + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.CreateSubscriptionResponseBody](../../../sdk/models/operations/createsubscriptionresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/createsubscriptionresponsebody.md b/docs/sdk/models/operations/createsubscriptionresponsebody.md new file mode 100644 index 00000000..23335011 --- /dev/null +++ b/docs/sdk/models/operations/createsubscriptionresponsebody.md @@ -0,0 +1,178 @@ +# CreateSubscriptionResponseBody + +OK + +## Example Usage + +```typescript +import { CreateSubscriptionResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: CreateSubscriptionResponseBody = { + mediaContainer: { + mediaSubscription: [ + { + mediaGrabOperation: [ + { + metadata: { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: + "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + }, + ], + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.CreateSubscriptionMediaContainer](../../../sdk/models/operations/createsubscriptionmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/defaultdirection.md b/docs/sdk/models/operations/defaultdirection.md deleted file mode 100644 index 86bf42e1..00000000 --- a/docs/sdk/models/operations/defaultdirection.md +++ /dev/null @@ -1,19 +0,0 @@ -# DefaultDirection - -The direction of the sort. Can be either `asc` or `desc`. - - -## Example Usage - -```typescript -import { DefaultDirection } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: DefaultDirection = DefaultDirection.Ascending; -``` - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Ascending` | asc | -| `Descending` | desc | \ No newline at end of file diff --git a/docs/sdk/models/operations/defaultsubtitleaccessibility.md b/docs/sdk/models/operations/defaultsubtitleaccessibility.md deleted file mode 100644 index 21619100..00000000 --- a/docs/sdk/models/operations/defaultsubtitleaccessibility.md +++ /dev/null @@ -1,18 +0,0 @@ -# DefaultSubtitleAccessibility - -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 show non-SDH subtitles) - -## Example Usage - -```typescript -import { DefaultSubtitleAccessibility } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: DefaultSubtitleAccessibility = DefaultSubtitleAccessibility.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/defaultsubtitleforced.md b/docs/sdk/models/operations/defaultsubtitleforced.md deleted file mode 100644 index 96c21b15..00000000 --- a/docs/sdk/models/operations/defaultsubtitleforced.md +++ /dev/null @@ -1,18 +0,0 @@ -# DefaultSubtitleForced - -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) - -## Example Usage - -```typescript -import { DefaultSubtitleForced } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: DefaultSubtitleForced = DefaultSubtitleForced.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletecachesresponse.md b/docs/sdk/models/operations/deletecachesresponse.md new file mode 100644 index 00000000..8ad0fc57 --- /dev/null +++ b/docs/sdk/models/operations/deletecachesresponse.md @@ -0,0 +1,20 @@ +# DeleteCachesResponse + +## Example Usage + +```typescript +import { DeleteCachesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteCachesResponse = { + contentType: "", + statusCode: 401826, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletecollectionglobals.md b/docs/sdk/models/operations/deletecollectionglobals.md new file mode 100644 index 00000000..90b79d7b --- /dev/null +++ b/docs/sdk/models/operations/deletecollectionglobals.md @@ -0,0 +1,35 @@ +# DeleteCollectionGlobals + +## Example Usage + +```typescript +import { DeleteCollectionGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteCollectionGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletecollectionitemglobals.md b/docs/sdk/models/operations/deletecollectionitemglobals.md new file mode 100644 index 00000000..affb5c8e --- /dev/null +++ b/docs/sdk/models/operations/deletecollectionitemglobals.md @@ -0,0 +1,35 @@ +# DeleteCollectionItemGlobals + +## Example Usage + +```typescript +import { DeleteCollectionItemGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteCollectionItemGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletecollectionitemrequest.md b/docs/sdk/models/operations/deletecollectionitemrequest.md new file mode 100644 index 00000000..4fe0f9ca --- /dev/null +++ b/docs/sdk/models/operations/deletecollectionitemrequest.md @@ -0,0 +1,29 @@ +# DeleteCollectionItemRequest + +## Example Usage + +```typescript +import { DeleteCollectionItemRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteCollectionItemRequest = { + collectionId: 866683, + itemId: 775441, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `collectionId` | *number* | :heavy_check_mark: | The collection id | | +| `itemId` | *number* | :heavy_check_mark: | The item to delete | | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletecollectionitemresponse.md b/docs/sdk/models/operations/deletecollectionitemresponse.md new file mode 100644 index 00000000..0cad74c8 --- /dev/null +++ b/docs/sdk/models/operations/deletecollectionitemresponse.md @@ -0,0 +1,21 @@ +# DeleteCollectionItemResponse + +## Example Usage + +```typescript +import { DeleteCollectionItemResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteCollectionItemResponse = { + contentType: "", + statusCode: 150424, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletecollectionrequest.md b/docs/sdk/models/operations/deletecollectionrequest.md new file mode 100644 index 00000000..f3554a52 --- /dev/null +++ b/docs/sdk/models/operations/deletecollectionrequest.md @@ -0,0 +1,29 @@ +# DeleteCollectionRequest + +## Example Usage + +```typescript +import { DeleteCollectionRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteCollectionRequest = { + sectionId: 515599, + collectionId: 118588, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | +| `collectionId` | *number* | :heavy_check_mark: | Collection Id | | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletecollectionresponse.md b/docs/sdk/models/operations/deletecollectionresponse.md new file mode 100644 index 00000000..8577bd05 --- /dev/null +++ b/docs/sdk/models/operations/deletecollectionresponse.md @@ -0,0 +1,20 @@ +# DeleteCollectionResponse + +## Example Usage + +```typescript +import { DeleteCollectionResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteCollectionResponse = { + contentType: "", + statusCode: 868299, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletecustomhubglobals.md b/docs/sdk/models/operations/deletecustomhubglobals.md new file mode 100644 index 00000000..ff397a94 --- /dev/null +++ b/docs/sdk/models/operations/deletecustomhubglobals.md @@ -0,0 +1,35 @@ +# DeleteCustomHubGlobals + +## Example Usage + +```typescript +import { DeleteCustomHubGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteCustomHubGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletecustomhubrequest.md b/docs/sdk/models/operations/deletecustomhubrequest.md new file mode 100644 index 00000000..f84a5ac9 --- /dev/null +++ b/docs/sdk/models/operations/deletecustomhubrequest.md @@ -0,0 +1,29 @@ +# DeleteCustomHubRequest + +## Example Usage + +```typescript +import { DeleteCustomHubRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteCustomHubRequest = { + sectionId: 809430, + identifier: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | The section ID for the hubs to change | | +| `identifier` | *string* | :heavy_check_mark: | The identifier of the hub to change | | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletecustomhubresponse.md b/docs/sdk/models/operations/deletecustomhubresponse.md new file mode 100644 index 00000000..baaa8017 --- /dev/null +++ b/docs/sdk/models/operations/deletecustomhubresponse.md @@ -0,0 +1,20 @@ +# DeleteCustomHubResponse + +## Example Usage + +```typescript +import { DeleteCustomHubResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteCustomHubResponse = { + contentType: "", + statusCode: 979565, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletedvrglobals.md b/docs/sdk/models/operations/deletedvrglobals.md new file mode 100644 index 00000000..1c6d1b48 --- /dev/null +++ b/docs/sdk/models/operations/deletedvrglobals.md @@ -0,0 +1,35 @@ +# DeleteDVRGlobals + +## Example Usage + +```typescript +import { DeleteDVRGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteDVRGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletedvrrequest.md b/docs/sdk/models/operations/deletedvrrequest.md new file mode 100644 index 00000000..779196e8 --- /dev/null +++ b/docs/sdk/models/operations/deletedvrrequest.md @@ -0,0 +1,27 @@ +# DeleteDVRRequest + +## Example Usage + +```typescript +import { DeleteDVRRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteDVRRequest = { + dvrId: 625328, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `dvrId` | *number* | :heavy_check_mark: | The ID of the DVR. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletedvrresponse.md b/docs/sdk/models/operations/deletedvrresponse.md new file mode 100644 index 00000000..da7f3bdb --- /dev/null +++ b/docs/sdk/models/operations/deletedvrresponse.md @@ -0,0 +1,20 @@ +# DeleteDVRResponse + +## Example Usage + +```typescript +import { DeleteDVRResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteDVRResponse = { + contentType: "", + statusCode: 277820, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletehistoryglobals.md b/docs/sdk/models/operations/deletehistoryglobals.md new file mode 100644 index 00000000..80a589da --- /dev/null +++ b/docs/sdk/models/operations/deletehistoryglobals.md @@ -0,0 +1,35 @@ +# DeleteHistoryGlobals + +## Example Usage + +```typescript +import { DeleteHistoryGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteHistoryGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletehistoryrequest.md b/docs/sdk/models/operations/deletehistoryrequest.md new file mode 100644 index 00000000..10010fda --- /dev/null +++ b/docs/sdk/models/operations/deletehistoryrequest.md @@ -0,0 +1,27 @@ +# DeleteHistoryRequest + +## Example Usage + +```typescript +import { DeleteHistoryRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteHistoryRequest = { + historyId: 313730, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `historyId` | *number* | :heavy_check_mark: | The id of the history item (the `historyKey` from above) | | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletehistoryresponse.md b/docs/sdk/models/operations/deletehistoryresponse.md new file mode 100644 index 00000000..ef48ac0c --- /dev/null +++ b/docs/sdk/models/operations/deletehistoryresponse.md @@ -0,0 +1,28 @@ +# DeleteHistoryResponse + +## Example Usage + +```typescript +import { DeleteHistoryResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteHistoryResponse = { + contentType: "", + statusCode: 103554, + headers: { + "key": [ + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | +| `mediaContainer` | [shared.MediaContainer](../../../sdk/models/shared/mediacontainer.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/deleteindexesglobals.md b/docs/sdk/models/operations/deleteindexesglobals.md new file mode 100644 index 00000000..0a3c62bb --- /dev/null +++ b/docs/sdk/models/operations/deleteindexesglobals.md @@ -0,0 +1,35 @@ +# DeleteIndexesGlobals + +## Example Usage + +```typescript +import { DeleteIndexesGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteIndexesGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/deleteindexesrequest.md b/docs/sdk/models/operations/deleteindexesrequest.md new file mode 100644 index 00000000..85c7a286 --- /dev/null +++ b/docs/sdk/models/operations/deleteindexesrequest.md @@ -0,0 +1,27 @@ +# DeleteIndexesRequest + +## Example Usage + +```typescript +import { DeleteIndexesRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteIndexesRequest = { + sectionId: 895219, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/sdk/models/operations/deleteindexesresponse.md b/docs/sdk/models/operations/deleteindexesresponse.md new file mode 100644 index 00000000..5c2eb73a --- /dev/null +++ b/docs/sdk/models/operations/deleteindexesresponse.md @@ -0,0 +1,20 @@ +# DeleteIndexesResponse + +## Example Usage + +```typescript +import { DeleteIndexesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteIndexesResponse = { + contentType: "", + statusCode: 459040, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/deleteintrosglobals.md b/docs/sdk/models/operations/deleteintrosglobals.md new file mode 100644 index 00000000..c1ac38d2 --- /dev/null +++ b/docs/sdk/models/operations/deleteintrosglobals.md @@ -0,0 +1,35 @@ +# DeleteIntrosGlobals + +## Example Usage + +```typescript +import { DeleteIntrosGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteIntrosGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/deleteintrosrequest.md b/docs/sdk/models/operations/deleteintrosrequest.md new file mode 100644 index 00000000..f5a4ab03 --- /dev/null +++ b/docs/sdk/models/operations/deleteintrosrequest.md @@ -0,0 +1,27 @@ +# DeleteIntrosRequest + +## Example Usage + +```typescript +import { DeleteIntrosRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteIntrosRequest = { + sectionId: 509478, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/sdk/models/operations/deleteintrosresponse.md b/docs/sdk/models/operations/deleteintrosresponse.md new file mode 100644 index 00000000..1d61b55d --- /dev/null +++ b/docs/sdk/models/operations/deleteintrosresponse.md @@ -0,0 +1,20 @@ +# DeleteIntrosResponse + +## Example Usage + +```typescript +import { DeleteIntrosResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteIntrosResponse = { + contentType: "", + statusCode: 957697, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletelibraryrequest.md b/docs/sdk/models/operations/deletelibraryrequest.md deleted file mode 100644 index 7ffd2c25..00000000 --- a/docs/sdk/models/operations/deletelibraryrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# DeleteLibraryRequest - -## Example Usage - -```typescript -import { DeleteLibraryRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: DeleteLibraryRequest = { - sectionKey: 9518, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletelibraryresponse.md b/docs/sdk/models/operations/deletelibraryresponse.md deleted file mode 100644 index 43f5abe5..00000000 --- a/docs/sdk/models/operations/deletelibraryresponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# DeleteLibraryResponse - -## Example Usage - -```typescript -import { DeleteLibraryResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: DeleteLibraryResponse = { - contentType: "", - statusCode: 536997, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletelibrarysectionglobals.md b/docs/sdk/models/operations/deletelibrarysectionglobals.md new file mode 100644 index 00000000..8af6ad48 --- /dev/null +++ b/docs/sdk/models/operations/deletelibrarysectionglobals.md @@ -0,0 +1,35 @@ +# DeleteLibrarySectionGlobals + +## Example Usage + +```typescript +import { DeleteLibrarySectionGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteLibrarySectionGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletelibrarysectionrequest.md b/docs/sdk/models/operations/deletelibrarysectionrequest.md new file mode 100644 index 00000000..8b89eedd --- /dev/null +++ b/docs/sdk/models/operations/deletelibrarysectionrequest.md @@ -0,0 +1,30 @@ +# DeleteLibrarySectionRequest + +## Example Usage + +```typescript +import { DeleteLibrarySectionRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: DeleteLibrarySectionRequest = { + sectionId: "", + async: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *string* | :heavy_check_mark: | The section identifier | | +| `async` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | If set, response will return an activity with the actual deletion process. Otherwise request will return when deletion is complete | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletelibrarysectionresponse.md b/docs/sdk/models/operations/deletelibrarysectionresponse.md new file mode 100644 index 00000000..a3efbae5 --- /dev/null +++ b/docs/sdk/models/operations/deletelibrarysectionresponse.md @@ -0,0 +1,20 @@ +# DeleteLibrarySectionResponse + +## Example Usage + +```typescript +import { DeleteLibrarySectionResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteLibrarySectionResponse = { + contentType: "", + statusCode: 344645, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletelineupdvr.md b/docs/sdk/models/operations/deletelineupdvr.md new file mode 100644 index 00000000..e76b2c6d --- /dev/null +++ b/docs/sdk/models/operations/deletelineupdvr.md @@ -0,0 +1,19 @@ +# DeleteLineupDVR + +## Example Usage + +```typescript +import { DeleteLineupDVR } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteLineupDVR = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `device` | [shared.Device](../../../sdk/models/shared/device.md)[] | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `language` | *string* | :heavy_minus_sign: | N/A | +| `lineup` | *string* | :heavy_minus_sign: | N/A | +| `uuid` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletelineupglobals.md b/docs/sdk/models/operations/deletelineupglobals.md new file mode 100644 index 00000000..340f06a9 --- /dev/null +++ b/docs/sdk/models/operations/deletelineupglobals.md @@ -0,0 +1,35 @@ +# DeleteLineupGlobals + +## Example Usage + +```typescript +import { DeleteLineupGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteLineupGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletelineupmediacontainer.md b/docs/sdk/models/operations/deletelineupmediacontainer.md new file mode 100644 index 00000000..65d1556b --- /dev/null +++ b/docs/sdk/models/operations/deletelineupmediacontainer.md @@ -0,0 +1,16 @@ +# DeleteLineupMediaContainer + +## Example Usage + +```typescript +import { DeleteLineupMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteLineupMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.DeleteLineupMediaContainerMediaContainer](../../../sdk/models/operations/deletelineupmediacontainermediacontainer.md) | :heavy_minus_sign: | N/A | +| `dvr` | [operations.DeleteLineupDVR](../../../sdk/models/operations/deletelineupdvr.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletelineupmediacontainermediacontainer.md b/docs/sdk/models/operations/deletelineupmediacontainermediacontainer.md new file mode 100644 index 00000000..1ef8566e --- /dev/null +++ b/docs/sdk/models/operations/deletelineupmediacontainermediacontainer.md @@ -0,0 +1,24 @@ +# DeleteLineupMediaContainerMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { DeleteLineupMediaContainerMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteLineupMediaContainerMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `status` | *number* | :heavy_minus_sign: | A status indicator. If present and non-zero, indicates an error | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletelineuprequest.md b/docs/sdk/models/operations/deletelineuprequest.md new file mode 100644 index 00000000..0d95e2e8 --- /dev/null +++ b/docs/sdk/models/operations/deletelineuprequest.md @@ -0,0 +1,29 @@ +# DeleteLineupRequest + +## Example Usage + +```typescript +import { DeleteLineupRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteLineupRequest = { + dvrId: 45733, + lineup: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `dvrId` | *number* | :heavy_check_mark: | The ID of the DVR. | | +| `lineup` | *string* | :heavy_check_mark: | The lineup to delete | | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletelineupresponse.md b/docs/sdk/models/operations/deletelineupresponse.md new file mode 100644 index 00000000..00aa76d6 --- /dev/null +++ b/docs/sdk/models/operations/deletelineupresponse.md @@ -0,0 +1,30 @@ +# DeleteLineupResponse + +## Example Usage + +```typescript +import { DeleteLineupResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteLineupResponse = { + contentType: "", + statusCode: 20864, + headers: { + "key": [ + "", + "", + "", + ], + "key1": [], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.DeleteLineupResponseBody](../../../sdk/models/operations/deletelineupresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletelineupresponsebody.md b/docs/sdk/models/operations/deletelineupresponsebody.md new file mode 100644 index 00000000..da8812f5 --- /dev/null +++ b/docs/sdk/models/operations/deletelineupresponsebody.md @@ -0,0 +1,17 @@ +# DeleteLineupResponseBody + +OK + +## Example Usage + +```typescript +import { DeleteLineupResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteLineupResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.DeleteLineupMediaContainer](../../../sdk/models/operations/deletelineupmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletemarkerglobals.md b/docs/sdk/models/operations/deletemarkerglobals.md new file mode 100644 index 00000000..bdc9fed3 --- /dev/null +++ b/docs/sdk/models/operations/deletemarkerglobals.md @@ -0,0 +1,35 @@ +# DeleteMarkerGlobals + +## Example Usage + +```typescript +import { DeleteMarkerGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteMarkerGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletemarkerrequest.md b/docs/sdk/models/operations/deletemarkerrequest.md new file mode 100644 index 00000000..c4b6ae7a --- /dev/null +++ b/docs/sdk/models/operations/deletemarkerrequest.md @@ -0,0 +1,29 @@ +# DeleteMarkerRequest + +## Example Usage + +```typescript +import { DeleteMarkerRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteMarkerRequest = { + ids: "", + marker: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `marker` | *string* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletemarkerresponse.md b/docs/sdk/models/operations/deletemarkerresponse.md new file mode 100644 index 00000000..64f00430 --- /dev/null +++ b/docs/sdk/models/operations/deletemarkerresponse.md @@ -0,0 +1,20 @@ +# DeleteMarkerResponse + +## Example Usage + +```typescript +import { DeleteMarkerResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteMarkerResponse = { + contentType: "", + statusCode: 465457, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletemediaitemglobals.md b/docs/sdk/models/operations/deletemediaitemglobals.md new file mode 100644 index 00000000..ae22957a --- /dev/null +++ b/docs/sdk/models/operations/deletemediaitemglobals.md @@ -0,0 +1,35 @@ +# DeleteMediaItemGlobals + +## Example Usage + +```typescript +import { DeleteMediaItemGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteMediaItemGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletemediaitemrequest.md b/docs/sdk/models/operations/deletemediaitemrequest.md new file mode 100644 index 00000000..47313742 --- /dev/null +++ b/docs/sdk/models/operations/deletemediaitemrequest.md @@ -0,0 +1,32 @@ +# DeleteMediaItemRequest + +## Example Usage + +```typescript +import { DeleteMediaItemRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: DeleteMediaItemRequest = { + ids: "", + mediaItem: "", + proxy: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `mediaItem` | *string* | :heavy_check_mark: | N/A | | +| `proxy` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false. | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletemediaitemresponse.md b/docs/sdk/models/operations/deletemediaitemresponse.md new file mode 100644 index 00000000..aa865d26 --- /dev/null +++ b/docs/sdk/models/operations/deletemediaitemresponse.md @@ -0,0 +1,20 @@ +# DeleteMediaItemResponse + +## Example Usage + +```typescript +import { DeleteMediaItemResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteMediaItemResponse = { + contentType: "", + statusCode: 956344, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletemediaproviderglobals.md b/docs/sdk/models/operations/deletemediaproviderglobals.md new file mode 100644 index 00000000..c1f135c3 --- /dev/null +++ b/docs/sdk/models/operations/deletemediaproviderglobals.md @@ -0,0 +1,35 @@ +# DeleteMediaProviderGlobals + +## Example Usage + +```typescript +import { DeleteMediaProviderGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteMediaProviderGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletemediaproviderrequest.md b/docs/sdk/models/operations/deletemediaproviderrequest.md new file mode 100644 index 00000000..5689a6f9 --- /dev/null +++ b/docs/sdk/models/operations/deletemediaproviderrequest.md @@ -0,0 +1,27 @@ +# DeleteMediaProviderRequest + +## Example Usage + +```typescript +import { DeleteMediaProviderRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteMediaProviderRequest = { + provider: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `provider` | *string* | :heavy_check_mark: | The ID of the media provider to delete | | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletemediaproviderresponse.md b/docs/sdk/models/operations/deletemediaproviderresponse.md new file mode 100644 index 00000000..e6ba81da --- /dev/null +++ b/docs/sdk/models/operations/deletemediaproviderresponse.md @@ -0,0 +1,20 @@ +# DeleteMediaProviderResponse + +## Example Usage + +```typescript +import { DeleteMediaProviderResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteMediaProviderResponse = { + contentType: "", + statusCode: 796329, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletemetadataitemglobals.md b/docs/sdk/models/operations/deletemetadataitemglobals.md new file mode 100644 index 00000000..18bf57b8 --- /dev/null +++ b/docs/sdk/models/operations/deletemetadataitemglobals.md @@ -0,0 +1,35 @@ +# DeleteMetadataItemGlobals + +## Example Usage + +```typescript +import { DeleteMetadataItemGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteMetadataItemGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletemetadataitemrequest.md b/docs/sdk/models/operations/deletemetadataitemrequest.md new file mode 100644 index 00000000..e0084d76 --- /dev/null +++ b/docs/sdk/models/operations/deletemetadataitemrequest.md @@ -0,0 +1,30 @@ +# DeleteMetadataItemRequest + +## Example Usage + +```typescript +import { DeleteMetadataItemRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: DeleteMetadataItemRequest = { + ids: "", + proxy: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `proxy` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false. | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletemetadataitemresponse.md b/docs/sdk/models/operations/deletemetadataitemresponse.md new file mode 100644 index 00000000..b160c71b --- /dev/null +++ b/docs/sdk/models/operations/deletemetadataitemresponse.md @@ -0,0 +1,20 @@ +# DeleteMetadataItemResponse + +## Example Usage + +```typescript +import { DeleteMetadataItemResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteMetadataItemResponse = { + contentType: "", + statusCode: 845904, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/deleteplaylistglobals.md b/docs/sdk/models/operations/deleteplaylistglobals.md new file mode 100644 index 00000000..a69afaf3 --- /dev/null +++ b/docs/sdk/models/operations/deleteplaylistglobals.md @@ -0,0 +1,35 @@ +# DeletePlaylistGlobals + +## Example Usage + +```typescript +import { DeletePlaylistGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeletePlaylistGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/deleteplaylistitemglobals.md b/docs/sdk/models/operations/deleteplaylistitemglobals.md new file mode 100644 index 00000000..ba6e6bc3 --- /dev/null +++ b/docs/sdk/models/operations/deleteplaylistitemglobals.md @@ -0,0 +1,35 @@ +# DeletePlaylistItemGlobals + +## Example Usage + +```typescript +import { DeletePlaylistItemGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeletePlaylistItemGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/deleteplaylistitemrequest.md b/docs/sdk/models/operations/deleteplaylistitemrequest.md new file mode 100644 index 00000000..4c58437e --- /dev/null +++ b/docs/sdk/models/operations/deleteplaylistitemrequest.md @@ -0,0 +1,29 @@ +# DeletePlaylistItemRequest + +## Example Usage + +```typescript +import { DeletePlaylistItemRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeletePlaylistItemRequest = { + playlistId: 694915, + generatorId: 542928, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *number* | :heavy_check_mark: | The ID of the playlist | | +| `generatorId` | *number* | :heavy_check_mark: | The generator item ID to delete. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/deleteplaylistitemresponse.md b/docs/sdk/models/operations/deleteplaylistitemresponse.md new file mode 100644 index 00000000..18cfbd04 --- /dev/null +++ b/docs/sdk/models/operations/deleteplaylistitemresponse.md @@ -0,0 +1,21 @@ +# DeletePlaylistItemResponse + +## Example Usage + +```typescript +import { DeletePlaylistItemResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeletePlaylistItemResponse = { + contentType: "", + statusCode: 744454, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithPlaylistMetadata` | [shared.MediaContainerWithPlaylistMetadata](../../../sdk/models/shared/mediacontainerwithplaylistmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/deleteplaylistrequest.md b/docs/sdk/models/operations/deleteplaylistrequest.md index a653865c..e8e8faaa 100644 --- a/docs/sdk/models/operations/deleteplaylistrequest.md +++ b/docs/sdk/models/operations/deleteplaylistrequest.md @@ -6,12 +6,22 @@ import { DeletePlaylistRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: DeletePlaylistRequest = { - playlistID: 5840.32, + playlistId: 584032, }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *number* | :heavy_check_mark: | The ID of the playlist | | \ No newline at end of file diff --git a/docs/sdk/models/operations/deleteplayqueueitemglobals.md b/docs/sdk/models/operations/deleteplayqueueitemglobals.md new file mode 100644 index 00000000..1605899f --- /dev/null +++ b/docs/sdk/models/operations/deleteplayqueueitemglobals.md @@ -0,0 +1,35 @@ +# DeletePlayQueueItemGlobals + +## Example Usage + +```typescript +import { DeletePlayQueueItemGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeletePlayQueueItemGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/deleteplayqueueitemrequest.md b/docs/sdk/models/operations/deleteplayqueueitemrequest.md new file mode 100644 index 00000000..42192bab --- /dev/null +++ b/docs/sdk/models/operations/deleteplayqueueitemrequest.md @@ -0,0 +1,29 @@ +# DeletePlayQueueItemRequest + +## Example Usage + +```typescript +import { DeletePlayQueueItemRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeletePlayQueueItemRequest = { + playQueueId: 77655, + playQueueItemId: 210441, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playQueueId` | *number* | :heavy_check_mark: | The ID of the play queue. | | +| `playQueueItemId` | *number* | :heavy_check_mark: | The play queue item ID to delete. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/deleteplayqueueitemresponse.md b/docs/sdk/models/operations/deleteplayqueueitemresponse.md new file mode 100644 index 00000000..5ac52c19 --- /dev/null +++ b/docs/sdk/models/operations/deleteplayqueueitemresponse.md @@ -0,0 +1,21 @@ +# DeletePlayQueueItemResponse + +## Example Usage + +```typescript +import { DeletePlayQueueItemResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeletePlayQueueItemResponse = { + contentType: "", + statusCode: 71351, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithPlaylistMetadata` | [shared.MediaContainerWithPlaylistMetadata](../../../sdk/models/shared/mediacontainerwithplaylistmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletestreamglobals.md b/docs/sdk/models/operations/deletestreamglobals.md new file mode 100644 index 00000000..50665fe2 --- /dev/null +++ b/docs/sdk/models/operations/deletestreamglobals.md @@ -0,0 +1,35 @@ +# DeleteStreamGlobals + +## Example Usage + +```typescript +import { DeleteStreamGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteStreamGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletestreamrequest.md b/docs/sdk/models/operations/deletestreamrequest.md new file mode 100644 index 00000000..f4d437eb --- /dev/null +++ b/docs/sdk/models/operations/deletestreamrequest.md @@ -0,0 +1,29 @@ +# DeleteStreamRequest + +## Example Usage + +```typescript +import { DeleteStreamRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteStreamRequest = { + streamId: 323764, + ext: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `streamId` | *number* | :heavy_check_mark: | The id of the stream | | +| `ext` | *string* | :heavy_check_mark: | This is not a part of this endpoint but documented here to satisfy OpenAPI | | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletestreamresponse.md b/docs/sdk/models/operations/deletestreamresponse.md new file mode 100644 index 00000000..4e7d9d69 --- /dev/null +++ b/docs/sdk/models/operations/deletestreamresponse.md @@ -0,0 +1,20 @@ +# DeleteStreamResponse + +## Example Usage + +```typescript +import { DeleteStreamResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteStreamResponse = { + contentType: "", + statusCode: 541286, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletesubscriptionglobals.md b/docs/sdk/models/operations/deletesubscriptionglobals.md new file mode 100644 index 00000000..ef3ee40a --- /dev/null +++ b/docs/sdk/models/operations/deletesubscriptionglobals.md @@ -0,0 +1,35 @@ +# DeleteSubscriptionGlobals + +## Example Usage + +```typescript +import { DeleteSubscriptionGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteSubscriptionGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletesubscriptionrequest.md b/docs/sdk/models/operations/deletesubscriptionrequest.md new file mode 100644 index 00000000..1bd19912 --- /dev/null +++ b/docs/sdk/models/operations/deletesubscriptionrequest.md @@ -0,0 +1,27 @@ +# DeleteSubscriptionRequest + +## Example Usage + +```typescript +import { DeleteSubscriptionRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteSubscriptionRequest = { + subscriptionId: 164333, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `subscriptionId` | *number* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/deletesubscriptionresponse.md b/docs/sdk/models/operations/deletesubscriptionresponse.md new file mode 100644 index 00000000..6d0b6aad --- /dev/null +++ b/docs/sdk/models/operations/deletesubscriptionresponse.md @@ -0,0 +1,20 @@ +# DeleteSubscriptionResponse + +## Example Usage + +```typescript +import { DeleteSubscriptionResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeleteSubscriptionResponse = { + contentType: "", + statusCode: 189513, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/detectadsglobals.md b/docs/sdk/models/operations/detectadsglobals.md new file mode 100644 index 00000000..3213eb3b --- /dev/null +++ b/docs/sdk/models/operations/detectadsglobals.md @@ -0,0 +1,35 @@ +# DetectAdsGlobals + +## Example Usage + +```typescript +import { DetectAdsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DetectAdsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/detectadsrequest.md b/docs/sdk/models/operations/detectadsrequest.md new file mode 100644 index 00000000..d79711b3 --- /dev/null +++ b/docs/sdk/models/operations/detectadsrequest.md @@ -0,0 +1,27 @@ +# DetectAdsRequest + +## Example Usage + +```typescript +import { DetectAdsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DetectAdsRequest = { + ids: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/detectadsresponse.md b/docs/sdk/models/operations/detectadsresponse.md new file mode 100644 index 00000000..cc39affe --- /dev/null +++ b/docs/sdk/models/operations/detectadsresponse.md @@ -0,0 +1,20 @@ +# DetectAdsResponse + +## Example Usage + +```typescript +import { DetectAdsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DetectAdsResponse = { + contentType: "", + statusCode: 804378, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/detectcreditsglobals.md b/docs/sdk/models/operations/detectcreditsglobals.md new file mode 100644 index 00000000..a522d625 --- /dev/null +++ b/docs/sdk/models/operations/detectcreditsglobals.md @@ -0,0 +1,35 @@ +# DetectCreditsGlobals + +## Example Usage + +```typescript +import { DetectCreditsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DetectCreditsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/detectcreditsrequest.md b/docs/sdk/models/operations/detectcreditsrequest.md new file mode 100644 index 00000000..c7b78240 --- /dev/null +++ b/docs/sdk/models/operations/detectcreditsrequest.md @@ -0,0 +1,32 @@ +# DetectCreditsRequest + +## Example Usage + +```typescript +import { DetectCreditsRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: DetectCreditsRequest = { + ids: "", + force: BoolInt.One, + manual: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `force` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | N/A | 1 | +| `manual` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/detectcreditsresponse.md b/docs/sdk/models/operations/detectcreditsresponse.md new file mode 100644 index 00000000..c2537aa7 --- /dev/null +++ b/docs/sdk/models/operations/detectcreditsresponse.md @@ -0,0 +1,20 @@ +# DetectCreditsResponse + +## Example Usage + +```typescript +import { DetectCreditsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DetectCreditsResponse = { + contentType: "", + statusCode: 214789, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/detectintrosglobals.md b/docs/sdk/models/operations/detectintrosglobals.md new file mode 100644 index 00000000..c4289cd4 --- /dev/null +++ b/docs/sdk/models/operations/detectintrosglobals.md @@ -0,0 +1,35 @@ +# DetectIntrosGlobals + +## Example Usage + +```typescript +import { DetectIntrosGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DetectIntrosGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/detectintrosrequest.md b/docs/sdk/models/operations/detectintrosrequest.md new file mode 100644 index 00000000..521c8879 --- /dev/null +++ b/docs/sdk/models/operations/detectintrosrequest.md @@ -0,0 +1,31 @@ +# DetectIntrosRequest + +## Example Usage + +```typescript +import { DetectIntrosRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: DetectIntrosRequest = { + ids: "", + force: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `force` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicate whether detection should be re-run | 1 | +| `threshold` | *number* | :heavy_minus_sign: | The threshold for determining if content is an intro or not | | \ No newline at end of file diff --git a/docs/sdk/models/operations/detectintrosresponse.md b/docs/sdk/models/operations/detectintrosresponse.md new file mode 100644 index 00000000..05730e68 --- /dev/null +++ b/docs/sdk/models/operations/detectintrosresponse.md @@ -0,0 +1,20 @@ +# DetectIntrosResponse + +## Example Usage + +```typescript +import { DetectIntrosResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DetectIntrosResponse = { + contentType: "", + statusCode: 511745, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/detectvoiceactivityglobals.md b/docs/sdk/models/operations/detectvoiceactivityglobals.md new file mode 100644 index 00000000..6ca43e1e --- /dev/null +++ b/docs/sdk/models/operations/detectvoiceactivityglobals.md @@ -0,0 +1,35 @@ +# DetectVoiceActivityGlobals + +## Example Usage + +```typescript +import { DetectVoiceActivityGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DetectVoiceActivityGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/detectvoiceactivityrequest.md b/docs/sdk/models/operations/detectvoiceactivityrequest.md new file mode 100644 index 00000000..cc77ad60 --- /dev/null +++ b/docs/sdk/models/operations/detectvoiceactivityrequest.md @@ -0,0 +1,32 @@ +# DetectVoiceActivityRequest + +## Example Usage + +```typescript +import { DetectVoiceActivityRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: DetectVoiceActivityRequest = { + ids: "", + force: BoolInt.One, + manual: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `force` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicate whether detection should be re-run | 1 | +| `manual` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicate whether detection is manually run | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/detectvoiceactivityresponse.md b/docs/sdk/models/operations/detectvoiceactivityresponse.md new file mode 100644 index 00000000..6ffb8729 --- /dev/null +++ b/docs/sdk/models/operations/detectvoiceactivityresponse.md @@ -0,0 +1,20 @@ +# DetectVoiceActivityResponse + +## Example Usage + +```typescript +import { DetectVoiceActivityResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DetectVoiceActivityResponse = { + contentType: "", + statusCode: 825759, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/device.md b/docs/sdk/models/operations/device.md deleted file mode 100644 index bfaaa241..00000000 --- a/docs/sdk/models/operations/device.md +++ /dev/null @@ -1,24 +0,0 @@ -# Device - -## Example Usage - -```typescript -import { Device } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Device = { - id: 1, - name: "iPhone", - platform: "iOS", - createdAt: 1654131230, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *number* | :heavy_minus_sign: | N/A | 1 | -| `name` | *string* | :heavy_minus_sign: | N/A | iPhone | -| `platform` | *string* | :heavy_minus_sign: | N/A | iOS | -| `clientIdentifier` | *string* | :heavy_minus_sign: | N/A | | -| `createdAt` | *number* | :heavy_minus_sign: | N/A | 1654131230 | \ No newline at end of file diff --git a/docs/sdk/models/operations/devicechannel.md b/docs/sdk/models/operations/devicechannel.md new file mode 100644 index 00000000..58750fcc --- /dev/null +++ b/docs/sdk/models/operations/devicechannel.md @@ -0,0 +1,22 @@ +# DeviceChannel + +## Example Usage + +```typescript +import { DeviceChannel } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DeviceChannel = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `drm` | *boolean* | :heavy_minus_sign: | Indicates the channel is DRMed and thus may not be playable | +| `favorite` | *boolean* | :heavy_minus_sign: | N/A | +| `hd` | *boolean* | :heavy_minus_sign: | N/A | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `signalQuality` | *number* | :heavy_minus_sign: | N/A | +| `signalStrength` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/director.md b/docs/sdk/models/operations/director.md deleted file mode 100644 index a76521f5..00000000 --- a/docs/sdk/models/operations/director.md +++ /dev/null @@ -1,26 +0,0 @@ -# Director - -## Example Usage - -```typescript -import { Director } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Director = { - id: 126522, - filter: "director=235876", - tag: "Danny Boyle", - tagKey: "5d776831151a60001f24d031", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | Unique identifier for the director. | 126522 | -| `filter` | *string* | :heavy_check_mark: | The filter string used to query this director. | director=235876 | -| `tag` | *string* | :heavy_check_mark: | The role of Director | Danny Boyle | -| `tagKey` | *string* | :heavy_check_mark: | A unique 24-character hexadecimal key associated with the director's tag, used for internal identification. | 5d776831151a60001f24d031 | -| `thumb` | *string* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the director. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | \ No newline at end of file diff --git a/docs/sdk/models/operations/directory.md b/docs/sdk/models/operations/directory.md deleted file mode 100644 index 97d26e28..00000000 --- a/docs/sdk/models/operations/directory.md +++ /dev/null @@ -1,17 +0,0 @@ -# Directory - -## Example Usage - -```typescript -import { Directory } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Directory = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `count` | *number* | :heavy_minus_sign: | N/A | -| `key` | *string* | :heavy_minus_sign: | N/A | -| `title` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/discoverdevicesresponse.md b/docs/sdk/models/operations/discoverdevicesresponse.md new file mode 100644 index 00000000..4c6678c7 --- /dev/null +++ b/docs/sdk/models/operations/discoverdevicesresponse.md @@ -0,0 +1,21 @@ +# DiscoverDevicesResponse + +## Example Usage + +```typescript +import { DiscoverDevicesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: DiscoverDevicesResponse = { + contentType: "", + statusCode: 232423, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithDevice` | [shared.MediaContainerWithDevice](../../../sdk/models/shared/mediacontainerwithdevice.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/download.md b/docs/sdk/models/operations/download.md deleted file mode 100644 index b080304a..00000000 --- a/docs/sdk/models/operations/download.md +++ /dev/null @@ -1,18 +0,0 @@ -# Download - -Indicate that you want to start download any updates found. - -## Example Usage - -```typescript -import { Download } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Download = Download.One; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/editmarkerattributes.md b/docs/sdk/models/operations/editmarkerattributes.md new file mode 100644 index 00000000..a697f953 --- /dev/null +++ b/docs/sdk/models/operations/editmarkerattributes.md @@ -0,0 +1,16 @@ +# EditMarkerAttributes + +The attributes to assign to this marker + +## Example Usage + +```typescript +import { EditMarkerAttributes } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: EditMarkerAttributes = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdk/models/operations/editmarkerglobals.md b/docs/sdk/models/operations/editmarkerglobals.md new file mode 100644 index 00000000..412341d1 --- /dev/null +++ b/docs/sdk/models/operations/editmarkerglobals.md @@ -0,0 +1,35 @@ +# EditMarkerGlobals + +## Example Usage + +```typescript +import { EditMarkerGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: EditMarkerGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/editmarkerrequest.md b/docs/sdk/models/operations/editmarkerrequest.md new file mode 100644 index 00000000..0994a322 --- /dev/null +++ b/docs/sdk/models/operations/editmarkerrequest.md @@ -0,0 +1,36 @@ +# EditMarkerRequest + +## Example Usage + +```typescript +import { EditMarkerRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: EditMarkerRequest = { + ids: "", + marker: "", + type: 59357, + startTimeOffset: 421778, + attributes: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `marker` | *string* | :heavy_check_mark: | The id of the marker to edit | | +| `type` | *number* | :heavy_check_mark: | The type of marker to edit/create | | +| `startTimeOffset` | *number* | :heavy_check_mark: | The start time of the marker | | +| `endTimeOffset` | *number* | :heavy_minus_sign: | The end time of the marker | | +| `attributes` | [operations.EditMarkerAttributes](../../../sdk/models/operations/editmarkerattributes.md) | :heavy_minus_sign: | The attributes to assign to this marker | {
"title": "My favorite spot"
} | \ No newline at end of file diff --git a/docs/sdk/models/operations/editmarkerresponse.md b/docs/sdk/models/operations/editmarkerresponse.md new file mode 100644 index 00000000..317dd052 --- /dev/null +++ b/docs/sdk/models/operations/editmarkerresponse.md @@ -0,0 +1,21 @@ +# EditMarkerResponse + +## Example Usage + +```typescript +import { EditMarkerResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: EditMarkerResponse = { + contentType: "", + statusCode: 820143, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `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 | +| `postResponses200` | [shared.PostResponses200](../../../sdk/models/shared/postresponses200.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/editmetadataitemargs.md b/docs/sdk/models/operations/editmetadataitemargs.md new file mode 100644 index 00000000..38a960f7 --- /dev/null +++ b/docs/sdk/models/operations/editmetadataitemargs.md @@ -0,0 +1,16 @@ +# EditMetadataItemArgs + +The new values for the metadata item + +## Example Usage + +```typescript +import { EditMetadataItemArgs } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: EditMetadataItemArgs = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdk/models/operations/editmetadataitemglobals.md b/docs/sdk/models/operations/editmetadataitemglobals.md new file mode 100644 index 00000000..9757e679 --- /dev/null +++ b/docs/sdk/models/operations/editmetadataitemglobals.md @@ -0,0 +1,35 @@ +# EditMetadataItemGlobals + +## Example Usage + +```typescript +import { EditMetadataItemGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: EditMetadataItemGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/editmetadataitemrequest.md b/docs/sdk/models/operations/editmetadataitemrequest.md new file mode 100644 index 00000000..a3168e1e --- /dev/null +++ b/docs/sdk/models/operations/editmetadataitemrequest.md @@ -0,0 +1,31 @@ +# EditMetadataItemRequest + +## Example Usage + +```typescript +import { EditMetadataItemRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: EditMetadataItemRequest = { + ids: [ + "", + "", + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string*[] | :heavy_check_mark: | N/A | | +| `args` | [operations.EditMetadataItemArgs](../../../sdk/models/operations/editmetadataitemargs.md) | :heavy_minus_sign: | The new values for the metadata item | | \ No newline at end of file diff --git a/docs/sdk/models/operations/editmetadataitemresponse.md b/docs/sdk/models/operations/editmetadataitemresponse.md new file mode 100644 index 00000000..3d32a0ab --- /dev/null +++ b/docs/sdk/models/operations/editmetadataitemresponse.md @@ -0,0 +1,20 @@ +# EditMetadataItemResponse + +## Example Usage + +```typescript +import { EditMetadataItemResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: EditMetadataItemResponse = { + contentType: "", + statusCode: 64104, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/editsectionglobals.md b/docs/sdk/models/operations/editsectionglobals.md new file mode 100644 index 00000000..4adda8cf --- /dev/null +++ b/docs/sdk/models/operations/editsectionglobals.md @@ -0,0 +1,35 @@ +# EditSectionGlobals + +## Example Usage + +```typescript +import { EditSectionGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: EditSectionGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/editsectionprefs.md b/docs/sdk/models/operations/editsectionprefs.md new file mode 100644 index 00000000..75a2e882 --- /dev/null +++ b/docs/sdk/models/operations/editsectionprefs.md @@ -0,0 +1,16 @@ +# EditSectionPrefs + +The preferences for this section + +## Example Usage + +```typescript +import { EditSectionPrefs } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: EditSectionPrefs = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdk/models/operations/editsectionrequest.md b/docs/sdk/models/operations/editsectionrequest.md new file mode 100644 index 00000000..13cdee8e --- /dev/null +++ b/docs/sdk/models/operations/editsectionrequest.md @@ -0,0 +1,40 @@ +# EditSectionRequest + +## Example Usage + +```typescript +import { EditSectionRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: EditSectionRequest = { + sectionId: "", + agent: "", + locations: [ + "O:\fatboy\\Media\\Ripped\\Music", + "O:\fatboy\\Media\\My Music", + ], + prefs: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *string* | :heavy_check_mark: | The section identifier | | +| `name` | *string* | :heavy_minus_sign: | The name of the new section | | +| `scanner` | *string* | :heavy_minus_sign: | The scanner this section should use | | +| `agent` | *string* | :heavy_check_mark: | The agent this section should use for metadata | | +| `metadataAgentProviderGroupId` | *string* | :heavy_minus_sign: | The agent group id for this section | | +| `language` | *string* | :heavy_minus_sign: | The language of this section | | +| `locations` | *string*[] | :heavy_minus_sign: | The locations on disk to add to this section | [
"O:\\fatboy\\Media\\Ripped\\Music",
"O:\\fatboy\\Media\\My Music"
] | +| `prefs` | [operations.EditSectionPrefs](../../../sdk/models/operations/editsectionprefs.md) | :heavy_minus_sign: | The preferences for this section | {
"collectionMode": 2,
"hidden": 0
} | \ No newline at end of file diff --git a/docs/sdk/models/operations/editsectionresponse.md b/docs/sdk/models/operations/editsectionresponse.md new file mode 100644 index 00000000..b9dcdad7 --- /dev/null +++ b/docs/sdk/models/operations/editsectionresponse.md @@ -0,0 +1,20 @@ +# EditSectionResponse + +## Example Usage + +```typescript +import { EditSectionResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: EditSectionResponse = { + contentType: "", + statusCode: 330143, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/editsubscriptionpreferencesglobals.md b/docs/sdk/models/operations/editsubscriptionpreferencesglobals.md new file mode 100644 index 00000000..4323ae6f --- /dev/null +++ b/docs/sdk/models/operations/editsubscriptionpreferencesglobals.md @@ -0,0 +1,35 @@ +# EditSubscriptionPreferencesGlobals + +## Example Usage + +```typescript +import { EditSubscriptionPreferencesGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: EditSubscriptionPreferencesGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/editsubscriptionpreferencesprefs.md b/docs/sdk/models/operations/editsubscriptionpreferencesprefs.md new file mode 100644 index 00000000..cdf9c7e4 --- /dev/null +++ b/docs/sdk/models/operations/editsubscriptionpreferencesprefs.md @@ -0,0 +1,14 @@ +# EditSubscriptionPreferencesPrefs + +## Example Usage + +```typescript +import { EditSubscriptionPreferencesPrefs } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: EditSubscriptionPreferencesPrefs = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdk/models/operations/editsubscriptionpreferencesrequest.md b/docs/sdk/models/operations/editsubscriptionpreferencesrequest.md new file mode 100644 index 00000000..4e89bfad --- /dev/null +++ b/docs/sdk/models/operations/editsubscriptionpreferencesrequest.md @@ -0,0 +1,29 @@ +# EditSubscriptionPreferencesRequest + +## Example Usage + +```typescript +import { EditSubscriptionPreferencesRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: EditSubscriptionPreferencesRequest = { + subscriptionId: 358377, + prefs: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `subscriptionId` | *number* | :heavy_check_mark: | N/A | | +| `prefs` | [operations.EditSubscriptionPreferencesPrefs](../../../sdk/models/operations/editsubscriptionpreferencesprefs.md) | :heavy_minus_sign: | N/A | {
"minVideoQuality": 720
} | \ No newline at end of file diff --git a/docs/sdk/models/operations/editsubscriptionpreferencesresponse.md b/docs/sdk/models/operations/editsubscriptionpreferencesresponse.md new file mode 100644 index 00000000..bccbdca2 --- /dev/null +++ b/docs/sdk/models/operations/editsubscriptionpreferencesresponse.md @@ -0,0 +1,21 @@ +# EditSubscriptionPreferencesResponse + +## Example Usage + +```typescript +import { EditSubscriptionPreferencesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: EditSubscriptionPreferencesResponse = { + contentType: "", + statusCode: 150055, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithSubscription` | [shared.MediaContainerWithSubscription](../../../sdk/models/shared/mediacontainerwithsubscription.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/emptytrashglobals.md b/docs/sdk/models/operations/emptytrashglobals.md new file mode 100644 index 00000000..bd387448 --- /dev/null +++ b/docs/sdk/models/operations/emptytrashglobals.md @@ -0,0 +1,35 @@ +# EmptyTrashGlobals + +## Example Usage + +```typescript +import { EmptyTrashGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: EmptyTrashGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/emptytrashrequest.md b/docs/sdk/models/operations/emptytrashrequest.md new file mode 100644 index 00000000..43b41d46 --- /dev/null +++ b/docs/sdk/models/operations/emptytrashrequest.md @@ -0,0 +1,27 @@ +# EmptyTrashRequest + +## Example Usage + +```typescript +import { EmptyTrashRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: EmptyTrashRequest = { + sectionId: 484541, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/sdk/models/operations/emptytrashresponse.md b/docs/sdk/models/operations/emptytrashresponse.md new file mode 100644 index 00000000..fbfb0645 --- /dev/null +++ b/docs/sdk/models/operations/emptytrashresponse.md @@ -0,0 +1,20 @@ +# EmptyTrashResponse + +## Example Usage + +```typescript +import { EmptyTrashResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: EmptyTrashResponse = { + contentType: "", + statusCode: 839930, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/enablepapertrailglobals.md b/docs/sdk/models/operations/enablepapertrailglobals.md new file mode 100644 index 00000000..8a6e71a6 --- /dev/null +++ b/docs/sdk/models/operations/enablepapertrailglobals.md @@ -0,0 +1,35 @@ +# EnablePapertrailGlobals + +## Example Usage + +```typescript +import { EnablePapertrailGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: EnablePapertrailGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/enablepapertrailrequest.md b/docs/sdk/models/operations/enablepapertrailrequest.md new file mode 100644 index 00000000..644c536c --- /dev/null +++ b/docs/sdk/models/operations/enablepapertrailrequest.md @@ -0,0 +1,25 @@ +# EnablePapertrailRequest + +## Example Usage + +```typescript +import { EnablePapertrailRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: EnablePapertrailRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `minutes` | *number* | :heavy_minus_sign: | The number of minutes logging should be sent to Papertrail | | \ No newline at end of file diff --git a/docs/sdk/models/operations/enablepapertrailresponse.md b/docs/sdk/models/operations/enablepapertrailresponse.md index 0a6a0258..5c8315cb 100644 --- a/docs/sdk/models/operations/enablepapertrailresponse.md +++ b/docs/sdk/models/operations/enablepapertrailresponse.md @@ -1,13 +1,13 @@ -# EnablePaperTrailResponse +# EnablePapertrailResponse ## Example Usage ```typescript -import { EnablePaperTrailResponse } from "@lukehagar/plexjs/sdk/models/operations"; +import { EnablePapertrailResponse } from "@lukehagar/plexjs/sdk/models/operations"; -let value: EnablePaperTrailResponse = { +let value: EnablePapertrailResponse = { contentType: "", - statusCode: 561624, + statusCode: 813966, }; ``` diff --git a/docs/sdk/models/operations/extension.md b/docs/sdk/models/operations/extension.md new file mode 100644 index 00000000..8d62c552 --- /dev/null +++ b/docs/sdk/models/operations/extension.md @@ -0,0 +1,19 @@ +# Extension + +Extension + + +## Example Usage + +```typescript +import { Extension } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: Extension = Extension.Mpd; +``` + +## Values + +| Name | Value | +| ------ | ------ | +| `M3u8` | m3u8 | +| `Mpd` | mpd | \ No newline at end of file diff --git a/docs/sdk/models/operations/extras.md b/docs/sdk/models/operations/extras.md deleted file mode 100644 index e3a6cc2c..00000000 --- a/docs/sdk/models/operations/extras.md +++ /dev/null @@ -1,17 +0,0 @@ -# Extras - -## Example Usage - -```typescript -import { Extras } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Extras = { - size: 1, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `size` | *number* | :heavy_minus_sign: | The size of the extras. | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/feature.md b/docs/sdk/models/operations/feature.md index f9e72a56..8b2bf0b6 100644 --- a/docs/sdk/models/operations/feature.md +++ b/docs/sdk/models/operations/feature.md @@ -5,28 +5,13 @@ ```typescript import { Feature } from "@lukehagar/plexjs/sdk/models/operations"; -let value: Feature = { - type: "", - flavor: "global", - scrobbleKey: "/:/scrobble/new", - unscrobbleKey: "/:/unscrobble/new", - action: [ - { - id: "addToContinueWatching", - key: "/actions/addToContinueWatching", - }, - ], -}; +let value: Feature = {}; ``` ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `key` | *string* | :heavy_minus_sign: | N/A | | -| `type` | *string* | :heavy_check_mark: | N/A | | -| `flavor` | *string* | :heavy_minus_sign: | N/A | global | -| `scrobbleKey` | *string* | :heavy_minus_sign: | N/A | /:/scrobble/new | -| `unscrobbleKey` | *string* | :heavy_minus_sign: | N/A | /:/unscrobble/new | -| `directory` | [operations.GetMediaProvidersDirectory](../../../sdk/models/operations/getmediaprovidersdirectory.md)[] | :heavy_minus_sign: | N/A | | -| `action` | [operations.Action](../../../sdk/models/operations/action.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `directory` | [shared.Directory](../../../sdk/models/shared/directory.md)[] | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/field.md b/docs/sdk/models/operations/field.md deleted file mode 100644 index 9e3b8ea5..00000000 --- a/docs/sdk/models/operations/field.md +++ /dev/null @@ -1,23 +0,0 @@ -# Field - -## Example Usage - -```typescript -import { Field } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Field = { - key: "show.title", - title: "Show Title", - type: "string", - subType: "rating", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `key` | *string* | :heavy_check_mark: | N/A | show.title | -| `title` | *string* | :heavy_check_mark: | N/A | Show Title | -| `type` | *string* | :heavy_check_mark: | N/A | string | -| `subType` | *string* | :heavy_minus_sign: | N/A | rating | \ No newline at end of file diff --git a/docs/sdk/models/operations/fieldtype.md b/docs/sdk/models/operations/fieldtype.md deleted file mode 100644 index 76f56f63..00000000 --- a/docs/sdk/models/operations/fieldtype.md +++ /dev/null @@ -1,24 +0,0 @@ -# FieldType - -## Example Usage - -```typescript -import { FieldType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: FieldType = { - type: "tag", - operator: [ - { - key: "=", - title: "is", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `type` | *string* | :heavy_check_mark: | N/A | tag | -| `operator` | [operations.Operator](../../../sdk/models/operations/operator.md)[] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/filter.md b/docs/sdk/models/operations/filter.md deleted file mode 100644 index 241f407c..00000000 --- a/docs/sdk/models/operations/filter.md +++ /dev/null @@ -1,22 +0,0 @@ -# Filter - -Filter - -## Example Usage - -```typescript -import { Filter } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Filter = Filter.Available; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `All` | all | -| `Available` | available | -| `Released` | released | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/flattenseasons.md b/docs/sdk/models/operations/flattenseasons.md deleted file mode 100644 index c69fee70..00000000 --- a/docs/sdk/models/operations/flattenseasons.md +++ /dev/null @@ -1,23 +0,0 @@ -# FlattenSeasons - -Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). - - -## Example Usage - -```typescript -import { FlattenSeasons } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: FlattenSeasons = FlattenSeasons.Show; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `LibraryDefault` | -1 | -| `Hide` | 0 | -| `Show` | 1 | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/flavor.md b/docs/sdk/models/operations/flavor.md new file mode 100644 index 00000000..a3affb8c --- /dev/null +++ b/docs/sdk/models/operations/flavor.md @@ -0,0 +1,22 @@ +# Flavor + +- `0`: The country is divided into regions, and following the key will lead to a list of regions. +- `1`: The county is divided by postal codes, and an example code is returned in `example`. +- `2`: The country has a single postal code, returned in `example`. + + +## Example Usage + +```typescript +import { Flavor } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: Flavor = Flavor.Two; +``` + +## Values + +| Name | Value | +| ------ | ------ | +| `Zero` | 0 | +| `One` | 1 | +| `Two` | 2 | \ No newline at end of file diff --git a/docs/sdk/models/operations/force.md b/docs/sdk/models/operations/force.md deleted file mode 100644 index 272869d9..00000000 --- a/docs/sdk/models/operations/force.md +++ /dev/null @@ -1,18 +0,0 @@ -# Force - -Force the refresh even if the library is already being refreshed. - -## Example Usage - -```typescript -import { Force } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Force = Force.Zero; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/format.md b/docs/sdk/models/operations/format.md new file mode 100644 index 00000000..9a9fa9f6 --- /dev/null +++ b/docs/sdk/models/operations/format.md @@ -0,0 +1,20 @@ +# Format + +The output format for the image; defaults to jpg + +## Example Usage + +```typescript +import { Format } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: Format = Format.Jpg; +``` + +## Values + +| Name | Value | +| ------ | ------ | +| `Jpg` | jpg | +| `Jpeg` | jpeg | +| `Png` | png | +| `Ppm` | ppm | \ No newline at end of file diff --git a/docs/sdk/models/operations/friend.md b/docs/sdk/models/operations/friend.md deleted file mode 100644 index 56155a87..00000000 --- a/docs/sdk/models/operations/friend.md +++ /dev/null @@ -1,38 +0,0 @@ -# Friend - -## Example Usage - -```typescript -import { Friend, Status } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Friend = { - email: "username@email.com", - friendlyName: "exampleUser", - home: true, - id: 0, - sharedServers: [], - sharedSources: [], - status: Status.Accepted, - thumb: "https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578", - title: "username123", - username: "username123", - uuid: "7d1916e0d8f6e76b", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `email` | *string* | :heavy_check_mark: | The account email address | username@email.com | -| `friendlyName` | *string* | :heavy_check_mark: | The account full name | exampleUser | -| `home` | *boolean* | :heavy_check_mark: | If the account is a Plex Home user | | -| `id` | *number* | :heavy_check_mark: | The Plex account ID | | -| `restricted` | *boolean* | :heavy_minus_sign: | If the account is a Plex Home managed user | | -| `sharedServers` | [operations.SharedServers](../../../sdk/models/operations/sharedservers.md)[] | :heavy_check_mark: | N/A | | -| `sharedSources` | [operations.SharedSources](../../../sdk/models/operations/sharedsources.md)[] | :heavy_check_mark: | N/A | | -| `status` | [operations.Status](../../../sdk/models/operations/status.md) | :heavy_check_mark: | Current friend request status | accepted | -| `thumb` | *string* | :heavy_check_mark: | URL of the account thumbnail | https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578 | -| `title` | *string* | :heavy_check_mark: | The title of the account (username or friendly name) | username123 | -| `username` | *string* | :heavy_check_mark: | The account username | username123 | -| `uuid` | *string* | :heavy_check_mark: | The account Universally Unique Identifier (UUID) | 7d1916e0d8f6e76b | \ No newline at end of file diff --git a/docs/sdk/models/operations/generatethumbsglobals.md b/docs/sdk/models/operations/generatethumbsglobals.md new file mode 100644 index 00000000..dca40bff --- /dev/null +++ b/docs/sdk/models/operations/generatethumbsglobals.md @@ -0,0 +1,35 @@ +# GenerateThumbsGlobals + +## Example Usage + +```typescript +import { GenerateThumbsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GenerateThumbsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/generatethumbsrequest.md b/docs/sdk/models/operations/generatethumbsrequest.md new file mode 100644 index 00000000..bd36d448 --- /dev/null +++ b/docs/sdk/models/operations/generatethumbsrequest.md @@ -0,0 +1,30 @@ +# GenerateThumbsRequest + +## Example Usage + +```typescript +import { GenerateThumbsRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: GenerateThumbsRequest = { + ids: "", + force: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `force` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/generatethumbsresponse.md b/docs/sdk/models/operations/generatethumbsresponse.md new file mode 100644 index 00000000..ede3b039 --- /dev/null +++ b/docs/sdk/models/operations/generatethumbsresponse.md @@ -0,0 +1,20 @@ +# GenerateThumbsResponse + +## Example Usage + +```typescript +import { GenerateThumbsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GenerateThumbsResponse = { + contentType: "", + statusCode: 196763, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/genre.md b/docs/sdk/models/operations/genre.md deleted file mode 100644 index c0f63858..00000000 --- a/docs/sdk/models/operations/genre.md +++ /dev/null @@ -1,23 +0,0 @@ -# Genre - -The filter query string for similar items. - -## Example Usage - -```typescript -import { Genre } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Genre = { - id: 259, - filter: "genre=19", - tag: "Crime", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | The unique identifier for the genre.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | -| `filter` | *string* | :heavy_check_mark: | N/A | genre=19 | -| `tag` | *string* | :heavy_check_mark: | The genre name of this media-item
| Crime | \ No newline at end of file diff --git a/docs/sdk/models/operations/geodata.md b/docs/sdk/models/operations/geodata.md deleted file mode 100644 index 82e40604..00000000 --- a/docs/sdk/models/operations/geodata.md +++ /dev/null @@ -1,39 +0,0 @@ -# GeoData - -Geo location data - -## Example Usage - -```typescript -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", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `code` | *string* | :heavy_check_mark: | The ISO 3166-1 alpha-2 code of the country. | VI | -| `continentCode` | *string* | :heavy_check_mark: | The continent code where the country is located. | NA | -| `country` | *string* | :heavy_check_mark: | The official name of the country. | United States Virgin Islands | -| `city` | *string* | :heavy_check_mark: | The name of the city. | Amsterdam | -| `europeanUnionMember` | *boolean* | :heavy_minus_sign: | Indicates if the country is a member of the European Union. | true | -| `timeZone` | *string* | :heavy_check_mark: | The time zone of the country. | America/St_Thomas | -| `postalCode` | *string* | :heavy_check_mark: | The postal code of the location. | 802 | -| `inPrivacyRestrictedCountry` | *boolean* | :heavy_minus_sign: | Indicates if the country has privacy restrictions. | true | -| `inPrivacyRestrictedRegion` | *boolean* | :heavy_minus_sign: | Indicates if the region has privacy restrictions. | true | -| `subdivisions` | *string* | :heavy_check_mark: | The name of the primary administrative subdivision. | Saint Thomas | -| `coordinates` | *string* | :heavy_check_mark: | The geographical coordinates (latitude, longitude) of the location. | 18.3381, -64.8941 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getactorslibrarydirectory.md b/docs/sdk/models/operations/getactorslibrarydirectory.md deleted file mode 100644 index dd039228..00000000 --- a/docs/sdk/models/operations/getactorslibrarydirectory.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetActorsLibraryDirectory - -## Example Usage - -```typescript -import { GetActorsLibraryDirectory } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetActorsLibraryDirectory = { - fastKey: "/library/sections/2/all?actor=134671", - thumb: - "https://metadata-static.plex.tv/e/people/e2a915b537ef720252b6d408bc1f91b3.jpg", - key: "134671", - title: "Aaron Paul", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `fastKey` | *string* | :heavy_check_mark: | A fast lookup key for the actor relative url. | /library/sections/2/all?actor=134671 | -| `thumb` | *string* | :heavy_check_mark: | URL for the thumbnail image of the actor. | https://metadata-static.plex.tv/e/people/e2a915b537ef720252b6d408bc1f91b3.jpg | -| `key` | *string* | :heavy_check_mark: | A unique key representing the actor. | 134671 | -| `title` | *string* | :heavy_check_mark: | The name of the actor. | Aaron Paul | \ No newline at end of file diff --git a/docs/sdk/models/operations/getactorslibrarymediacontainer.md b/docs/sdk/models/operations/getactorslibrarymediacontainer.md deleted file mode 100644 index bd26d38f..00000000 --- a/docs/sdk/models/operations/getactorslibrarymediacontainer.md +++ /dev/null @@ -1,49 +0,0 @@ -# GetActorsLibraryMediaContainer - -## Example Usage - -```typescript -import { GetActorsLibraryMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetActorsLibraryMediaContainer = { - size: 50, - allowSync: false, - art: "/:/resources/show-fanart.jpg", - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1734362201, - nocache: true, - thumb: "/:/resources/show.png", - title1: "TV Series", - title2: "By Starring Actor", - viewGroup: "secondary", - viewMode: "131131", - directory: [ - { - fastKey: "/library/sections/2/all?actor=134671", - thumb: - "https://metadata-static.plex.tv/e/people/e2a915b537ef720252b6d408bc1f91b3.jpg", - key: "134671", - title: "Aaron Paul", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `art` | *string* | :heavy_check_mark: | URL for the background artwork of the media container. | /:/resources/show-fanart.jpg | -| `identifier` | *string* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `mediaTagPrefix` | *string* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | -| `mediaTagVersion` | *number* | :heavy_check_mark: | The version number for media tags. | 1734362201 | -| `nocache` | *boolean* | :heavy_check_mark: | Specifies whether caching is disabled. | true | -| `thumb` | *string* | :heavy_check_mark: | URL for the thumbnail image of the media container. | /:/resources/show.png | -| `title1` | *string* | :heavy_check_mark: | The primary title of the media container. | TV Series | -| `title2` | *string* | :heavy_check_mark: | The secondary title of the media container. | By Starring Actor | -| `viewGroup` | *string* | :heavy_check_mark: | Identifier for the view group layout. | secondary | -| `viewMode` | *string* | :heavy_minus_sign: | Identifier for the view mode. | 131131 | -| `directory` | [operations.GetActorsLibraryDirectory](../../../sdk/models/operations/getactorslibrarydirectory.md)[] | :heavy_minus_sign: | An array of actor entries for media items. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getactorslibraryqueryparamtype.md b/docs/sdk/models/operations/getactorslibraryqueryparamtype.md deleted file mode 100644 index e05ca848..00000000 --- a/docs/sdk/models/operations/getactorslibraryqueryparamtype.md +++ /dev/null @@ -1,35 +0,0 @@ -# GetActorsLibraryQueryParamType - -The type of media to retrieve or filter by. -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 - - -## Example Usage - -```typescript -import { GetActorsLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetActorsLibraryQueryParamType = - GetActorsLibraryQueryParamType.TvShow; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Artist` | 5 | -| `Album` | 6 | -| `Track` | 7 | -| `PhotoAlbum` | 8 | -| `Photo` | 9 | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getactorslibraryrequest.md b/docs/sdk/models/operations/getactorslibraryrequest.md deleted file mode 100644 index 3d3d6ef4..00000000 --- a/docs/sdk/models/operations/getactorslibraryrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetActorsLibraryRequest - -## Example Usage - -```typescript -import { GetActorsLibraryQueryParamType, GetActorsLibraryRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetActorsLibraryRequest = { - sectionKey: 9518, - type: GetActorsLibraryQueryParamType.TvShow, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | -| `type` | [operations.GetActorsLibraryQueryParamType](../../../sdk/models/operations/getactorslibraryqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
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
| 2 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getactorslibraryresponse.md b/docs/sdk/models/operations/getactorslibraryresponse.md deleted file mode 100644 index 07ba9bf6..00000000 --- a/docs/sdk/models/operations/getactorslibraryresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetActorsLibraryResponse - -## Example Usage - -```typescript -import { GetActorsLibraryResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetActorsLibraryResponse = { - contentType: "", - statusCode: 309641, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetActorsLibraryResponseBody](../../../sdk/models/operations/getactorslibraryresponsebody.md) | :heavy_minus_sign: | Successful response containing media container data. | \ No newline at end of file diff --git a/docs/sdk/models/operations/getactorslibraryresponsebody.md b/docs/sdk/models/operations/getactorslibraryresponsebody.md deleted file mode 100644 index e251105d..00000000 --- a/docs/sdk/models/operations/getactorslibraryresponsebody.md +++ /dev/null @@ -1,41 +0,0 @@ -# GetActorsLibraryResponseBody - -Successful response containing media container data. - -## Example Usage - -```typescript -import { GetActorsLibraryResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetActorsLibraryResponseBody = { - mediaContainer: { - size: 50, - allowSync: false, - art: "/:/resources/show-fanart.jpg", - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1734362201, - nocache: true, - thumb: "/:/resources/show.png", - title1: "TV Series", - title2: "By Starring Actor", - viewGroup: "secondary", - viewMode: "131131", - directory: [ - { - fastKey: "/library/sections/2/all?actor=134671", - thumb: - "https://metadata-static.plex.tv/e/people/e2a915b537ef720252b6d408bc1f91b3.jpg", - key: "134671", - title: "Aaron Paul", - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetActorsLibraryMediaContainer](../../../sdk/models/operations/getactorslibrarymediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getalbumsglobals.md b/docs/sdk/models/operations/getalbumsglobals.md new file mode 100644 index 00000000..60518525 --- /dev/null +++ b/docs/sdk/models/operations/getalbumsglobals.md @@ -0,0 +1,35 @@ +# GetAlbumsGlobals + +## Example Usage + +```typescript +import { GetAlbumsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAlbumsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getalbumsrequest.md b/docs/sdk/models/operations/getalbumsrequest.md new file mode 100644 index 00000000..fde65d53 --- /dev/null +++ b/docs/sdk/models/operations/getalbumsrequest.md @@ -0,0 +1,27 @@ +# GetAlbumsRequest + +## Example Usage + +```typescript +import { GetAlbumsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAlbumsRequest = { + sectionId: 46532, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getalbumsresponse.md b/docs/sdk/models/operations/getalbumsresponse.md new file mode 100644 index 00000000..b60dab83 --- /dev/null +++ b/docs/sdk/models/operations/getalbumsresponse.md @@ -0,0 +1,21 @@ +# GetAlbumsResponse + +## Example Usage + +```typescript +import { GetAlbumsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAlbumsResponse = { + contentType: "", + statusCode: 533215, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getallhubsglobals.md b/docs/sdk/models/operations/getallhubsglobals.md new file mode 100644 index 00000000..c732e3bd --- /dev/null +++ b/docs/sdk/models/operations/getallhubsglobals.md @@ -0,0 +1,35 @@ +# GetAllHubsGlobals + +## Example Usage + +```typescript +import { GetAllHubsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAllHubsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getallhubsmediacontainer.md b/docs/sdk/models/operations/getallhubsmediacontainer.md new file mode 100644 index 00000000..0872ab60 --- /dev/null +++ b/docs/sdk/models/operations/getallhubsmediacontainer.md @@ -0,0 +1,187 @@ +# GetAllHubsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetAllHubsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAllHubsMediaContainer = { + hub: [ + { + type: "track", + context: "hub.home.onDeck", + hubIdentifier: "home.onDeck", + key: "/hubs/sections/home/onDeck", + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + size: 1, + subtype: "podcast", + totalSize: 8, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `hub` | [shared.Hub](../../../sdk/models/shared/hub.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getallhubsrequest.md b/docs/sdk/models/operations/getallhubsrequest.md new file mode 100644 index 00000000..7681d188 --- /dev/null +++ b/docs/sdk/models/operations/getallhubsrequest.md @@ -0,0 +1,30 @@ +# GetAllHubsRequest + +## Example Usage + +```typescript +import { GetAllHubsRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: GetAllHubsRequest = { + onlyTransient: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `count` | *number* | :heavy_minus_sign: | Limit results to count items | | +| `onlyTransient` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | 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) | 1 | +| `identifier` | *string*[] | :heavy_minus_sign: | If provided, limit to only specified hubs | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getallhubsresponse.md b/docs/sdk/models/operations/getallhubsresponse.md new file mode 100644 index 00000000..789cf073 --- /dev/null +++ b/docs/sdk/models/operations/getallhubsresponse.md @@ -0,0 +1,34 @@ +# GetAllHubsResponse + +## Example Usage + +```typescript +import { GetAllHubsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAllHubsResponse = { + contentType: "", + statusCode: 327651, + headers: { + "key": [ + "", + "", + ], + "key1": [ + "", + "", + "", + ], + "key2": [], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetAllHubsResponseBody](../../../sdk/models/operations/getallhubsresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getallhubsresponsebody.md b/docs/sdk/models/operations/getallhubsresponsebody.md new file mode 100644 index 00000000..298e3604 --- /dev/null +++ b/docs/sdk/models/operations/getallhubsresponsebody.md @@ -0,0 +1,183 @@ +# GetAllHubsResponseBody + +OK + +## Example Usage + +```typescript +import { GetAllHubsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAllHubsResponseBody = { + mediaContainer: { + hub: [ + { + type: "track", + context: "hub.home.onDeck", + hubIdentifier: "home.onDeck", + key: "/hubs/sections/home/onDeck", + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: + "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + size: 1, + subtype: "podcast", + totalSize: 8, + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetAllHubsMediaContainer](../../../sdk/models/operations/getallhubsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getallitemleavesglobals.md b/docs/sdk/models/operations/getallitemleavesglobals.md new file mode 100644 index 00000000..71d49e11 --- /dev/null +++ b/docs/sdk/models/operations/getallitemleavesglobals.md @@ -0,0 +1,35 @@ +# GetAllItemLeavesGlobals + +## Example Usage + +```typescript +import { GetAllItemLeavesGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAllItemLeavesGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getallitemleavesrequest.md b/docs/sdk/models/operations/getallitemleavesrequest.md new file mode 100644 index 00000000..f913b63f --- /dev/null +++ b/docs/sdk/models/operations/getallitemleavesrequest.md @@ -0,0 +1,27 @@ +# GetAllItemLeavesRequest + +## Example Usage + +```typescript +import { GetAllItemLeavesRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAllItemLeavesRequest = { + ids: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getallitemleavesresponse.md b/docs/sdk/models/operations/getallitemleavesresponse.md new file mode 100644 index 00000000..49a6608b --- /dev/null +++ b/docs/sdk/models/operations/getallitemleavesresponse.md @@ -0,0 +1,25 @@ +# GetAllItemLeavesResponse + +## Example Usage + +```typescript +import { GetAllItemLeavesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAllItemLeavesResponse = { + contentType: "", + statusCode: 340960, + headers: { + "key": [], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getalllanguagesmediacontainer.md b/docs/sdk/models/operations/getalllanguagesmediacontainer.md new file mode 100644 index 00000000..ba1a9186 --- /dev/null +++ b/docs/sdk/models/operations/getalllanguagesmediacontainer.md @@ -0,0 +1,24 @@ +# GetAllLanguagesMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetAllLanguagesMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAllLanguagesMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `language` | [operations.Language](../../../sdk/models/operations/language.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getalllanguagesresponse.md b/docs/sdk/models/operations/getalllanguagesresponse.md new file mode 100644 index 00000000..ea2e0d8b --- /dev/null +++ b/docs/sdk/models/operations/getalllanguagesresponse.md @@ -0,0 +1,31 @@ +# GetAllLanguagesResponse + +## Example Usage + +```typescript +import { GetAllLanguagesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAllLanguagesResponse = { + contentType: "", + statusCode: 564027, + headers: { + "key": [ + "", + ], + "key1": [ + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetAllLanguagesResponseBody](../../../sdk/models/operations/getalllanguagesresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getalllanguagesresponsebody.md b/docs/sdk/models/operations/getalllanguagesresponsebody.md new file mode 100644 index 00000000..858bf64f --- /dev/null +++ b/docs/sdk/models/operations/getalllanguagesresponsebody.md @@ -0,0 +1,17 @@ +# GetAllLanguagesResponseBody + +OK + +## Example Usage + +```typescript +import { GetAllLanguagesResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAllLanguagesResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetAllLanguagesMediaContainer](../../../sdk/models/operations/getalllanguagesmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getallleavesglobals.md b/docs/sdk/models/operations/getallleavesglobals.md new file mode 100644 index 00000000..0d882d68 --- /dev/null +++ b/docs/sdk/models/operations/getallleavesglobals.md @@ -0,0 +1,35 @@ +# GetAllLeavesGlobals + +## Example Usage + +```typescript +import { GetAllLeavesGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAllLeavesGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getallleavesrequest.md b/docs/sdk/models/operations/getallleavesrequest.md new file mode 100644 index 00000000..42aa5df0 --- /dev/null +++ b/docs/sdk/models/operations/getallleavesrequest.md @@ -0,0 +1,27 @@ +# GetAllLeavesRequest + +## Example Usage + +```typescript +import { GetAllLeavesRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAllLeavesRequest = { + sectionId: 897665, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getallleavesresponse.md b/docs/sdk/models/operations/getallleavesresponse.md new file mode 100644 index 00000000..29b3a593 --- /dev/null +++ b/docs/sdk/models/operations/getallleavesresponse.md @@ -0,0 +1,21 @@ +# GetAllLeavesResponse + +## Example Usage + +```typescript +import { GetAllLeavesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAllLeavesResponse = { + contentType: "", + statusCode: 424866, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getalllibrariesdirectory.md b/docs/sdk/models/operations/getalllibrariesdirectory.md deleted file mode 100644 index c41a09e4..00000000 --- a/docs/sdk/models/operations/getalllibrariesdirectory.md +++ /dev/null @@ -1,57 +0,0 @@ -# GetAllLibrariesDirectory - -## Example Usage - -```typescript -import { GetAllLibrariesDirectory, GetAllLibrariesType, Hidden } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetAllLibrariesDirectory = { - allowSync: false, - art: "/:/resources/show-fanart.jpg", - composite: "/library/sections/1/composite/1743824484", - filters: true, - refreshing: true, - thumb: "/:/resources/show.png", - key: "1", - type: GetAllLibrariesType.Movie, - title: "Movies", - agent: "tv.plex.agents.movie", - scanner: "Plex Movie", - language: "en-US", - uuid: "e69655a2-ef48-4aba-bb19-01e7d3cc34d6", - updatedAt: 1556281940, - createdAt: 1556281940, - scannedAt: 1556281940, - content: true, - directory: true, - contentChangedAt: 9173960, - hidden: Hidden.ExcludeHomeScreen, - location: [], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `art` | *string* | :heavy_check_mark: | URL for the background artwork of the media container. | /:/resources/show-fanart.jpg | -| `composite` | *string* | :heavy_check_mark: | The relative path to the composite media item. | /library/sections/1/composite/1743824484 | -| `filters` | *boolean* | :heavy_check_mark: | UNKNOWN | true | -| `refreshing` | *boolean* | :heavy_check_mark: | Indicates whether the library is currently being refreshed or updated | true | -| `thumb` | *string* | :heavy_check_mark: | URL for the thumbnail image of the media container. | /:/resources/show.png | -| `key` | *string* | :heavy_check_mark: | The library key representing the unique identifier | 1 | -| `type` | [operations.GetAllLibrariesType](../../../sdk/models/operations/getalllibrariestype.md) | :heavy_check_mark: | N/A | movie | -| `title` | *string* | :heavy_check_mark: | The title of the library | Movies | -| `agent` | *string* | :heavy_check_mark: | The Plex agent used to match and retrieve media metadata. | tv.plex.agents.movie | -| `scanner` | *string* | :heavy_check_mark: | UNKNOWN | Plex Movie | -| `language` | *string* | :heavy_check_mark: | The Plex library language that has been set | en-US | -| `uuid` | *string* | :heavy_check_mark: | The universally unique identifier for the library. | e69655a2-ef48-4aba-bb19-01e7d3cc34d6 | -| `updatedAt` | *number* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | -| `createdAt` | *number* | :heavy_minus_sign: | N/A | 1556281940 | -| `scannedAt` | *number* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | -| `content` | *boolean* | :heavy_check_mark: | UNKNOWN | true | -| `directory` | *boolean* | :heavy_check_mark: | UNKNOWN | true | -| `contentChangedAt` | *number* | :heavy_check_mark: | Timestamp (in seconds) representing the last time the content was modified.
NOTE: Some Plex server have some absurd values for this field, like 8457612157633039800 so it should be int64
| 9173960 | -| `hidden` | [operations.Hidden](../../../sdk/models/operations/hidden.md) | :heavy_minus_sign: | The Plex library visibility setting | 1 | -| `location` | [operations.GetAllLibrariesLocation](../../../sdk/models/operations/getalllibrarieslocation.md)[] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getalllibrarieslocation.md b/docs/sdk/models/operations/getalllibrarieslocation.md deleted file mode 100644 index 36cc9b85..00000000 --- a/docs/sdk/models/operations/getalllibrarieslocation.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetAllLibrariesLocation - -## Example Usage - -```typescript -import { GetAllLibrariesLocation } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetAllLibrariesLocation = { - id: 1, - path: "/Movies", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------- | --------------------------- | --------------------------- | --------------------------- | --------------------------- | -| `id` | *number* | :heavy_check_mark: | The ID of the location. | 1 | -| `path` | *string* | :heavy_check_mark: | The path to the media item. | /Movies | \ No newline at end of file diff --git a/docs/sdk/models/operations/getalllibrariesmediacontainer.md b/docs/sdk/models/operations/getalllibrariesmediacontainer.md deleted file mode 100644 index 51fd305f..00000000 --- a/docs/sdk/models/operations/getalllibrariesmediacontainer.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetAllLibrariesMediaContainer - -## Example Usage - -```typescript -import { GetAllLibrariesMediaContainer, GetAllLibrariesType, Hidden } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetAllLibrariesMediaContainer = { - size: 50, - allowSync: false, - title1: "TV Series", - directory: [ - { - allowSync: false, - art: "/:/resources/show-fanart.jpg", - composite: "/library/sections/1/composite/1743824484", - filters: true, - refreshing: true, - thumb: "/:/resources/show.png", - key: "1", - type: GetAllLibrariesType.Movie, - title: "Movies", - agent: "tv.plex.agents.movie", - scanner: "Plex Movie", - language: "en-US", - uuid: "e69655a2-ef48-4aba-bb19-01e7d3cc34d6", - updatedAt: 1556281940, - createdAt: 1556281940, - scannedAt: 1556281940, - content: true, - directory: true, - contentChangedAt: 9173960, - hidden: Hidden.ExcludeHomeScreen, - location: [ - { - id: 1, - path: "/Movies", - }, - ], - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `title1` | *string* | :heavy_check_mark: | The primary title of the media container. | TV Series | -| `directory` | [operations.GetAllLibrariesDirectory](../../../sdk/models/operations/getalllibrariesdirectory.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getalllibrariesresponse.md b/docs/sdk/models/operations/getalllibrariesresponse.md deleted file mode 100644 index 2eba10e4..00000000 --- a/docs/sdk/models/operations/getalllibrariesresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetAllLibrariesResponse - -## Example Usage - -```typescript -import { GetAllLibrariesResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetAllLibrariesResponse = { - contentType: "", - statusCode: 429079, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetAllLibrariesResponseBody](../../../sdk/models/operations/getalllibrariesresponsebody.md) | :heavy_minus_sign: | The libraries available on the Server | \ No newline at end of file diff --git a/docs/sdk/models/operations/getalllibrariesresponsebody.md b/docs/sdk/models/operations/getalllibrariesresponsebody.md deleted file mode 100644 index 31c3bac6..00000000 --- a/docs/sdk/models/operations/getalllibrariesresponsebody.md +++ /dev/null @@ -1,53 +0,0 @@ -# GetAllLibrariesResponseBody - -The libraries available on the Server - -## Example Usage - -```typescript -import { GetAllLibrariesResponseBody, GetAllLibrariesType, Hidden } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetAllLibrariesResponseBody = { - mediaContainer: { - size: 50, - allowSync: false, - title1: "TV Series", - directory: [ - { - allowSync: false, - art: "/:/resources/show-fanart.jpg", - composite: "/library/sections/1/composite/1743824484", - filters: true, - refreshing: true, - thumb: "/:/resources/show.png", - key: "1", - type: GetAllLibrariesType.Movie, - title: "Movies", - agent: "tv.plex.agents.movie", - scanner: "Plex Movie", - language: "en-US", - uuid: "e69655a2-ef48-4aba-bb19-01e7d3cc34d6", - updatedAt: 1556281940, - createdAt: 1556281940, - scannedAt: 1556281940, - content: true, - directory: true, - contentChangedAt: 9173960, - hidden: Hidden.ExcludeHomeScreen, - location: [ - { - id: 1, - path: "/Movies", - }, - ], - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetAllLibrariesMediaContainer](../../../sdk/models/operations/getalllibrariesmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getalllibrariestype.md b/docs/sdk/models/operations/getalllibrariestype.md deleted file mode 100644 index b1da1861..00000000 --- a/docs/sdk/models/operations/getalllibrariestype.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetAllLibrariesType - -The library type - -## Example Usage - -```typescript -import { GetAllLibrariesType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetAllLibrariesType = GetAllLibrariesType.Movie; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Movie` | movie | -| `TvShow` | show | -| `Season` | season | -| `Episode` | episode | -| `Artist` | artist | -| `Album` | album | -| `Track` | track | -| `PhotoAlbum` | photoalbum | -| `Photo` | photo | -| `Collection` | collection | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getallpreferencesresponse.md b/docs/sdk/models/operations/getallpreferencesresponse.md new file mode 100644 index 00000000..1c1b9eec --- /dev/null +++ b/docs/sdk/models/operations/getallpreferencesresponse.md @@ -0,0 +1,21 @@ +# GetAllPreferencesResponse + +## Example Usage + +```typescript +import { GetAllPreferencesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAllPreferencesResponse = { + contentType: "", + statusCode: 203958, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithSettings` | [shared.MediaContainerWithSettings](../../../sdk/models/shared/mediacontainerwithsettings.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getallsubscriptionsglobals.md b/docs/sdk/models/operations/getallsubscriptionsglobals.md new file mode 100644 index 00000000..e3a257b5 --- /dev/null +++ b/docs/sdk/models/operations/getallsubscriptionsglobals.md @@ -0,0 +1,35 @@ +# GetAllSubscriptionsGlobals + +## Example Usage + +```typescript +import { GetAllSubscriptionsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAllSubscriptionsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getallsubscriptionsrequest.md b/docs/sdk/models/operations/getallsubscriptionsrequest.md new file mode 100644 index 00000000..9605a40f --- /dev/null +++ b/docs/sdk/models/operations/getallsubscriptionsrequest.md @@ -0,0 +1,30 @@ +# GetAllSubscriptionsRequest + +## Example Usage + +```typescript +import { GetAllSubscriptionsRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: GetAllSubscriptionsRequest = { + includeGrabs: BoolInt.One, + includeStorage: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `includeGrabs` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates whether the active grabs should be included as well | 1 | +| `includeStorage` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Compute the storage of recorded items desired by this subscription | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getallsubscriptionsresponse.md b/docs/sdk/models/operations/getallsubscriptionsresponse.md new file mode 100644 index 00000000..635e209f --- /dev/null +++ b/docs/sdk/models/operations/getallsubscriptionsresponse.md @@ -0,0 +1,37 @@ +# GetAllSubscriptionsResponse + +## Example Usage + +```typescript +import { GetAllSubscriptionsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAllSubscriptionsResponse = { + contentType: "", + statusCode: 756579, + headers: { + "key": [ + "", + "", + ], + "key1": [ + "", + "", + ], + "key2": [ + "", + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithSubscription` | [shared.MediaContainerWithSubscription](../../../sdk/models/shared/mediacontainerwithsubscription.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getartsglobals.md b/docs/sdk/models/operations/getartsglobals.md new file mode 100644 index 00000000..ec395a6a --- /dev/null +++ b/docs/sdk/models/operations/getartsglobals.md @@ -0,0 +1,35 @@ +# GetArtsGlobals + +## Example Usage + +```typescript +import { GetArtsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetArtsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getartsrequest.md b/docs/sdk/models/operations/getartsrequest.md new file mode 100644 index 00000000..9530b968 --- /dev/null +++ b/docs/sdk/models/operations/getartsrequest.md @@ -0,0 +1,27 @@ +# GetArtsRequest + +## Example Usage + +```typescript +import { GetArtsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetArtsRequest = { + sectionId: 741840, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getartsresponse.md b/docs/sdk/models/operations/getartsresponse.md new file mode 100644 index 00000000..593212b3 --- /dev/null +++ b/docs/sdk/models/operations/getartsresponse.md @@ -0,0 +1,21 @@ +# GetArtsResponse + +## Example Usage + +```typescript +import { GetArtsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetArtsResponse = { + contentType: "", + statusCode: 301970, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithArtwork` | [shared.MediaContainerWithArtwork](../../../sdk/models/shared/mediacontainerwithartwork.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getaugmentationstatusglobals.md b/docs/sdk/models/operations/getaugmentationstatusglobals.md new file mode 100644 index 00000000..58953dee --- /dev/null +++ b/docs/sdk/models/operations/getaugmentationstatusglobals.md @@ -0,0 +1,35 @@ +# GetAugmentationStatusGlobals + +## Example Usage + +```typescript +import { GetAugmentationStatusGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAugmentationStatusGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getaugmentationstatusrequest.md b/docs/sdk/models/operations/getaugmentationstatusrequest.md new file mode 100644 index 00000000..58489fd9 --- /dev/null +++ b/docs/sdk/models/operations/getaugmentationstatusrequest.md @@ -0,0 +1,30 @@ +# GetAugmentationStatusRequest + +## Example Usage + +```typescript +import { GetAugmentationStatusRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: GetAugmentationStatusRequest = { + augmentationId: "", + wait: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `augmentationId` | *string* | :heavy_check_mark: | The id of the augmentation | | +| `wait` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Wait for augmentation completion before returning | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getaugmentationstatusresponse.md b/docs/sdk/models/operations/getaugmentationstatusresponse.md new file mode 100644 index 00000000..4349a976 --- /dev/null +++ b/docs/sdk/models/operations/getaugmentationstatusresponse.md @@ -0,0 +1,20 @@ +# GetAugmentationStatusResponse + +## Example Usage + +```typescript +import { GetAugmentationStatusResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAugmentationStatusResponse = { + contentType: "", + statusCode: 436414, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getavailableclientsmediacontainer.md b/docs/sdk/models/operations/getavailableclientsmediacontainer.md deleted file mode 100644 index 6083c1a5..00000000 --- a/docs/sdk/models/operations/getavailableclientsmediacontainer.md +++ /dev/null @@ -1,33 +0,0 @@ -# GetAvailableClientsMediaContainer - -## Example Usage - -```typescript -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", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 1 | -| `server` | [operations.Server](../../../sdk/models/operations/server.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getavailableclientsresponse.md b/docs/sdk/models/operations/getavailableclientsresponse.md deleted file mode 100644 index a2e9de2a..00000000 --- a/docs/sdk/models/operations/getavailableclientsresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetAvailableClientsResponse - -## Example Usage - -```typescript -import { GetAvailableClientsResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetAvailableClientsResponse = { - contentType: "", - statusCode: 927142, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetAvailableClientsResponseBody](../../../sdk/models/operations/getavailableclientsresponsebody.md) | :heavy_minus_sign: | Available Clients | \ No newline at end of file diff --git a/docs/sdk/models/operations/getavailableclientsresponsebody.md b/docs/sdk/models/operations/getavailableclientsresponsebody.md deleted file mode 100644 index 033286a9..00000000 --- a/docs/sdk/models/operations/getavailableclientsresponsebody.md +++ /dev/null @@ -1,36 +0,0 @@ -# GetAvailableClientsResponseBody - -Available Clients - -## Example Usage - -```typescript -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", - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetAvailableClientsMediaContainer](../../../sdk/models/operations/getavailableclientsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getavailablegrabbersglobals.md b/docs/sdk/models/operations/getavailablegrabbersglobals.md new file mode 100644 index 00000000..b7f98669 --- /dev/null +++ b/docs/sdk/models/operations/getavailablegrabbersglobals.md @@ -0,0 +1,35 @@ +# GetAvailableGrabbersGlobals + +## Example Usage + +```typescript +import { GetAvailableGrabbersGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAvailableGrabbersGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getavailablegrabbersmediacontainer.md b/docs/sdk/models/operations/getavailablegrabbersmediacontainer.md new file mode 100644 index 00000000..e952b556 --- /dev/null +++ b/docs/sdk/models/operations/getavailablegrabbersmediacontainer.md @@ -0,0 +1,24 @@ +# GetAvailableGrabbersMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetAvailableGrabbersMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAvailableGrabbersMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `mediaGrabber` | [operations.MediaGrabber](../../../sdk/models/operations/mediagrabber.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getavailablegrabbersrequest.md b/docs/sdk/models/operations/getavailablegrabbersrequest.md new file mode 100644 index 00000000..e51ff820 --- /dev/null +++ b/docs/sdk/models/operations/getavailablegrabbersrequest.md @@ -0,0 +1,27 @@ +# GetAvailableGrabbersRequest + +## Example Usage + +```typescript +import { GetAvailableGrabbersRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAvailableGrabbersRequest = { + protocol: "livetv", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `protocol` | *string* | :heavy_minus_sign: | Only return grabbers providing this protocol. | livetv | \ No newline at end of file diff --git a/docs/sdk/models/operations/getavailablegrabbersresponse.md b/docs/sdk/models/operations/getavailablegrabbersresponse.md new file mode 100644 index 00000000..b4770b17 --- /dev/null +++ b/docs/sdk/models/operations/getavailablegrabbersresponse.md @@ -0,0 +1,34 @@ +# GetAvailableGrabbersResponse + +## Example Usage + +```typescript +import { GetAvailableGrabbersResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAvailableGrabbersResponse = { + contentType: "", + statusCode: 331735, + headers: { + "key": [ + "", + "", + "", + ], + "key1": [ + "", + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetAvailableGrabbersResponseBody](../../../sdk/models/operations/getavailablegrabbersresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getavailablegrabbersresponsebody.md b/docs/sdk/models/operations/getavailablegrabbersresponsebody.md new file mode 100644 index 00000000..82312e61 --- /dev/null +++ b/docs/sdk/models/operations/getavailablegrabbersresponsebody.md @@ -0,0 +1,17 @@ +# GetAvailableGrabbersResponseBody + +OK + +## Example Usage + +```typescript +import { GetAvailableGrabbersResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAvailableGrabbersResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetAvailableGrabbersMediaContainer](../../../sdk/models/operations/getavailablegrabbersmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getavailablesortsglobals.md b/docs/sdk/models/operations/getavailablesortsglobals.md new file mode 100644 index 00000000..7a53ac19 --- /dev/null +++ b/docs/sdk/models/operations/getavailablesortsglobals.md @@ -0,0 +1,35 @@ +# GetAvailableSortsGlobals + +## Example Usage + +```typescript +import { GetAvailableSortsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAvailableSortsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getavailablesortsmediacontainer.md b/docs/sdk/models/operations/getavailablesortsmediacontainer.md new file mode 100644 index 00000000..67d2ebb1 --- /dev/null +++ b/docs/sdk/models/operations/getavailablesortsmediacontainer.md @@ -0,0 +1,24 @@ +# GetAvailableSortsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetAvailableSortsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAvailableSortsMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `directory` | [shared.Sort](../../../sdk/models/shared/sort.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getavailablesortsrequest.md b/docs/sdk/models/operations/getavailablesortsrequest.md new file mode 100644 index 00000000..63f312b3 --- /dev/null +++ b/docs/sdk/models/operations/getavailablesortsrequest.md @@ -0,0 +1,27 @@ +# GetAvailableSortsRequest + +## Example Usage + +```typescript +import { GetAvailableSortsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAvailableSortsRequest = { + sectionId: 155630, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getavailablesortsresponse.md b/docs/sdk/models/operations/getavailablesortsresponse.md new file mode 100644 index 00000000..173002b0 --- /dev/null +++ b/docs/sdk/models/operations/getavailablesortsresponse.md @@ -0,0 +1,21 @@ +# GetAvailableSortsResponse + +## Example Usage + +```typescript +import { GetAvailableSortsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAvailableSortsResponse = { + contentType: "", + statusCode: 425270, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetAvailableSortsResponseBody](../../../sdk/models/operations/getavailablesortsresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getavailablesortsresponsebody.md b/docs/sdk/models/operations/getavailablesortsresponsebody.md new file mode 100644 index 00000000..5e59e2a2 --- /dev/null +++ b/docs/sdk/models/operations/getavailablesortsresponsebody.md @@ -0,0 +1,17 @@ +# GetAvailableSortsResponseBody + +OK + +## Example Usage + +```typescript +import { GetAvailableSortsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetAvailableSortsResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetAvailableSortsMediaContainer](../../../sdk/models/operations/getavailablesortsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getbackgroundtasksmediacontainer.md b/docs/sdk/models/operations/getbackgroundtasksmediacontainer.md new file mode 100644 index 00000000..d1f2b494 --- /dev/null +++ b/docs/sdk/models/operations/getbackgroundtasksmediacontainer.md @@ -0,0 +1,24 @@ +# GetBackgroundTasksMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetBackgroundTasksMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetBackgroundTasksMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `transcodeJob` | [operations.TranscodeJob](../../../sdk/models/operations/transcodejob.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getbackgroundtasksresponse.md b/docs/sdk/models/operations/getbackgroundtasksresponse.md new file mode 100644 index 00000000..d4d4e1a1 --- /dev/null +++ b/docs/sdk/models/operations/getbackgroundtasksresponse.md @@ -0,0 +1,21 @@ +# GetBackgroundTasksResponse + +## Example Usage + +```typescript +import { GetBackgroundTasksResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetBackgroundTasksResponse = { + contentType: "", + statusCode: 480574, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetBackgroundTasksResponseBody](../../../sdk/models/operations/getbackgroundtasksresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getbackgroundtasksresponsebody.md b/docs/sdk/models/operations/getbackgroundtasksresponsebody.md new file mode 100644 index 00000000..0dd449f0 --- /dev/null +++ b/docs/sdk/models/operations/getbackgroundtasksresponsebody.md @@ -0,0 +1,17 @@ +# GetBackgroundTasksResponseBody + +OK + +## Example Usage + +```typescript +import { GetBackgroundTasksResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetBackgroundTasksResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetBackgroundTasksMediaContainer](../../../sdk/models/operations/getbackgroundtasksmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getbackgroundtaskstype.md b/docs/sdk/models/operations/getbackgroundtaskstype.md new file mode 100644 index 00000000..975f466d --- /dev/null +++ b/docs/sdk/models/operations/getbackgroundtaskstype.md @@ -0,0 +1,15 @@ +# GetBackgroundTasksType + +## Example Usage + +```typescript +import { GetBackgroundTasksType } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetBackgroundTasksType = GetBackgroundTasksType.Transcode; +``` + +## Values + +| Name | Value | +| ----------- | ----------- | +| `Transcode` | transcode | \ No newline at end of file diff --git a/docs/sdk/models/operations/getbandwidthstatisticsaccount.md b/docs/sdk/models/operations/getbandwidthstatisticsaccount.md deleted file mode 100644 index f125f078..00000000 --- a/docs/sdk/models/operations/getbandwidthstatisticsaccount.md +++ /dev/null @@ -1,31 +0,0 @@ -# GetBandwidthStatisticsAccount - -## Example Usage - -```typescript -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", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `id` | *number* | :heavy_minus_sign: | N/A | 238960586 | -| `key` | *string* | :heavy_minus_sign: | N/A | /accounts/238960586 | -| `name` | *string* | :heavy_minus_sign: | N/A | Diane | -| `defaultAudioLanguage` | *string* | :heavy_minus_sign: | N/A | en | -| `autoSelectAudio` | *boolean* | :heavy_minus_sign: | N/A | true | -| `defaultSubtitleLanguage` | *string* | :heavy_minus_sign: | N/A | en | -| `subtitleMode` | *number* | :heavy_minus_sign: | N/A | 1 | -| `thumb` | *string* | :heavy_minus_sign: | N/A | https://plex.tv/users/50d83634246da1de/avatar?c=1707110967 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getbandwidthstatisticsdevice.md b/docs/sdk/models/operations/getbandwidthstatisticsdevice.md deleted file mode 100644 index ea381a75..00000000 --- a/docs/sdk/models/operations/getbandwidthstatisticsdevice.md +++ /dev/null @@ -1,25 +0,0 @@ -# GetBandwidthStatisticsDevice - -## Example Usage - -```typescript -import { GetBandwidthStatisticsDevice } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetBandwidthStatisticsDevice = { - id: 208, - name: "Roku Express", - platform: "Roku", - clientIdentifier: "793095d235660625108ef785cc7646e9", - createdAt: 1706470556, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `id` | *number* | :heavy_minus_sign: | N/A | 208 | -| `name` | *string* | :heavy_minus_sign: | N/A | Roku Express | -| `platform` | *string* | :heavy_minus_sign: | N/A | Roku | -| `clientIdentifier` | *string* | :heavy_minus_sign: | N/A | 793095d235660625108ef785cc7646e9 | -| `createdAt` | *number* | :heavy_minus_sign: | N/A | 1706470556 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getbandwidthstatisticsmediacontainer.md b/docs/sdk/models/operations/getbandwidthstatisticsmediacontainer.md deleted file mode 100644 index 5d23699a..00000000 --- a/docs/sdk/models/operations/getbandwidthstatisticsmediacontainer.md +++ /dev/null @@ -1,51 +0,0 @@ -# GetBandwidthStatisticsMediaContainer - -## Example Usage - -```typescript -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, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 5497 | -| `device` | [operations.GetBandwidthStatisticsDevice](../../../sdk/models/operations/getbandwidthstatisticsdevice.md)[] | :heavy_minus_sign: | N/A | | -| `account` | [operations.GetBandwidthStatisticsAccount](../../../sdk/models/operations/getbandwidthstatisticsaccount.md)[] | :heavy_minus_sign: | N/A | | -| `statisticsBandwidth` | [operations.StatisticsBandwidth](../../../sdk/models/operations/statisticsbandwidth.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getbandwidthstatisticsrequest.md b/docs/sdk/models/operations/getbandwidthstatisticsrequest.md deleted file mode 100644 index c4a99720..00000000 --- a/docs/sdk/models/operations/getbandwidthstatisticsrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetBandwidthStatisticsRequest - -## Example Usage - -```typescript -import { GetBandwidthStatisticsRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetBandwidthStatisticsRequest = { - timespan: 4, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `timespan` | *number* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| 4 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getbandwidthstatisticsresponse.md b/docs/sdk/models/operations/getbandwidthstatisticsresponse.md deleted file mode 100644 index dbcc2f0d..00000000 --- a/docs/sdk/models/operations/getbandwidthstatisticsresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetBandwidthStatisticsResponse - -## Example Usage - -```typescript -import { GetBandwidthStatisticsResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetBandwidthStatisticsResponse = { - contentType: "", - statusCode: 430843, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetBandwidthStatisticsResponseBody](../../../sdk/models/operations/getbandwidthstatisticsresponsebody.md) | :heavy_minus_sign: | Bandwidth Statistics | \ No newline at end of file diff --git a/docs/sdk/models/operations/getbandwidthstatisticsresponsebody.md b/docs/sdk/models/operations/getbandwidthstatisticsresponsebody.md deleted file mode 100644 index ee9275fb..00000000 --- a/docs/sdk/models/operations/getbandwidthstatisticsresponsebody.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetBandwidthStatisticsResponseBody - -Bandwidth Statistics - -## Example Usage - -```typescript -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, - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetBandwidthStatisticsMediaContainer](../../../sdk/models/operations/getbandwidthstatisticsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getbannerimagerequest.md b/docs/sdk/models/operations/getbannerimagerequest.md deleted file mode 100644 index a508fede..00000000 --- a/docs/sdk/models/operations/getbannerimagerequest.md +++ /dev/null @@ -1,27 +0,0 @@ -# GetBannerImageRequest - -## Example Usage - -```typescript -import { GetBannerImageRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetBannerImageRequest = { - ratingKey: 9518, - width: 396, - height: 396, - minSize: 1, - upscale: 1, - xPlexToken: "CV5xoxjTpFKUzBTShsaf", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the children of. | 9518 | -| `width` | *number* | :heavy_check_mark: | N/A | 396 | -| `height` | *number* | :heavy_check_mark: | N/A | 396 | -| `minSize` | *number* | :heavy_check_mark: | N/A | 1 | -| `upscale` | *number* | :heavy_check_mark: | N/A | 1 | -| `xPlexToken` | *string* | :heavy_check_mark: | An authentication token, obtained from plex.tv | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/sdk/models/operations/getbannerimageresponse.md b/docs/sdk/models/operations/getbannerimageresponse.md deleted file mode 100644 index a2eb8cd8..00000000 --- a/docs/sdk/models/operations/getbannerimageresponse.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetBannerImageResponse - -## Example Usage - -```typescript -import { GetBannerImageResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | -| `responseStream` | *ReadableStream* | :heavy_minus_sign: | Successful response returning an image | -| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getbutlertasksresponse.md b/docs/sdk/models/operations/getbutlertasksresponse.md deleted file mode 100644 index 4f7d8f9e..00000000 --- a/docs/sdk/models/operations/getbutlertasksresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetButlerTasksResponse - -## Example Usage - -```typescript -import { GetButlerTasksResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetButlerTasksResponse = { - contentType: "", - statusCode: 73689, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetButlerTasksResponseBody](../../../sdk/models/operations/getbutlertasksresponsebody.md) | :heavy_minus_sign: | All butler tasks | \ No newline at end of file diff --git a/docs/sdk/models/operations/getbutlertasksresponsebody.md b/docs/sdk/models/operations/getbutlertasksresponsebody.md deleted file mode 100644 index 24450a58..00000000 --- a/docs/sdk/models/operations/getbutlertasksresponsebody.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetButlerTasksResponseBody - -All butler tasks - -## Example Usage - -```typescript -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", - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `butlerTasks` | [operations.ButlerTasks](../../../sdk/models/operations/butlertasks.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcategoriesglobals.md b/docs/sdk/models/operations/getcategoriesglobals.md new file mode 100644 index 00000000..f1fb13c6 --- /dev/null +++ b/docs/sdk/models/operations/getcategoriesglobals.md @@ -0,0 +1,35 @@ +# GetCategoriesGlobals + +## Example Usage + +```typescript +import { GetCategoriesGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCategoriesGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcategoriesrequest.md b/docs/sdk/models/operations/getcategoriesrequest.md new file mode 100644 index 00000000..aaa31ae4 --- /dev/null +++ b/docs/sdk/models/operations/getcategoriesrequest.md @@ -0,0 +1,27 @@ +# GetCategoriesRequest + +## Example Usage + +```typescript +import { GetCategoriesRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCategoriesRequest = { + sectionId: 164120, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcategoriesresponse.md b/docs/sdk/models/operations/getcategoriesresponse.md new file mode 100644 index 00000000..b9452708 --- /dev/null +++ b/docs/sdk/models/operations/getcategoriesresponse.md @@ -0,0 +1,21 @@ +# GetCategoriesResponse + +## Example Usage + +```typescript +import { GetCategoriesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCategoriesResponse = { + contentType: "", + statusCode: 950721, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithArtwork` | [shared.MediaContainerWithArtwork](../../../sdk/models/shared/mediacontainerwithartwork.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getchannelsglobals.md b/docs/sdk/models/operations/getchannelsglobals.md new file mode 100644 index 00000000..ad850afe --- /dev/null +++ b/docs/sdk/models/operations/getchannelsglobals.md @@ -0,0 +1,35 @@ +# GetChannelsGlobals + +## Example Usage + +```typescript +import { GetChannelsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetChannelsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getchannelsmediacontainer.md b/docs/sdk/models/operations/getchannelsmediacontainer.md new file mode 100644 index 00000000..219a3691 --- /dev/null +++ b/docs/sdk/models/operations/getchannelsmediacontainer.md @@ -0,0 +1,24 @@ +# GetChannelsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetChannelsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetChannelsMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `channel` | [shared.Channel](../../../sdk/models/shared/channel.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getchannelsrequest.md b/docs/sdk/models/operations/getchannelsrequest.md new file mode 100644 index 00000000..31b7fa9e --- /dev/null +++ b/docs/sdk/models/operations/getchannelsrequest.md @@ -0,0 +1,27 @@ +# GetChannelsRequest + +## Example Usage + +```typescript +import { GetChannelsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetChannelsRequest = { + lineup: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `lineup` | *string* | :heavy_check_mark: | The URI describing the lineup | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getchannelsresponse.md b/docs/sdk/models/operations/getchannelsresponse.md new file mode 100644 index 00000000..2796d495 --- /dev/null +++ b/docs/sdk/models/operations/getchannelsresponse.md @@ -0,0 +1,29 @@ +# GetChannelsResponse + +## Example Usage + +```typescript +import { GetChannelsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetChannelsResponse = { + contentType: "", + statusCode: 118773, + headers: { + "key": [], + "key1": [ + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetChannelsResponseBody](../../../sdk/models/operations/getchannelsresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getchannelsresponsebody.md b/docs/sdk/models/operations/getchannelsresponsebody.md new file mode 100644 index 00000000..879e69f5 --- /dev/null +++ b/docs/sdk/models/operations/getchannelsresponsebody.md @@ -0,0 +1,17 @@ +# GetChannelsResponseBody + +OK + +## Example Usage + +```typescript +import { GetChannelsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetChannelsResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetChannelsMediaContainer](../../../sdk/models/operations/getchannelsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getchapterimageglobals.md b/docs/sdk/models/operations/getchapterimageglobals.md new file mode 100644 index 00000000..9d74fa0e --- /dev/null +++ b/docs/sdk/models/operations/getchapterimageglobals.md @@ -0,0 +1,35 @@ +# GetChapterImageGlobals + +## Example Usage + +```typescript +import { GetChapterImageGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetChapterImageGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getchapterimagerequest.md b/docs/sdk/models/operations/getchapterimagerequest.md new file mode 100644 index 00000000..ee3686cc --- /dev/null +++ b/docs/sdk/models/operations/getchapterimagerequest.md @@ -0,0 +1,29 @@ +# GetChapterImageRequest + +## Example Usage + +```typescript +import { GetChapterImageRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetChapterImageRequest = { + mediaId: 366354, + chapter: 627388, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `mediaId` | *number* | :heavy_check_mark: | The id of the media item | | +| `chapter` | *number* | :heavy_check_mark: | The index of the chapter | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getchapterimageresponse.md b/docs/sdk/models/operations/getchapterimageresponse.md new file mode 100644 index 00000000..3966462f --- /dev/null +++ b/docs/sdk/models/operations/getchapterimageresponse.md @@ -0,0 +1,18 @@ +# GetChapterImageResponse + +## Example Usage + +```typescript +import { GetChapterImageResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | +| `responseStream` | *ReadableStream* | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getclusterglobals.md b/docs/sdk/models/operations/getclusterglobals.md new file mode 100644 index 00000000..094b36ad --- /dev/null +++ b/docs/sdk/models/operations/getclusterglobals.md @@ -0,0 +1,35 @@ +# GetClusterGlobals + +## Example Usage + +```typescript +import { GetClusterGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetClusterGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getclusterrequest.md b/docs/sdk/models/operations/getclusterrequest.md new file mode 100644 index 00000000..dd9cd1ad --- /dev/null +++ b/docs/sdk/models/operations/getclusterrequest.md @@ -0,0 +1,27 @@ +# GetClusterRequest + +## Example Usage + +```typescript +import { GetClusterRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetClusterRequest = { + sectionId: 649212, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getclusterresponse.md b/docs/sdk/models/operations/getclusterresponse.md new file mode 100644 index 00000000..ddc0dc65 --- /dev/null +++ b/docs/sdk/models/operations/getclusterresponse.md @@ -0,0 +1,21 @@ +# GetClusterResponse + +## Example Usage + +```typescript +import { GetClusterResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetClusterResponse = { + contentType: "", + statusCode: 215011, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithArtwork` | [shared.MediaContainerWithArtwork](../../../sdk/models/shared/mediacontainerwithartwork.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcollectionimageglobals.md b/docs/sdk/models/operations/getcollectionimageglobals.md new file mode 100644 index 00000000..d735e957 --- /dev/null +++ b/docs/sdk/models/operations/getcollectionimageglobals.md @@ -0,0 +1,35 @@ +# GetCollectionImageGlobals + +## Example Usage + +```typescript +import { GetCollectionImageGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCollectionImageGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcollectionimagerequest.md b/docs/sdk/models/operations/getcollectionimagerequest.md new file mode 100644 index 00000000..c4fdff39 --- /dev/null +++ b/docs/sdk/models/operations/getcollectionimagerequest.md @@ -0,0 +1,30 @@ +# GetCollectionImageRequest + +## Example Usage + +```typescript +import { GetCollectionImageRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCollectionImageRequest = { + collectionId: 381528, + updatedAt: 826668, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `collectionId` | *number* | :heavy_check_mark: | The collection id | | +| `updatedAt` | *number* | :heavy_check_mark: | The update time of the image. Used for busting cache. | | +| `composite` | [shared.Composite](../../../sdk/models/shared/composite.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcollectionimageresponse.md b/docs/sdk/models/operations/getcollectionimageresponse.md new file mode 100644 index 00000000..e08b7c67 --- /dev/null +++ b/docs/sdk/models/operations/getcollectionimageresponse.md @@ -0,0 +1,18 @@ +# GetCollectionImageResponse + +## Example Usage + +```typescript +import { GetCollectionImageResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | +| `responseStream` | *ReadableStream* | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcollectionitemsglobals.md b/docs/sdk/models/operations/getcollectionitemsglobals.md new file mode 100644 index 00000000..68cf9cf0 --- /dev/null +++ b/docs/sdk/models/operations/getcollectionitemsglobals.md @@ -0,0 +1,35 @@ +# GetCollectionItemsGlobals + +## Example Usage + +```typescript +import { GetCollectionItemsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCollectionItemsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcollectionitemsrequest.md b/docs/sdk/models/operations/getcollectionitemsrequest.md new file mode 100644 index 00000000..57ade285 --- /dev/null +++ b/docs/sdk/models/operations/getcollectionitemsrequest.md @@ -0,0 +1,27 @@ +# GetCollectionItemsRequest + +## Example Usage + +```typescript +import { GetCollectionItemsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCollectionItemsRequest = { + collectionId: 398492, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `collectionId` | *number* | :heavy_check_mark: | The collection id | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcollectionitemsresponse.md b/docs/sdk/models/operations/getcollectionitemsresponse.md new file mode 100644 index 00000000..c57dd53d --- /dev/null +++ b/docs/sdk/models/operations/getcollectionitemsresponse.md @@ -0,0 +1,21 @@ +# GetCollectionItemsResponse + +## Example Usage + +```typescript +import { GetCollectionItemsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCollectionItemsResponse = { + contentType: "", + statusCode: 444329, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcollectionsglobals.md b/docs/sdk/models/operations/getcollectionsglobals.md new file mode 100644 index 00000000..bd89c23d --- /dev/null +++ b/docs/sdk/models/operations/getcollectionsglobals.md @@ -0,0 +1,35 @@ +# GetCollectionsGlobals + +## Example Usage + +```typescript +import { GetCollectionsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCollectionsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcollectionsrequest.md b/docs/sdk/models/operations/getcollectionsrequest.md new file mode 100644 index 00000000..9d43f253 --- /dev/null +++ b/docs/sdk/models/operations/getcollectionsrequest.md @@ -0,0 +1,28 @@ +# GetCollectionsRequest + +## Example Usage + +```typescript +import { GetCollectionsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCollectionsRequest = { + sectionId: 298004, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | +| `mediaQuery` | [shared.MediaQuery](../../../sdk/models/shared/mediaquery.md) | :heavy_minus_sign: | This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcollectionsresponse.md b/docs/sdk/models/operations/getcollectionsresponse.md new file mode 100644 index 00000000..80cb7106 --- /dev/null +++ b/docs/sdk/models/operations/getcollectionsresponse.md @@ -0,0 +1,38 @@ +# GetCollectionsResponse + +## Example Usage + +```typescript +import { GetCollectionsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCollectionsResponse = { + contentType: "", + statusCode: 652615, + headers: { + "key": [ + "", + "", + "", + ], + "key1": [ + "", + "", + ], + "key2": [ + "", + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcolorsglobals.md b/docs/sdk/models/operations/getcolorsglobals.md new file mode 100644 index 00000000..d59e472b --- /dev/null +++ b/docs/sdk/models/operations/getcolorsglobals.md @@ -0,0 +1,35 @@ +# GetColorsGlobals + +## Example Usage + +```typescript +import { GetColorsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetColorsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcolorsmediacontainer.md b/docs/sdk/models/operations/getcolorsmediacontainer.md new file mode 100644 index 00000000..01eae059 --- /dev/null +++ b/docs/sdk/models/operations/getcolorsmediacontainer.md @@ -0,0 +1,24 @@ +# GetColorsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetColorsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetColorsMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `ultraBlurColors` | [operations.UltraBlurColor](../../../sdk/models/operations/ultrablurcolor.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcolorsrequest.md b/docs/sdk/models/operations/getcolorsrequest.md new file mode 100644 index 00000000..0f040847 --- /dev/null +++ b/docs/sdk/models/operations/getcolorsrequest.md @@ -0,0 +1,27 @@ +# GetColorsRequest + +## Example Usage + +```typescript +import { GetColorsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetColorsRequest = { + url: "/library/metadata/217745/art/1718931408", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `url` | *string* | :heavy_minus_sign: | Url for image which requires color extraction. Can be relative PMS library path or absolute url. | /library/metadata/217745/art/1718931408 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcolorsresponse.md b/docs/sdk/models/operations/getcolorsresponse.md new file mode 100644 index 00000000..d2189ea1 --- /dev/null +++ b/docs/sdk/models/operations/getcolorsresponse.md @@ -0,0 +1,21 @@ +# GetColorsResponse + +## Example Usage + +```typescript +import { GetColorsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetColorsResponse = { + contentType: "", + statusCode: 513090, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetColorsResponseBody](../../../sdk/models/operations/getcolorsresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcolorsresponsebody.md b/docs/sdk/models/operations/getcolorsresponsebody.md new file mode 100644 index 00000000..bf7dffa2 --- /dev/null +++ b/docs/sdk/models/operations/getcolorsresponsebody.md @@ -0,0 +1,17 @@ +# GetColorsResponseBody + +OK + +## Example Usage + +```typescript +import { GetColorsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetColorsResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetColorsMediaContainer](../../../sdk/models/operations/getcolorsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcommonglobals.md b/docs/sdk/models/operations/getcommonglobals.md new file mode 100644 index 00000000..4e25a364 --- /dev/null +++ b/docs/sdk/models/operations/getcommonglobals.md @@ -0,0 +1,35 @@ +# GetCommonGlobals + +## Example Usage + +```typescript +import { GetCommonGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCommonGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcommonrequest.md b/docs/sdk/models/operations/getcommonrequest.md new file mode 100644 index 00000000..a2d23606 --- /dev/null +++ b/docs/sdk/models/operations/getcommonrequest.md @@ -0,0 +1,29 @@ +# GetCommonRequest + +## Example Usage + +```typescript +import { GetCommonRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCommonRequest = { + sectionId: 840014, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | +| `type` | *number* | :heavy_minus_sign: | Item type | | +| `mediaQuery` | [shared.MediaQuery](../../../sdk/models/shared/mediaquery.md) | :heavy_minus_sign: | This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcommonresponse.md b/docs/sdk/models/operations/getcommonresponse.md new file mode 100644 index 00000000..13c72621 --- /dev/null +++ b/docs/sdk/models/operations/getcommonresponse.md @@ -0,0 +1,35 @@ +# GetCommonResponse + +## Example Usage + +```typescript +import { GetCommonResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCommonResponse = { + contentType: "", + statusCode: 492616, + headers: { + "key": [ + "", + "", + "", + ], + "key1": [], + "key2": [ + "", + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcompanionsdataresponse.md b/docs/sdk/models/operations/getcompanionsdataresponse.md deleted file mode 100644 index 4184c237..00000000 --- a/docs/sdk/models/operations/getcompanionsdataresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetCompanionsDataResponse - -## Example Usage - -```typescript -import { GetCompanionsDataResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetCompanionsDataResponse = { - contentType: "", - statusCode: 133605, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `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 | -| `responseBodies` | [operations.ResponseBody](../../../sdk/models/operations/responsebody.md)[] | :heavy_minus_sign: | Companions Data | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcontinuewatchingglobals.md b/docs/sdk/models/operations/getcontinuewatchingglobals.md new file mode 100644 index 00000000..1c2c6e10 --- /dev/null +++ b/docs/sdk/models/operations/getcontinuewatchingglobals.md @@ -0,0 +1,35 @@ +# GetContinueWatchingGlobals + +## Example Usage + +```typescript +import { GetContinueWatchingGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetContinueWatchingGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcontinuewatchingmediacontainer.md b/docs/sdk/models/operations/getcontinuewatchingmediacontainer.md new file mode 100644 index 00000000..411a49fa --- /dev/null +++ b/docs/sdk/models/operations/getcontinuewatchingmediacontainer.md @@ -0,0 +1,187 @@ +# GetContinueWatchingMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetContinueWatchingMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetContinueWatchingMediaContainer = { + hub: [ + { + type: "track", + context: "hub.home.onDeck", + hubIdentifier: "home.onDeck", + key: "/hubs/sections/home/onDeck", + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + size: 1, + subtype: "podcast", + totalSize: 8, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `hub` | [shared.Hub](../../../sdk/models/shared/hub.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcontinuewatchingrequest.md b/docs/sdk/models/operations/getcontinuewatchingrequest.md new file mode 100644 index 00000000..f4b849e6 --- /dev/null +++ b/docs/sdk/models/operations/getcontinuewatchingrequest.md @@ -0,0 +1,25 @@ +# GetContinueWatchingRequest + +## Example Usage + +```typescript +import { GetContinueWatchingRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetContinueWatchingRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `count` | *number* | :heavy_minus_sign: | Limit results to count items | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcontinuewatchingresponse.md b/docs/sdk/models/operations/getcontinuewatchingresponse.md new file mode 100644 index 00000000..4b14ac31 --- /dev/null +++ b/docs/sdk/models/operations/getcontinuewatchingresponse.md @@ -0,0 +1,27 @@ +# GetContinueWatchingResponse + +## Example Usage + +```typescript +import { GetContinueWatchingResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetContinueWatchingResponse = { + contentType: "", + statusCode: 803731, + headers: { + "key": [ + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetContinueWatchingResponseBody](../../../sdk/models/operations/getcontinuewatchingresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcontinuewatchingresponsebody.md b/docs/sdk/models/operations/getcontinuewatchingresponsebody.md new file mode 100644 index 00000000..cd83220a --- /dev/null +++ b/docs/sdk/models/operations/getcontinuewatchingresponsebody.md @@ -0,0 +1,183 @@ +# GetContinueWatchingResponseBody + +OK + +## Example Usage + +```typescript +import { GetContinueWatchingResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetContinueWatchingResponseBody = { + mediaContainer: { + hub: [ + { + type: "track", + context: "hub.home.onDeck", + hubIdentifier: "home.onDeck", + key: "/hubs/sections/home/onDeck", + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: + "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + size: 1, + subtype: "podcast", + totalSize: 8, + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetContinueWatchingMediaContainer](../../../sdk/models/operations/getcontinuewatchingmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcountriescountry.md b/docs/sdk/models/operations/getcountriescountry.md new file mode 100644 index 00000000..8e568cbd --- /dev/null +++ b/docs/sdk/models/operations/getcountriescountry.md @@ -0,0 +1,22 @@ +# GetCountriesCountry + +## Example Usage + +```typescript +import { GetCountriesCountry } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCountriesCountry = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `code` | *string* | :heavy_minus_sign: | Three letter code | +| `example` | *string* | :heavy_minus_sign: | N/A | +| `flavor` | [operations.Flavor](../../../sdk/models/operations/flavor.md) | :heavy_minus_sign: | - `0`: The country is divided into regions, and following the key will lead to a list of regions.
- `1`: The county is divided by postal codes, and an example code is returned in `example`.
- `2`: The country has a single postal code, returned in `example`.
| +| `key` | *string* | :heavy_minus_sign: | N/A | +| `language` | *string* | :heavy_minus_sign: | Three letter language code | +| `languageTitle` | *string* | :heavy_minus_sign: | The title of the language | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcountrieslibrarydirectory.md b/docs/sdk/models/operations/getcountrieslibrarydirectory.md deleted file mode 100644 index 56e8988d..00000000 --- a/docs/sdk/models/operations/getcountrieslibrarydirectory.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetCountriesLibraryDirectory - -## Example Usage - -```typescript -import { GetCountriesLibraryDirectory } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetCountriesLibraryDirectory = { - fastKey: "/library/sections/2/all?country=15491", - key: "15491", - title: "Japan", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| `fastKey` | *string* | :heavy_check_mark: | N/A | /library/sections/2/all?country=15491 | -| `key` | *string* | :heavy_check_mark: | N/A | 15491 | -| `title` | *string* | :heavy_check_mark: | N/A | Japan | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcountrieslibrarymediacontainer.md b/docs/sdk/models/operations/getcountrieslibrarymediacontainer.md deleted file mode 100644 index 677de200..00000000 --- a/docs/sdk/models/operations/getcountrieslibrarymediacontainer.md +++ /dev/null @@ -1,47 +0,0 @@ -# GetCountriesLibraryMediaContainer - -## Example Usage - -```typescript -import { GetCountriesLibraryMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetCountriesLibraryMediaContainer = { - size: 50, - allowSync: false, - art: "/:/resources/show-fanart.jpg", - content: "secondary", - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1734362201, - nocache: true, - thumb: "/:/resources/show.png", - title1: "TV Series", - title2: "By Starring Actor", - viewGroup: "secondary", - directory: [ - { - fastKey: "/library/sections/2/all?country=15491", - key: "15491", - title: "Japan", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `art` | *string* | :heavy_check_mark: | URL for the background artwork of the media container. | /:/resources/show-fanart.jpg | -| `content` | *string* | :heavy_check_mark: | The content type or mode. | secondary | -| `identifier` | *string* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `mediaTagPrefix` | *string* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | -| `mediaTagVersion` | *number* | :heavy_check_mark: | The version number for media tags. | 1734362201 | -| `nocache` | *boolean* | :heavy_check_mark: | Specifies whether caching is disabled. | true | -| `thumb` | *string* | :heavy_check_mark: | URL for the thumbnail image of the media container. | /:/resources/show.png | -| `title1` | *string* | :heavy_check_mark: | The primary title of the media container. | TV Series | -| `title2` | *string* | :heavy_check_mark: | The secondary title of the media container. | By Starring Actor | -| `viewGroup` | *string* | :heavy_check_mark: | Identifier for the view group layout. | secondary | -| `directory` | [operations.GetCountriesLibraryDirectory](../../../sdk/models/operations/getcountrieslibrarydirectory.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcountrieslibraryqueryparamtype.md b/docs/sdk/models/operations/getcountrieslibraryqueryparamtype.md deleted file mode 100644 index f9105cda..00000000 --- a/docs/sdk/models/operations/getcountrieslibraryqueryparamtype.md +++ /dev/null @@ -1,35 +0,0 @@ -# GetCountriesLibraryQueryParamType - -The type of media to retrieve or filter by. -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 - - -## Example Usage - -```typescript -import { GetCountriesLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetCountriesLibraryQueryParamType = - GetCountriesLibraryQueryParamType.TvShow; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Artist` | 5 | -| `Album` | 6 | -| `Track` | 7 | -| `PhotoAlbum` | 8 | -| `Photo` | 9 | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcountrieslibraryrequest.md b/docs/sdk/models/operations/getcountrieslibraryrequest.md deleted file mode 100644 index a9768611..00000000 --- a/docs/sdk/models/operations/getcountrieslibraryrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetCountriesLibraryRequest - -## Example Usage - -```typescript -import { GetCountriesLibraryQueryParamType, GetCountriesLibraryRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetCountriesLibraryRequest = { - sectionKey: 9518, - type: GetCountriesLibraryQueryParamType.TvShow, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | -| `type` | [operations.GetCountriesLibraryQueryParamType](../../../sdk/models/operations/getcountrieslibraryqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
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
| 2 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcountrieslibraryresponse.md b/docs/sdk/models/operations/getcountrieslibraryresponse.md deleted file mode 100644 index 11442858..00000000 --- a/docs/sdk/models/operations/getcountrieslibraryresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetCountriesLibraryResponse - -## Example Usage - -```typescript -import { GetCountriesLibraryResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetCountriesLibraryResponse = { - contentType: "", - statusCode: 138249, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetCountriesLibraryResponseBody](../../../sdk/models/operations/getcountrieslibraryresponsebody.md) | :heavy_minus_sign: | Successful response containing media container data. | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcountrieslibraryresponsebody.md b/docs/sdk/models/operations/getcountrieslibraryresponsebody.md deleted file mode 100644 index cfea5461..00000000 --- a/docs/sdk/models/operations/getcountrieslibraryresponsebody.md +++ /dev/null @@ -1,39 +0,0 @@ -# GetCountriesLibraryResponseBody - -Successful response containing media container data. - -## Example Usage - -```typescript -import { GetCountriesLibraryResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetCountriesLibraryResponseBody = { - mediaContainer: { - size: 50, - allowSync: false, - art: "/:/resources/show-fanart.jpg", - content: "secondary", - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1734362201, - nocache: true, - thumb: "/:/resources/show.png", - title1: "TV Series", - title2: "By Starring Actor", - viewGroup: "secondary", - directory: [ - { - fastKey: "/library/sections/2/all?country=15491", - key: "15491", - title: "Japan", - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetCountriesLibraryMediaContainer](../../../sdk/models/operations/getcountrieslibrarymediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcountrieslineupsglobals.md b/docs/sdk/models/operations/getcountrieslineupsglobals.md new file mode 100644 index 00000000..8078213b --- /dev/null +++ b/docs/sdk/models/operations/getcountrieslineupsglobals.md @@ -0,0 +1,35 @@ +# GetCountriesLineupsGlobals + +## Example Usage + +```typescript +import { GetCountriesLineupsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCountriesLineupsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcountrieslineupsrequest.md b/docs/sdk/models/operations/getcountrieslineupsrequest.md new file mode 100644 index 00000000..e195316f --- /dev/null +++ b/docs/sdk/models/operations/getcountrieslineupsrequest.md @@ -0,0 +1,30 @@ +# GetCountriesLineupsRequest + +## Example Usage + +```typescript +import { GetCountriesLineupsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCountriesLineupsRequest = { + country: "Eritrea", + epgId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `country` | *string* | :heavy_check_mark: | 3 letter country code | | +| `epgId` | *string* | :heavy_check_mark: | The `providerIdentifier` of the provider | | +| `postalCode` | *string* | :heavy_minus_sign: | The postal code for the lineups to fetch | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcountrieslineupsresponse.md b/docs/sdk/models/operations/getcountrieslineupsresponse.md new file mode 100644 index 00000000..8c08307b --- /dev/null +++ b/docs/sdk/models/operations/getcountrieslineupsresponse.md @@ -0,0 +1,21 @@ +# GetCountriesLineupsResponse + +## Example Usage + +```typescript +import { GetCountriesLineupsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCountriesLineupsResponse = { + contentType: "", + statusCode: 647931, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithLineup` | [shared.MediaContainerWithLineup](../../../sdk/models/shared/mediacontainerwithlineup.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcountriesmediacontainer.md b/docs/sdk/models/operations/getcountriesmediacontainer.md new file mode 100644 index 00000000..32514360 --- /dev/null +++ b/docs/sdk/models/operations/getcountriesmediacontainer.md @@ -0,0 +1,24 @@ +# GetCountriesMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetCountriesMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCountriesMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `country` | [operations.GetCountriesCountry](../../../sdk/models/operations/getcountriescountry.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcountriesresponse.md b/docs/sdk/models/operations/getcountriesresponse.md new file mode 100644 index 00000000..84124b51 --- /dev/null +++ b/docs/sdk/models/operations/getcountriesresponse.md @@ -0,0 +1,27 @@ +# GetCountriesResponse + +## Example Usage + +```typescript +import { GetCountriesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCountriesResponse = { + contentType: "", + statusCode: 474861, + headers: { + "key": [ + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetCountriesResponseBody](../../../sdk/models/operations/getcountriesresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcountriesresponsebody.md b/docs/sdk/models/operations/getcountriesresponsebody.md new file mode 100644 index 00000000..1edbdabd --- /dev/null +++ b/docs/sdk/models/operations/getcountriesresponsebody.md @@ -0,0 +1,17 @@ +# GetCountriesResponseBody + +OK + +## Example Usage + +```typescript +import { GetCountriesResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCountriesResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetCountriesMediaContainer](../../../sdk/models/operations/getcountriesmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcountryregionscountry.md b/docs/sdk/models/operations/getcountryregionscountry.md new file mode 100644 index 00000000..e91eab6d --- /dev/null +++ b/docs/sdk/models/operations/getcountryregionscountry.md @@ -0,0 +1,18 @@ +# GetCountryRegionsCountry + +## Example Usage + +```typescript +import { GetCountryRegionsCountry } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCountryRegionsCountry = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `national` | *boolean* | :heavy_minus_sign: | N/A | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcountryregionsglobals.md b/docs/sdk/models/operations/getcountryregionsglobals.md new file mode 100644 index 00000000..71f4193b --- /dev/null +++ b/docs/sdk/models/operations/getcountryregionsglobals.md @@ -0,0 +1,35 @@ +# GetCountryRegionsGlobals + +## Example Usage + +```typescript +import { GetCountryRegionsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCountryRegionsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcountryregionsmediacontainer.md b/docs/sdk/models/operations/getcountryregionsmediacontainer.md new file mode 100644 index 00000000..795e822f --- /dev/null +++ b/docs/sdk/models/operations/getcountryregionsmediacontainer.md @@ -0,0 +1,24 @@ +# GetCountryRegionsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetCountryRegionsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCountryRegionsMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `country` | [operations.GetCountryRegionsCountry](../../../sdk/models/operations/getcountryregionscountry.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcountryregionsrequest.md b/docs/sdk/models/operations/getcountryregionsrequest.md new file mode 100644 index 00000000..9663880b --- /dev/null +++ b/docs/sdk/models/operations/getcountryregionsrequest.md @@ -0,0 +1,29 @@ +# GetCountryRegionsRequest + +## Example Usage + +```typescript +import { GetCountryRegionsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCountryRegionsRequest = { + country: "American Samoa", + epgId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `country` | *string* | :heavy_check_mark: | 3 letter country code | | +| `epgId` | *string* | :heavy_check_mark: | The `providerIdentifier` of the provider | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcountryregionsresponse.md b/docs/sdk/models/operations/getcountryregionsresponse.md new file mode 100644 index 00000000..1af725d0 --- /dev/null +++ b/docs/sdk/models/operations/getcountryregionsresponse.md @@ -0,0 +1,30 @@ +# GetCountryRegionsResponse + +## Example Usage + +```typescript +import { GetCountryRegionsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCountryRegionsResponse = { + contentType: "", + statusCode: 68860, + headers: { + "key": [ + "", + "", + "", + ], + "key1": [], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetCountryRegionsResponseBody](../../../sdk/models/operations/getcountryregionsresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getcountryregionsresponsebody.md b/docs/sdk/models/operations/getcountryregionsresponsebody.md new file mode 100644 index 00000000..0522c5de --- /dev/null +++ b/docs/sdk/models/operations/getcountryregionsresponsebody.md @@ -0,0 +1,17 @@ +# GetCountryRegionsResponseBody + +OK + +## Example Usage + +```typescript +import { GetCountryRegionsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetCountryRegionsResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetCountryRegionsMediaContainer](../../../sdk/models/operations/getcountryregionsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdevicedetailsglobals.md b/docs/sdk/models/operations/getdevicedetailsglobals.md new file mode 100644 index 00000000..4fc97c80 --- /dev/null +++ b/docs/sdk/models/operations/getdevicedetailsglobals.md @@ -0,0 +1,35 @@ +# GetDeviceDetailsGlobals + +## Example Usage + +```typescript +import { GetDeviceDetailsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDeviceDetailsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdevicedetailsrequest.md b/docs/sdk/models/operations/getdevicedetailsrequest.md new file mode 100644 index 00000000..7e5ce6e7 --- /dev/null +++ b/docs/sdk/models/operations/getdevicedetailsrequest.md @@ -0,0 +1,27 @@ +# GetDeviceDetailsRequest + +## Example Usage + +```typescript +import { GetDeviceDetailsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDeviceDetailsRequest = { + deviceId: 307102, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `deviceId` | *number* | :heavy_check_mark: | The ID of the device. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdevicedetailsresponse.md b/docs/sdk/models/operations/getdevicedetailsresponse.md new file mode 100644 index 00000000..7fedd41c --- /dev/null +++ b/docs/sdk/models/operations/getdevicedetailsresponse.md @@ -0,0 +1,21 @@ +# GetDeviceDetailsResponse + +## Example Usage + +```typescript +import { GetDeviceDetailsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDeviceDetailsResponse = { + contentType: "", + statusCode: 736754, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithDevice` | [shared.MediaContainerWithDevice](../../../sdk/models/shared/mediacontainerwithdevice.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdeviceschannelsglobals.md b/docs/sdk/models/operations/getdeviceschannelsglobals.md new file mode 100644 index 00000000..94a5f659 --- /dev/null +++ b/docs/sdk/models/operations/getdeviceschannelsglobals.md @@ -0,0 +1,35 @@ +# GetDevicesChannelsGlobals + +## Example Usage + +```typescript +import { GetDevicesChannelsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDevicesChannelsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdeviceschannelsmediacontainer.md b/docs/sdk/models/operations/getdeviceschannelsmediacontainer.md new file mode 100644 index 00000000..f8c7d751 --- /dev/null +++ b/docs/sdk/models/operations/getdeviceschannelsmediacontainer.md @@ -0,0 +1,24 @@ +# GetDevicesChannelsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetDevicesChannelsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDevicesChannelsMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `deviceChannel` | [operations.DeviceChannel](../../../sdk/models/operations/devicechannel.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdeviceschannelsrequest.md b/docs/sdk/models/operations/getdeviceschannelsrequest.md new file mode 100644 index 00000000..40dc0445 --- /dev/null +++ b/docs/sdk/models/operations/getdeviceschannelsrequest.md @@ -0,0 +1,27 @@ +# GetDevicesChannelsRequest + +## Example Usage + +```typescript +import { GetDevicesChannelsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDevicesChannelsRequest = { + deviceId: 81474, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `deviceId` | *number* | :heavy_check_mark: | The ID of the device. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdeviceschannelsresponse.md b/docs/sdk/models/operations/getdeviceschannelsresponse.md new file mode 100644 index 00000000..92452e95 --- /dev/null +++ b/docs/sdk/models/operations/getdeviceschannelsresponse.md @@ -0,0 +1,23 @@ +# GetDevicesChannelsResponse + +## Example Usage + +```typescript +import { GetDevicesChannelsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDevicesChannelsResponse = { + contentType: "", + statusCode: 63316, + headers: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetDevicesChannelsResponseBody](../../../sdk/models/operations/getdeviceschannelsresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdeviceschannelsresponsebody.md b/docs/sdk/models/operations/getdeviceschannelsresponsebody.md new file mode 100644 index 00000000..3c208d1b --- /dev/null +++ b/docs/sdk/models/operations/getdeviceschannelsresponsebody.md @@ -0,0 +1,17 @@ +# GetDevicesChannelsResponseBody + +OK + +## Example Usage + +```typescript +import { GetDevicesChannelsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDevicesChannelsResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetDevicesChannelsMediaContainer](../../../sdk/models/operations/getdeviceschannelsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdevicesmediacontainer.md b/docs/sdk/models/operations/getdevicesmediacontainer.md deleted file mode 100644 index d5dd0929..00000000 --- a/docs/sdk/models/operations/getdevicesmediacontainer.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetDevicesMediaContainer - -## Example Usage - -```typescript -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, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 151 | -| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.system.devices | -| `device` | [operations.Device](../../../sdk/models/operations/device.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdevicesresponse.md b/docs/sdk/models/operations/getdevicesresponse.md deleted file mode 100644 index 3d9a9489..00000000 --- a/docs/sdk/models/operations/getdevicesresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetDevicesResponse - -## Example Usage - -```typescript -import { GetDevicesResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetDevicesResponse = { - contentType: "", - statusCode: 113704, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetDevicesResponseBody](../../../sdk/models/operations/getdevicesresponsebody.md) | :heavy_minus_sign: | Devices | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdevicesresponsebody.md b/docs/sdk/models/operations/getdevicesresponsebody.md deleted file mode 100644 index cafd76a7..00000000 --- a/docs/sdk/models/operations/getdevicesresponsebody.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetDevicesResponseBody - -Devices - -## Example Usage - -```typescript -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, - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetDevicesMediaContainer](../../../sdk/models/operations/getdevicesmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdownloadqueuedownloadqueue.md b/docs/sdk/models/operations/getdownloadqueuedownloadqueue.md new file mode 100644 index 00000000..92af841f --- /dev/null +++ b/docs/sdk/models/operations/getdownloadqueuedownloadqueue.md @@ -0,0 +1,17 @@ +# GetDownloadQueueDownloadQueue + +## Example Usage + +```typescript +import { GetDownloadQueueDownloadQueue } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDownloadQueueDownloadQueue = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `itemCount` | *number* | :heavy_minus_sign: | N/A | +| `status` | [operations.GetDownloadQueueStatus](../../../sdk/models/operations/getdownloadqueuestatus.md) | :heavy_minus_sign: | The state of this queue
- deciding: At least one item is still being decided
- waiting: At least one item is waiting for transcode and none are currently transcoding
- processing: At least one item is being transcoded
- done: All items are available (or potentially expired)
- error: At least one item has encountered an error
| \ No newline at end of file diff --git a/docs/sdk/models/operations/getdownloadqueueglobals.md b/docs/sdk/models/operations/getdownloadqueueglobals.md new file mode 100644 index 00000000..56807011 --- /dev/null +++ b/docs/sdk/models/operations/getdownloadqueueglobals.md @@ -0,0 +1,35 @@ +# GetDownloadQueueGlobals + +## Example Usage + +```typescript +import { GetDownloadQueueGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDownloadQueueGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdownloadqueueitemsdecisionresult.md b/docs/sdk/models/operations/getdownloadqueueitemsdecisionresult.md new file mode 100644 index 00000000..00a9dc72 --- /dev/null +++ b/docs/sdk/models/operations/getdownloadqueueitemsdecisionresult.md @@ -0,0 +1,23 @@ +# GetDownloadQueueItemsDecisionResult + +## Example Usage + +```typescript +import { GetDownloadQueueItemsDecisionResult } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDownloadQueueItemsDecisionResult = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `availableBandwidth` | *number* | :heavy_minus_sign: | The maximum bitrate set when item was added | +| `directPlayDecisionCode` | *number* | :heavy_minus_sign: | N/A | +| `directPlayDecisionText` | *string* | :heavy_minus_sign: | N/A | +| `generalDecisionCode` | *number* | :heavy_minus_sign: | N/A | +| `generalDecisionText` | *string* | :heavy_minus_sign: | N/A | +| `mdeDecisionCode` | *number* | :heavy_minus_sign: | The code indicating the status of evaluation of playback when client indicates `hasMDE=1` | +| `mdeDecisionText` | *string* | :heavy_minus_sign: | Descriptive text for the above code | +| `transcodeDecisionCode` | *number* | :heavy_minus_sign: | N/A | +| `transcodeDecisionText` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdownloadqueueitemsdownloadqueueitem.md b/docs/sdk/models/operations/getdownloadqueueitemsdownloadqueueitem.md new file mode 100644 index 00000000..8739b914 --- /dev/null +++ b/docs/sdk/models/operations/getdownloadqueueitemsdownloadqueueitem.md @@ -0,0 +1,22 @@ +# GetDownloadQueueItemsDownloadQueueItem + +## Example Usage + +```typescript +import { GetDownloadQueueItemsDownloadQueueItem } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDownloadQueueItemsDownloadQueueItem = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `decisionResult` | [operations.GetDownloadQueueItemsDecisionResult](../../../sdk/models/operations/getdownloadqueueitemsdecisionresult.md) | :heavy_minus_sign: | N/A | +| `error` | *string* | :heavy_minus_sign: | The error encountered in transcoding or decision | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `queueId` | *number* | :heavy_minus_sign: | N/A | +| `status` | [operations.GetDownloadQueueItemsStatus](../../../sdk/models/operations/getdownloadqueueitemsstatus.md) | :heavy_minus_sign: | The state of the item:
- deciding: The item decision is pending
- waiting: The item is waiting for transcode
- processing: The item is being transcoded
- available: The item is available for download
- error: The item encountered an error in the decision or transcode
- expired: The transcoded item has timed out and is no longer available
| +| `transcode` | [operations.GetDownloadQueueItemsTranscode](../../../sdk/models/operations/getdownloadqueueitemstranscode.md) | :heavy_minus_sign: | The transcode session object which is not yet documented otherwise it'd be a $ref here. | +| `transcodeSession` | [shared.TranscodeSession](../../../sdk/models/shared/transcodesession.md) | :heavy_minus_sign: | The transcode session if item is currently being transcoded | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdownloadqueueitemsglobals.md b/docs/sdk/models/operations/getdownloadqueueitemsglobals.md new file mode 100644 index 00000000..445fc2d8 --- /dev/null +++ b/docs/sdk/models/operations/getdownloadqueueitemsglobals.md @@ -0,0 +1,35 @@ +# GetDownloadQueueItemsGlobals + +## Example Usage + +```typescript +import { GetDownloadQueueItemsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDownloadQueueItemsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdownloadqueueitemsmediacontainer.md b/docs/sdk/models/operations/getdownloadqueueitemsmediacontainer.md new file mode 100644 index 00000000..dc01e176 --- /dev/null +++ b/docs/sdk/models/operations/getdownloadqueueitemsmediacontainer.md @@ -0,0 +1,24 @@ +# GetDownloadQueueItemsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetDownloadQueueItemsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDownloadQueueItemsMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `downloadQueueItem` | [operations.GetDownloadQueueItemsDownloadQueueItem](../../../sdk/models/operations/getdownloadqueueitemsdownloadqueueitem.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdownloadqueueitemsrequest.md b/docs/sdk/models/operations/getdownloadqueueitemsrequest.md new file mode 100644 index 00000000..52bc02f7 --- /dev/null +++ b/docs/sdk/models/operations/getdownloadqueueitemsrequest.md @@ -0,0 +1,33 @@ +# GetDownloadQueueItemsRequest + +## Example Usage + +```typescript +import { GetDownloadQueueItemsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDownloadQueueItemsRequest = { + queueId: 144536, + itemId: [ + 32, + 345, + 23, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `queueId` | *number* | :heavy_check_mark: | The queue id | | +| `itemId` | *number*[] | :heavy_check_mark: | The item ids | [
32,
345,
23
] | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdownloadqueueitemsresponse.md b/docs/sdk/models/operations/getdownloadqueueitemsresponse.md new file mode 100644 index 00000000..038d2bd2 --- /dev/null +++ b/docs/sdk/models/operations/getdownloadqueueitemsresponse.md @@ -0,0 +1,21 @@ +# GetDownloadQueueItemsResponse + +## Example Usage + +```typescript +import { GetDownloadQueueItemsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDownloadQueueItemsResponse = { + contentType: "", + statusCode: 945638, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetDownloadQueueItemsResponseBody](../../../sdk/models/operations/getdownloadqueueitemsresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdownloadqueueitemsresponsebody.md b/docs/sdk/models/operations/getdownloadqueueitemsresponsebody.md new file mode 100644 index 00000000..01a01b53 --- /dev/null +++ b/docs/sdk/models/operations/getdownloadqueueitemsresponsebody.md @@ -0,0 +1,17 @@ +# GetDownloadQueueItemsResponseBody + +OK + +## Example Usage + +```typescript +import { GetDownloadQueueItemsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDownloadQueueItemsResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetDownloadQueueItemsMediaContainer](../../../sdk/models/operations/getdownloadqueueitemsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdownloadqueueitemsstatus.md b/docs/sdk/models/operations/getdownloadqueueitemsstatus.md new file mode 100644 index 00000000..82cbf72d --- /dev/null +++ b/docs/sdk/models/operations/getdownloadqueueitemsstatus.md @@ -0,0 +1,29 @@ +# GetDownloadQueueItemsStatus + +The state of the item: + - deciding: The item decision is pending + - waiting: The item is waiting for transcode + - processing: The item is being transcoded + - available: The item is available for download + - error: The item encountered an error in the decision or transcode + - expired: The transcoded item has timed out and is no longer available + + +## Example Usage + +```typescript +import { GetDownloadQueueItemsStatus } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDownloadQueueItemsStatus = GetDownloadQueueItemsStatus.Processing; +``` + +## Values + +| Name | Value | +| ------------ | ------------ | +| `Deciding` | deciding | +| `Waiting` | waiting | +| `Processing` | processing | +| `Available` | available | +| `Error` | error | +| `Expired` | expired | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdownloadqueueitemstranscode.md b/docs/sdk/models/operations/getdownloadqueueitemstranscode.md new file mode 100644 index 00000000..b5a786a8 --- /dev/null +++ b/docs/sdk/models/operations/getdownloadqueueitemstranscode.md @@ -0,0 +1,16 @@ +# GetDownloadQueueItemsTranscode + +The transcode session object which is not yet documented otherwise it'd be a $ref here. + +## Example Usage + +```typescript +import { GetDownloadQueueItemsTranscode } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDownloadQueueItemsTranscode = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdownloadqueuemediacontainer.md b/docs/sdk/models/operations/getdownloadqueuemediacontainer.md new file mode 100644 index 00000000..68300e51 --- /dev/null +++ b/docs/sdk/models/operations/getdownloadqueuemediacontainer.md @@ -0,0 +1,24 @@ +# GetDownloadQueueMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetDownloadQueueMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDownloadQueueMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `downloadQueue` | [operations.GetDownloadQueueDownloadQueue](../../../sdk/models/operations/getdownloadqueuedownloadqueue.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdownloadqueuemediaglobals.md b/docs/sdk/models/operations/getdownloadqueuemediaglobals.md new file mode 100644 index 00000000..a54b28cf --- /dev/null +++ b/docs/sdk/models/operations/getdownloadqueuemediaglobals.md @@ -0,0 +1,35 @@ +# GetDownloadQueueMediaGlobals + +## Example Usage + +```typescript +import { GetDownloadQueueMediaGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDownloadQueueMediaGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdownloadqueuemediarequest.md b/docs/sdk/models/operations/getdownloadqueuemediarequest.md new file mode 100644 index 00000000..810c0f1f --- /dev/null +++ b/docs/sdk/models/operations/getdownloadqueuemediarequest.md @@ -0,0 +1,29 @@ +# GetDownloadQueueMediaRequest + +## Example Usage + +```typescript +import { GetDownloadQueueMediaRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDownloadQueueMediaRequest = { + queueId: 891615, + itemId: 32, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `queueId` | *number* | :heavy_check_mark: | The queue id | | +| `itemId` | *number* | :heavy_check_mark: | The item ids | 32 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdownloadqueuemediaresponse.md b/docs/sdk/models/operations/getdownloadqueuemediaresponse.md new file mode 100644 index 00000000..fc37dffd --- /dev/null +++ b/docs/sdk/models/operations/getdownloadqueuemediaresponse.md @@ -0,0 +1,33 @@ +# GetDownloadQueueMediaResponse + +## Example Usage + +```typescript +import { GetDownloadQueueMediaResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDownloadQueueMediaResponse = { + contentType: "", + statusCode: 288985, + headers: { + "key": [ + "", + "", + ], + "key1": [ + "", + ], + "key2": [ + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdownloadqueuerequest.md b/docs/sdk/models/operations/getdownloadqueuerequest.md new file mode 100644 index 00000000..e27def3c --- /dev/null +++ b/docs/sdk/models/operations/getdownloadqueuerequest.md @@ -0,0 +1,27 @@ +# GetDownloadQueueRequest + +## Example Usage + +```typescript +import { GetDownloadQueueRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDownloadQueueRequest = { + queueId: 90815, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `queueId` | *number* | :heavy_check_mark: | The queue id | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdownloadqueueresponse.md b/docs/sdk/models/operations/getdownloadqueueresponse.md new file mode 100644 index 00000000..34c38764 --- /dev/null +++ b/docs/sdk/models/operations/getdownloadqueueresponse.md @@ -0,0 +1,21 @@ +# GetDownloadQueueResponse + +## Example Usage + +```typescript +import { GetDownloadQueueResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDownloadQueueResponse = { + contentType: "", + statusCode: 349044, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetDownloadQueueResponseBody](../../../sdk/models/operations/getdownloadqueueresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdownloadqueueresponsebody.md b/docs/sdk/models/operations/getdownloadqueueresponsebody.md new file mode 100644 index 00000000..748918a5 --- /dev/null +++ b/docs/sdk/models/operations/getdownloadqueueresponsebody.md @@ -0,0 +1,17 @@ +# GetDownloadQueueResponseBody + +OK + +## Example Usage + +```typescript +import { GetDownloadQueueResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDownloadQueueResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetDownloadQueueMediaContainer](../../../sdk/models/operations/getdownloadqueuemediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdownloadqueuestatus.md b/docs/sdk/models/operations/getdownloadqueuestatus.md new file mode 100644 index 00000000..23b02f8e --- /dev/null +++ b/docs/sdk/models/operations/getdownloadqueuestatus.md @@ -0,0 +1,27 @@ +# GetDownloadQueueStatus + +The state of this queue + - deciding: At least one item is still being decided + - waiting: At least one item is waiting for transcode and none are currently transcoding + - processing: At least one item is being transcoded + - done: All items are available (or potentially expired) + - error: At least one item has encountered an error + + +## Example Usage + +```typescript +import { GetDownloadQueueStatus } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDownloadQueueStatus = GetDownloadQueueStatus.Done; +``` + +## Values + +| Name | Value | +| ------------ | ------------ | +| `Deciding` | deciding | +| `Waiting` | waiting | +| `Processing` | processing | +| `Done` | done | +| `Error` | error | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdvrdvr.md b/docs/sdk/models/operations/getdvrdvr.md new file mode 100644 index 00000000..9631bd92 --- /dev/null +++ b/docs/sdk/models/operations/getdvrdvr.md @@ -0,0 +1,19 @@ +# GetDVRDVR + +## Example Usage + +```typescript +import { GetDVRDVR } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDVRDVR = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `device` | [shared.Device](../../../sdk/models/shared/device.md)[] | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `language` | *string* | :heavy_minus_sign: | N/A | +| `lineup` | *string* | :heavy_minus_sign: | N/A | +| `uuid` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdvrglobals.md b/docs/sdk/models/operations/getdvrglobals.md new file mode 100644 index 00000000..13b02ece --- /dev/null +++ b/docs/sdk/models/operations/getdvrglobals.md @@ -0,0 +1,35 @@ +# GetDVRGlobals + +## Example Usage + +```typescript +import { GetDVRGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDVRGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdvrmediacontainer.md b/docs/sdk/models/operations/getdvrmediacontainer.md new file mode 100644 index 00000000..97139b02 --- /dev/null +++ b/docs/sdk/models/operations/getdvrmediacontainer.md @@ -0,0 +1,16 @@ +# GetDVRMediaContainer + +## Example Usage + +```typescript +import { GetDVRMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDVRMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetDVRMediaContainerMediaContainer](../../../sdk/models/operations/getdvrmediacontainermediacontainer.md) | :heavy_minus_sign: | N/A | +| `dvr` | [operations.GetDVRDVR](../../../sdk/models/operations/getdvrdvr.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdvrmediacontainermediacontainer.md b/docs/sdk/models/operations/getdvrmediacontainermediacontainer.md new file mode 100644 index 00000000..e456b3e8 --- /dev/null +++ b/docs/sdk/models/operations/getdvrmediacontainermediacontainer.md @@ -0,0 +1,24 @@ +# GetDVRMediaContainerMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetDVRMediaContainerMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDVRMediaContainerMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `status` | *number* | :heavy_minus_sign: | A status indicator. If present and non-zero, indicates an error | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdvrrequest.md b/docs/sdk/models/operations/getdvrrequest.md new file mode 100644 index 00000000..e94fd63c --- /dev/null +++ b/docs/sdk/models/operations/getdvrrequest.md @@ -0,0 +1,27 @@ +# GetDVRRequest + +## Example Usage + +```typescript +import { GetDVRRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDVRRequest = { + dvrId: 8719, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `dvrId` | *number* | :heavy_check_mark: | The ID of the DVR. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdvrresponse.md b/docs/sdk/models/operations/getdvrresponse.md new file mode 100644 index 00000000..3506e533 --- /dev/null +++ b/docs/sdk/models/operations/getdvrresponse.md @@ -0,0 +1,32 @@ +# GetDVRResponse + +## Example Usage + +```typescript +import { GetDVRResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDVRResponse = { + contentType: "", + statusCode: 656982, + headers: { + "key": [ + "", + "", + "", + ], + "key1": [ + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetDVRResponseBody](../../../sdk/models/operations/getdvrresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getdvrresponsebody.md b/docs/sdk/models/operations/getdvrresponsebody.md new file mode 100644 index 00000000..165de4bf --- /dev/null +++ b/docs/sdk/models/operations/getdvrresponsebody.md @@ -0,0 +1,17 @@ +# GetDVRResponseBody + +OK + +## Example Usage + +```typescript +import { GetDVRResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetDVRResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetDVRMediaContainer](../../../sdk/models/operations/getdvrmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getextrasglobals.md b/docs/sdk/models/operations/getextrasglobals.md new file mode 100644 index 00000000..ad0ee784 --- /dev/null +++ b/docs/sdk/models/operations/getextrasglobals.md @@ -0,0 +1,35 @@ +# GetExtrasGlobals + +## Example Usage + +```typescript +import { GetExtrasGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetExtrasGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getextrasrequest.md b/docs/sdk/models/operations/getextrasrequest.md new file mode 100644 index 00000000..58da1ea1 --- /dev/null +++ b/docs/sdk/models/operations/getextrasrequest.md @@ -0,0 +1,27 @@ +# GetExtrasRequest + +## Example Usage + +```typescript +import { GetExtrasRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetExtrasRequest = { + ids: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getextrasresponse.md b/docs/sdk/models/operations/getextrasresponse.md new file mode 100644 index 00000000..15956623 --- /dev/null +++ b/docs/sdk/models/operations/getextrasresponse.md @@ -0,0 +1,35 @@ +# GetExtrasResponse + +## Example Usage + +```typescript +import { GetExtrasResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetExtrasResponse = { + contentType: "", + statusCode: 157075, + headers: { + "key": [], + "key1": [ + "", + "", + "", + ], + "key2": [ + "", + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getfileglobals.md b/docs/sdk/models/operations/getfileglobals.md new file mode 100644 index 00000000..526fcca4 --- /dev/null +++ b/docs/sdk/models/operations/getfileglobals.md @@ -0,0 +1,35 @@ +# GetFileGlobals + +## Example Usage + +```typescript +import { GetFileGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetFileGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getfilehashrequest.md b/docs/sdk/models/operations/getfilehashrequest.md deleted file mode 100644 index 2741760e..00000000 --- a/docs/sdk/models/operations/getfilehashrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetFileHashRequest - -## Example Usage - -```typescript -import { GetFileHashRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetFileHashRequest = { - url: "file://C:\\Image.png&type=13", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `url` | *string* | :heavy_check_mark: | This is the path to the local file, must be prefixed by `file://` | file://C:\Image.png&type=13 | -| `type` | *number* | :heavy_minus_sign: | Item type | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getfilehashresponse.md b/docs/sdk/models/operations/getfilehashresponse.md deleted file mode 100644 index 77801e01..00000000 --- a/docs/sdk/models/operations/getfilehashresponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetFileHashResponse - -## Example Usage - -```typescript -import { GetFileHashResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetFileHashResponse = { - contentType: "", - statusCode: 537323, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getfilerequest.md b/docs/sdk/models/operations/getfilerequest.md new file mode 100644 index 00000000..4373e58d --- /dev/null +++ b/docs/sdk/models/operations/getfilerequest.md @@ -0,0 +1,28 @@ +# GetFileRequest + +## Example Usage + +```typescript +import { GetFileRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetFileRequest = { + ids: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `url` | *string* | :heavy_minus_sign: | The bundle url, typically starting with `metadata://` or `media://` | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getfileresponse.md b/docs/sdk/models/operations/getfileresponse.md new file mode 100644 index 00000000..87c6ab53 --- /dev/null +++ b/docs/sdk/models/operations/getfileresponse.md @@ -0,0 +1,19 @@ +# GetFileResponse + +## Example Usage + +```typescript +import { GetFileResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | +| `twoHundredAudioMpeg3ResponseStream` | *ReadableStream* | :heavy_minus_sign: | OK | +| `twoHundredImageJpegResponseStream` | *ReadableStream* | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getfirstcharactersdirectory.md b/docs/sdk/models/operations/getfirstcharactersdirectory.md new file mode 100644 index 00000000..f410d33b --- /dev/null +++ b/docs/sdk/models/operations/getfirstcharactersdirectory.md @@ -0,0 +1,17 @@ +# GetFirstCharactersDirectory + +## Example Usage + +```typescript +import { GetFirstCharactersDirectory } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetFirstCharactersDirectory = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `size` | *number* | :heavy_minus_sign: | The number of items starting with this character | +| `title` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getfirstcharactersglobals.md b/docs/sdk/models/operations/getfirstcharactersglobals.md new file mode 100644 index 00000000..b23f2ddf --- /dev/null +++ b/docs/sdk/models/operations/getfirstcharactersglobals.md @@ -0,0 +1,35 @@ +# GetFirstCharactersGlobals + +## Example Usage + +```typescript +import { GetFirstCharactersGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetFirstCharactersGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getfirstcharactersmediacontainer.md b/docs/sdk/models/operations/getfirstcharactersmediacontainer.md new file mode 100644 index 00000000..266dc0ae --- /dev/null +++ b/docs/sdk/models/operations/getfirstcharactersmediacontainer.md @@ -0,0 +1,24 @@ +# GetFirstCharactersMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetFirstCharactersMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetFirstCharactersMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `directory` | [operations.GetFirstCharactersDirectory](../../../sdk/models/operations/getfirstcharactersdirectory.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getfirstcharactersrequest.md b/docs/sdk/models/operations/getfirstcharactersrequest.md new file mode 100644 index 00000000..9d6f0f1c --- /dev/null +++ b/docs/sdk/models/operations/getfirstcharactersrequest.md @@ -0,0 +1,30 @@ +# GetFirstCharactersRequest + +## Example Usage + +```typescript +import { GetFirstCharactersRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetFirstCharactersRequest = { + sectionId: 231024, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | +| `type` | *number* | :heavy_minus_sign: | The metadata type to filter on | | +| `sort` | *number* | :heavy_minus_sign: | The metadata type to filter on | | +| `mediaQuery` | [shared.MediaQuery](../../../sdk/models/shared/mediaquery.md) | :heavy_minus_sign: | This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getfirstcharactersresponse.md b/docs/sdk/models/operations/getfirstcharactersresponse.md new file mode 100644 index 00000000..f58f3472 --- /dev/null +++ b/docs/sdk/models/operations/getfirstcharactersresponse.md @@ -0,0 +1,21 @@ +# GetFirstCharactersResponse + +## Example Usage + +```typescript +import { GetFirstCharactersResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetFirstCharactersResponse = { + contentType: "", + statusCode: 702136, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetFirstCharactersResponseBody](../../../sdk/models/operations/getfirstcharactersresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getfirstcharactersresponsebody.md b/docs/sdk/models/operations/getfirstcharactersresponsebody.md new file mode 100644 index 00000000..3df9bd46 --- /dev/null +++ b/docs/sdk/models/operations/getfirstcharactersresponsebody.md @@ -0,0 +1,17 @@ +# GetFirstCharactersResponseBody + +OK + +## Example Usage + +```typescript +import { GetFirstCharactersResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetFirstCharactersResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetFirstCharactersMediaContainer](../../../sdk/models/operations/getfirstcharactersmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getfoldersdirectory.md b/docs/sdk/models/operations/getfoldersdirectory.md new file mode 100644 index 00000000..e6494f9f --- /dev/null +++ b/docs/sdk/models/operations/getfoldersdirectory.md @@ -0,0 +1,17 @@ +# GetFoldersDirectory + +## Example Usage + +```typescript +import { GetFoldersDirectory } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetFoldersDirectory = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `fastKey` | *string* | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `title` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getfoldersglobals.md b/docs/sdk/models/operations/getfoldersglobals.md new file mode 100644 index 00000000..920238cb --- /dev/null +++ b/docs/sdk/models/operations/getfoldersglobals.md @@ -0,0 +1,35 @@ +# GetFoldersGlobals + +## Example Usage + +```typescript +import { GetFoldersGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetFoldersGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getfoldersmediacontainer.md b/docs/sdk/models/operations/getfoldersmediacontainer.md new file mode 100644 index 00000000..748f941f --- /dev/null +++ b/docs/sdk/models/operations/getfoldersmediacontainer.md @@ -0,0 +1,24 @@ +# GetFoldersMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetFoldersMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetFoldersMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `directory` | [operations.GetFoldersDirectory](../../../sdk/models/operations/getfoldersdirectory.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getfoldersrequest.md b/docs/sdk/models/operations/getfoldersrequest.md new file mode 100644 index 00000000..0f869440 --- /dev/null +++ b/docs/sdk/models/operations/getfoldersrequest.md @@ -0,0 +1,27 @@ +# GetFoldersRequest + +## Example Usage + +```typescript +import { GetFoldersRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetFoldersRequest = { + sectionId: 479308, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getfoldersresponse.md b/docs/sdk/models/operations/getfoldersresponse.md new file mode 100644 index 00000000..250cb6ea --- /dev/null +++ b/docs/sdk/models/operations/getfoldersresponse.md @@ -0,0 +1,21 @@ +# GetFoldersResponse + +## Example Usage + +```typescript +import { GetFoldersResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetFoldersResponse = { + contentType: "", + statusCode: 258459, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetFoldersResponseBody](../../../sdk/models/operations/getfoldersresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getfoldersresponsebody.md b/docs/sdk/models/operations/getfoldersresponsebody.md new file mode 100644 index 00000000..ce65a0d6 --- /dev/null +++ b/docs/sdk/models/operations/getfoldersresponsebody.md @@ -0,0 +1,17 @@ +# GetFoldersResponseBody + +OK + +## Example Usage + +```typescript +import { GetFoldersResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetFoldersResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetFoldersMediaContainer](../../../sdk/models/operations/getfoldersmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getgenreslibrarydirectory.md b/docs/sdk/models/operations/getgenreslibrarydirectory.md deleted file mode 100644 index 5964db41..00000000 --- a/docs/sdk/models/operations/getgenreslibrarydirectory.md +++ /dev/null @@ -1,23 +0,0 @@ -# GetGenresLibraryDirectory - -## Example Usage - -```typescript -import { GetGenresLibraryDirectory } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetGenresLibraryDirectory = { - fastKey: "/library/sections/10/all?genre=89", - key: "89", - title: "Action", - type: "genre", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `fastKey` | *string* | :heavy_check_mark: | N/A | /library/sections/10/all?genre=89 | -| `key` | *string* | :heavy_check_mark: | N/A | 89 | -| `title` | *string* | :heavy_check_mark: | N/A | Action | -| `type` | *string* | :heavy_check_mark: | N/A | genre | \ No newline at end of file diff --git a/docs/sdk/models/operations/getgenreslibrarymediacontainer.md b/docs/sdk/models/operations/getgenreslibrarymediacontainer.md deleted file mode 100644 index cda4010b..00000000 --- a/docs/sdk/models/operations/getgenreslibrarymediacontainer.md +++ /dev/null @@ -1,48 +0,0 @@ -# GetGenresLibraryMediaContainer - -## Example Usage - -```typescript -import { GetGenresLibraryMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetGenresLibraryMediaContainer = { - size: 50, - allowSync: false, - art: "/:/resources/show-fanart.jpg", - content: "secondary", - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1734362201, - nocache: true, - thumb: "/:/resources/show.png", - title1: "TV Series", - title2: "By Starring Actor", - viewGroup: "secondary", - directory: [ - { - fastKey: "/library/sections/10/all?genre=89", - key: "89", - title: "Action", - type: "genre", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `art` | *string* | :heavy_check_mark: | URL for the background artwork of the media container. | /:/resources/show-fanart.jpg | -| `content` | *string* | :heavy_check_mark: | The content type or mode. | secondary | -| `identifier` | *string* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `mediaTagPrefix` | *string* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | -| `mediaTagVersion` | *number* | :heavy_check_mark: | The version number for media tags. | 1734362201 | -| `nocache` | *boolean* | :heavy_check_mark: | Specifies whether caching is disabled. | true | -| `thumb` | *string* | :heavy_check_mark: | URL for the thumbnail image of the media container. | /:/resources/show.png | -| `title1` | *string* | :heavy_check_mark: | The primary title of the media container. | TV Series | -| `title2` | *string* | :heavy_check_mark: | The secondary title of the media container. | By Starring Actor | -| `viewGroup` | *string* | :heavy_check_mark: | Identifier for the view group layout. | secondary | -| `directory` | [operations.GetGenresLibraryDirectory](../../../sdk/models/operations/getgenreslibrarydirectory.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getgenreslibraryqueryparamtype.md b/docs/sdk/models/operations/getgenreslibraryqueryparamtype.md deleted file mode 100644 index 69539c97..00000000 --- a/docs/sdk/models/operations/getgenreslibraryqueryparamtype.md +++ /dev/null @@ -1,35 +0,0 @@ -# GetGenresLibraryQueryParamType - -The type of media to retrieve or filter by. -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 - - -## Example Usage - -```typescript -import { GetGenresLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetGenresLibraryQueryParamType = - GetGenresLibraryQueryParamType.TvShow; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Artist` | 5 | -| `Album` | 6 | -| `Track` | 7 | -| `PhotoAlbum` | 8 | -| `Photo` | 9 | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getgenreslibraryrequest.md b/docs/sdk/models/operations/getgenreslibraryrequest.md deleted file mode 100644 index 123cee02..00000000 --- a/docs/sdk/models/operations/getgenreslibraryrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetGenresLibraryRequest - -## Example Usage - -```typescript -import { GetGenresLibraryQueryParamType, GetGenresLibraryRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetGenresLibraryRequest = { - sectionKey: 9518, - type: GetGenresLibraryQueryParamType.TvShow, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | -| `type` | [operations.GetGenresLibraryQueryParamType](../../../sdk/models/operations/getgenreslibraryqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
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
| 2 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getgenreslibraryresponse.md b/docs/sdk/models/operations/getgenreslibraryresponse.md deleted file mode 100644 index 13a03c8a..00000000 --- a/docs/sdk/models/operations/getgenreslibraryresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetGenresLibraryResponse - -## Example Usage - -```typescript -import { GetGenresLibraryResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetGenresLibraryResponse = { - contentType: "", - statusCode: 150762, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetGenresLibraryResponseBody](../../../sdk/models/operations/getgenreslibraryresponsebody.md) | :heavy_minus_sign: | Successful response containing media container data. | \ No newline at end of file diff --git a/docs/sdk/models/operations/getgenreslibraryresponsebody.md b/docs/sdk/models/operations/getgenreslibraryresponsebody.md deleted file mode 100644 index 98df4960..00000000 --- a/docs/sdk/models/operations/getgenreslibraryresponsebody.md +++ /dev/null @@ -1,40 +0,0 @@ -# GetGenresLibraryResponseBody - -Successful response containing media container data. - -## Example Usage - -```typescript -import { GetGenresLibraryResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetGenresLibraryResponseBody = { - mediaContainer: { - size: 50, - allowSync: false, - art: "/:/resources/show-fanart.jpg", - content: "secondary", - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1734362201, - nocache: true, - thumb: "/:/resources/show.png", - title1: "TV Series", - title2: "By Starring Actor", - viewGroup: "secondary", - directory: [ - { - fastKey: "/library/sections/10/all?genre=89", - key: "89", - title: "Action", - type: "genre", - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetGenresLibraryMediaContainer](../../../sdk/models/operations/getgenreslibrarymediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getgeodatageodata.md b/docs/sdk/models/operations/getgeodatageodata.md deleted file mode 100644 index bb6ba4b9..00000000 --- a/docs/sdk/models/operations/getgeodatageodata.md +++ /dev/null @@ -1,39 +0,0 @@ -# GetGeoDataGeoData - -Geo location data - -## Example Usage - -```typescript -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", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `code` | *string* | :heavy_check_mark: | The ISO 3166-1 alpha-2 code of the country. | VI | -| `continentCode` | *string* | :heavy_check_mark: | The continent code where the country is located. | NA | -| `country` | *string* | :heavy_check_mark: | The official name of the country. | United States Virgin Islands | -| `city` | *string* | :heavy_check_mark: | The name of the city. | Amsterdam | -| `europeanUnionMember` | *boolean* | :heavy_minus_sign: | Indicates if the country is a member of the European Union. | true | -| `timeZone` | *string* | :heavy_check_mark: | The time zone of the country. | America/St_Thomas | -| `postalCode` | *string* | :heavy_check_mark: | The postal code of the location. | 802 | -| `inPrivacyRestrictedCountry` | *boolean* | :heavy_minus_sign: | Indicates if the country has privacy restrictions. | true | -| `inPrivacyRestrictedRegion` | *boolean* | :heavy_minus_sign: | Indicates if the region has privacy restrictions. | true | -| `subdivisions` | *string* | :heavy_check_mark: | The name of the primary administrative subdivision. | Saint Thomas | -| `coordinates` | *string* | :heavy_check_mark: | The geographical coordinates (latitude, longitude) of the location. | 18.3381, -64.8941 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getgeodataresponse.md b/docs/sdk/models/operations/getgeodataresponse.md deleted file mode 100644 index a790ebb9..00000000 --- a/docs/sdk/models/operations/getgeodataresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetGeoDataResponse - -## Example Usage - -```typescript -import { GetGeoDataResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetGeoDataResponse = { - contentType: "", - statusCode: 752880, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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 | | -| `geoData` | [operations.GetGeoDataGeoData](../../../sdk/models/operations/getgeodatageodata.md) | :heavy_minus_sign: | Gets the geo location data of the user | {
"code": "VI",
"continent_code": "NA",
"country": "United States Virgin Islands",
"city": "Amsterdam",
"european_union_member": true,
"time_zone": "America/St_Thomas",
"postal_code": 802,
"in_privacy_restricted_country": true,
"in_privacy_restricted_region": true,
"subdivisions": "Saint Thomas",
"coordinates": "18.3381, -64.8941"
} | \ No newline at end of file diff --git a/docs/sdk/models/operations/getglobalhubsmediacontainer.md b/docs/sdk/models/operations/getglobalhubsmediacontainer.md deleted file mode 100644 index 1a92b337..00000000 --- a/docs/sdk/models/operations/getglobalhubsmediacontainer.md +++ /dev/null @@ -1,59 +0,0 @@ -# GetGlobalHubsMediaContainer - -## Example Usage - -```typescript -import { GetGlobalHubsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetGlobalHubsMediaContainer = { - 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, - }, - ], - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 8 | -| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | true | -| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `hub` | [operations.Hub](../../../sdk/models/operations/hub.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getglobalhubsmetadata.md b/docs/sdk/models/operations/getglobalhubsmetadata.md deleted file mode 100644 index 26aba0a4..00000000 --- a/docs/sdk/models/operations/getglobalhubsmetadata.md +++ /dev/null @@ -1,49 +0,0 @@ -# GetGlobalHubsMetadata - -## Example Usage - -```typescript -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, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 57070 | -| `key` | *string* | :heavy_minus_sign: | N/A | /playlists/57070/items | -| `guid` | *string* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c | -| `type` | *string* | :heavy_minus_sign: | N/A | playlist | -| `title` | *string* | :heavy_minus_sign: | N/A | November Movie Day | -| `titleSort` | *string* | :heavy_minus_sign: | N/A | Tracks | -| `summary` | *string* | :heavy_minus_sign: | N/A | | -| `smart` | *boolean* | :heavy_minus_sign: | N/A | false | -| `playlistType` | *string* | :heavy_minus_sign: | N/A | video | -| `composite` | *string* | :heavy_minus_sign: | N/A | /playlists/57070/composite/1668787730 | -| `icon` | *string* | :heavy_minus_sign: | N/A | playlist://image.smart | -| `viewCount` | *number* | :heavy_minus_sign: | N/A | 2 | -| `lastViewedAt` | *number* | :heavy_minus_sign: | N/A | 1668787732 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 16873000 | -| `leafCount` | *number* | :heavy_minus_sign: | N/A | 3 | -| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1668779618 | -| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1668787730 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getglobalhubsrequest.md b/docs/sdk/models/operations/getglobalhubsrequest.md deleted file mode 100644 index 29955959..00000000 --- a/docs/sdk/models/operations/getglobalhubsrequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# GetGlobalHubsRequest - -## Example Usage - -```typescript -import { GetGlobalHubsRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetGlobalHubsRequest = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -| `count` | *number* | :heavy_minus_sign: | The number of items to return with each hub. | -| `onlyTransient` | [operations.OnlyTransient](../../../sdk/models/operations/onlytransient.md) | :heavy_minus_sign: | 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). | \ No newline at end of file diff --git a/docs/sdk/models/operations/getglobalhubsresponse.md b/docs/sdk/models/operations/getglobalhubsresponse.md deleted file mode 100644 index 134d1ae6..00000000 --- a/docs/sdk/models/operations/getglobalhubsresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetGlobalHubsResponse - -## Example Usage - -```typescript -import { GetGlobalHubsResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetGlobalHubsResponse = { - contentType: "", - statusCode: 711048, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetGlobalHubsResponseBody](../../../sdk/models/operations/getglobalhubsresponsebody.md) | :heavy_minus_sign: | returns global hubs | \ No newline at end of file diff --git a/docs/sdk/models/operations/getglobalhubsresponsebody.md b/docs/sdk/models/operations/getglobalhubsresponsebody.md deleted file mode 100644 index 01f83033..00000000 --- a/docs/sdk/models/operations/getglobalhubsresponsebody.md +++ /dev/null @@ -1,60 +0,0 @@ -# GetGlobalHubsResponseBody - -returns global hubs - -## Example Usage - -```typescript -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, - }, - ], - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetGlobalHubsMediaContainer](../../../sdk/models/operations/getglobalhubsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/gethistoryitemglobals.md b/docs/sdk/models/operations/gethistoryitemglobals.md new file mode 100644 index 00000000..96f284c8 --- /dev/null +++ b/docs/sdk/models/operations/gethistoryitemglobals.md @@ -0,0 +1,35 @@ +# GetHistoryItemGlobals + +## Example Usage + +```typescript +import { GetHistoryItemGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetHistoryItemGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/gethistoryitemrequest.md b/docs/sdk/models/operations/gethistoryitemrequest.md new file mode 100644 index 00000000..a042904f --- /dev/null +++ b/docs/sdk/models/operations/gethistoryitemrequest.md @@ -0,0 +1,27 @@ +# GetHistoryItemRequest + +## Example Usage + +```typescript +import { GetHistoryItemRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetHistoryItemRequest = { + historyId: 892984, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `historyId` | *number* | :heavy_check_mark: | The id of the history item (the `historyKey` from above) | | \ No newline at end of file diff --git a/docs/sdk/models/operations/gethistoryitemresponse.md b/docs/sdk/models/operations/gethistoryitemresponse.md new file mode 100644 index 00000000..349a77a3 --- /dev/null +++ b/docs/sdk/models/operations/gethistoryitemresponse.md @@ -0,0 +1,25 @@ +# GetHistoryItemResponse + +## Example Usage + +```typescript +import { GetHistoryItemResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetHistoryItemResponse = { + contentType: "", + statusCode: 160300, + headers: { + "key": [], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `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 | +| `historyAllGetResponses200` | [shared.HistoryAllGetResponses200](../../../sdk/models/shared/historyallgetresponses200.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/gethomedataresponse.md b/docs/sdk/models/operations/gethomedataresponse.md deleted file mode 100644 index e9fc53b6..00000000 --- a/docs/sdk/models/operations/gethomedataresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetHomeDataResponse - -## Example Usage - -```typescript -import { GetHomeDataResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetHomeDataResponse = { - contentType: "", - statusCode: 145217, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetHomeDataResponseBody](../../../sdk/models/operations/gethomedataresponsebody.md) | :heavy_minus_sign: | Home Data | \ No newline at end of file diff --git a/docs/sdk/models/operations/gethomedataresponsebody.md b/docs/sdk/models/operations/gethomedataresponsebody.md deleted file mode 100644 index 8bc72e75..00000000 --- a/docs/sdk/models/operations/gethomedataresponsebody.md +++ /dev/null @@ -1,27 +0,0 @@ -# GetHomeDataResponseBody - -Home Data - -## Example Usage - -```typescript -import { GetHomeDataResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetHomeDataResponseBody = { - id: 1841489, - name: "Blindkitty38's home", - guestUserID: 58815432, - guestUserUUID: "f3df4e01bfca0787", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `id` | *number* | :heavy_minus_sign: | N/A | 1841489 | -| `name` | *string* | :heavy_minus_sign: | N/A | Blindkitty38's home | -| `guestUserID` | *number* | :heavy_minus_sign: | N/A | 58815432 | -| `guestUserUUID` | *string* | :heavy_minus_sign: | N/A | f3df4e01bfca0787 | -| `guestEnabled` | *boolean* | :heavy_minus_sign: | N/A | | -| `subscription` | *boolean* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/gethubitemsglobals.md b/docs/sdk/models/operations/gethubitemsglobals.md new file mode 100644 index 00000000..ce712477 --- /dev/null +++ b/docs/sdk/models/operations/gethubitemsglobals.md @@ -0,0 +1,35 @@ +# GetHubItemsGlobals + +## Example Usage + +```typescript +import { GetHubItemsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetHubItemsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/gethubitemsrequest.md b/docs/sdk/models/operations/gethubitemsrequest.md new file mode 100644 index 00000000..8c1a58f6 --- /dev/null +++ b/docs/sdk/models/operations/gethubitemsrequest.md @@ -0,0 +1,28 @@ +# GetHubItemsRequest + +## Example Usage + +```typescript +import { GetHubItemsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetHubItemsRequest = { + identifier: [], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `count` | *number* | :heavy_minus_sign: | Limit results to count items | | +| `identifier` | *string*[] | :heavy_check_mark: | If provided, limit to only specified hubs | | \ No newline at end of file diff --git a/docs/sdk/models/operations/gethubitemsresponse.md b/docs/sdk/models/operations/gethubitemsresponse.md new file mode 100644 index 00000000..68be6588 --- /dev/null +++ b/docs/sdk/models/operations/gethubitemsresponse.md @@ -0,0 +1,29 @@ +# GetHubItemsResponse + +## Example Usage + +```typescript +import { GetHubItemsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetHubItemsResponse = { + contentType: "", + statusCode: 496673, + headers: { + "key": [], + "key1": [ + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetHubItemsResponseBody](../../../sdk/models/operations/gethubitemsresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/gethubitemsresponsebody.md b/docs/sdk/models/operations/gethubitemsresponsebody.md new file mode 100644 index 00000000..2215625e --- /dev/null +++ b/docs/sdk/models/operations/gethubitemsresponsebody.md @@ -0,0 +1,17 @@ +# GetHubItemsResponseBody + +OK + +## Example Usage + +```typescript +import { GetHubItemsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetHubItemsResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `mediaContainer` | [shared.MediaContainer](../../../sdk/models/shared/mediacontainer.md) | :heavy_minus_sign: | `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
| \ No newline at end of file diff --git a/docs/sdk/models/operations/getidentitymediacontainer.md b/docs/sdk/models/operations/getidentitymediacontainer.md new file mode 100644 index 00000000..be121b3a --- /dev/null +++ b/docs/sdk/models/operations/getidentitymediacontainer.md @@ -0,0 +1,18 @@ +# GetIdentityMediaContainer + +## Example Usage + +```typescript +import { GetIdentityMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetIdentityMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `claimed` | *boolean* | :heavy_minus_sign: | Indicates whether this server has been claimed by a user | +| `machineIdentifier` | *string* | :heavy_minus_sign: | A unique identifier of the computer | +| `size` | *number* | :heavy_minus_sign: | N/A | +| `version` | *string* | :heavy_minus_sign: | The full version string of the PMS | \ No newline at end of file diff --git a/docs/sdk/models/operations/getidentityresponse.md b/docs/sdk/models/operations/getidentityresponse.md new file mode 100644 index 00000000..c68769e0 --- /dev/null +++ b/docs/sdk/models/operations/getidentityresponse.md @@ -0,0 +1,21 @@ +# GetIdentityResponse + +## Example Usage + +```typescript +import { GetIdentityResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetIdentityResponse = { + contentType: "", + statusCode: 730626, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetIdentityResponseBody](../../../sdk/models/operations/getidentityresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getidentityresponsebody.md b/docs/sdk/models/operations/getidentityresponsebody.md new file mode 100644 index 00000000..28095d4a --- /dev/null +++ b/docs/sdk/models/operations/getidentityresponsebody.md @@ -0,0 +1,17 @@ +# GetIdentityResponseBody + +OK + +## Example Usage + +```typescript +import { GetIdentityResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetIdentityResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetIdentityMediaContainer](../../../sdk/models/operations/getidentitymediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getimagefrombifglobals.md b/docs/sdk/models/operations/getimagefrombifglobals.md new file mode 100644 index 00000000..c0dc9e2b --- /dev/null +++ b/docs/sdk/models/operations/getimagefrombifglobals.md @@ -0,0 +1,35 @@ +# GetImageFromBifGlobals + +## Example Usage + +```typescript +import { GetImageFromBifGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetImageFromBifGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getimagefrombifindex.md b/docs/sdk/models/operations/getimagefrombifindex.md new file mode 100644 index 00000000..f83a5f53 --- /dev/null +++ b/docs/sdk/models/operations/getimagefrombifindex.md @@ -0,0 +1,17 @@ +# GetImageFromBifIndex + +The type of index to grab. + +## Example Usage + +```typescript +import { GetImageFromBifIndex } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetImageFromBifIndex = GetImageFromBifIndex.Sd; +``` + +## Values + +| Name | Value | +| ----- | ----- | +| `Sd` | sd | \ No newline at end of file diff --git a/docs/sdk/models/operations/getimagefrombifrequest.md b/docs/sdk/models/operations/getimagefrombifrequest.md new file mode 100644 index 00000000..c18a8566 --- /dev/null +++ b/docs/sdk/models/operations/getimagefrombifrequest.md @@ -0,0 +1,31 @@ +# GetImageFromBifRequest + +## Example Usage + +```typescript +import { GetImageFromBifIndex, GetImageFromBifRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetImageFromBifRequest = { + partId: 983252, + index: GetImageFromBifIndex.Sd, + offset: 221187, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `partId` | *number* | :heavy_check_mark: | The part id who's index is to be fetched | | +| `index` | [operations.GetImageFromBifIndex](../../../sdk/models/operations/getimagefrombifindex.md) | :heavy_check_mark: | The type of index to grab. | | +| `offset` | *number* | :heavy_check_mark: | The offset to seek in ms. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getimagefrombifresponse.md b/docs/sdk/models/operations/getimagefrombifresponse.md new file mode 100644 index 00000000..6e79d549 --- /dev/null +++ b/docs/sdk/models/operations/getimagefrombifresponse.md @@ -0,0 +1,18 @@ +# GetImageFromBifResponse + +## Example Usage + +```typescript +import { GetImageFromBifResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | +| `responseStream` | *ReadableStream* | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getimageglobals.md b/docs/sdk/models/operations/getimageglobals.md new file mode 100644 index 00000000..0f8e81fa --- /dev/null +++ b/docs/sdk/models/operations/getimageglobals.md @@ -0,0 +1,35 @@ +# GetImageGlobals + +## Example Usage + +```typescript +import { GetImageGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetImageGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getimagerequest.md b/docs/sdk/models/operations/getimagerequest.md new file mode 100644 index 00000000..bc1d8a79 --- /dev/null +++ b/docs/sdk/models/operations/getimagerequest.md @@ -0,0 +1,40 @@ +# GetImageRequest + +## Example Usage + +```typescript +import { GetImageRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: GetImageRequest = { + topLeft: "3f280a", + topRight: "6b4713", + bottomRight: "0f2a43", + bottomLeft: "1c425d", + width: 1920, + height: 1080, + noise: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `topLeft` | *string* | :heavy_minus_sign: | The base color (hex) for the top left quadrant. | 3f280a | +| `topRight` | *string* | :heavy_minus_sign: | The base color (hex) for the top right quadrant. | 6b4713 | +| `bottomRight` | *string* | :heavy_minus_sign: | The base color (hex) for the bottom right quadrant. | 0f2a43 | +| `bottomLeft` | *string* | :heavy_minus_sign: | The base color (hex) for the bottom left quadrant. | 1c425d | +| `width` | *number* | :heavy_minus_sign: | Width in pixels for the image. | 1920 | +| `height` | *number* | :heavy_minus_sign: | Height in pixels for the image. | 1080 | +| `noise` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Whether to add noise to the ouput image. Noise can reduce color banding with the gradients. Image sizes with noise will be larger. | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getimageresponse.md b/docs/sdk/models/operations/getimageresponse.md new file mode 100644 index 00000000..74645af1 --- /dev/null +++ b/docs/sdk/models/operations/getimageresponse.md @@ -0,0 +1,18 @@ +# GetImageResponse + +## Example Usage + +```typescript +import { GetImageResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | +| `responseStream` | *ReadableStream* | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getitemartworkelement.md b/docs/sdk/models/operations/getitemartworkelement.md new file mode 100644 index 00000000..67af992e --- /dev/null +++ b/docs/sdk/models/operations/getitemartworkelement.md @@ -0,0 +1,20 @@ +# GetItemArtworkElement + +## Example Usage + +```typescript +import { GetItemArtworkElement } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetItemArtworkElement = GetItemArtworkElement.ClearLogo; +``` + +## Values + +| Name | Value | +| ----------- | ----------- | +| `Thumb` | thumb | +| `Art` | art | +| `ClearLogo` | clearLogo | +| `Banner` | banner | +| `Poster` | poster | +| `Theme` | theme | \ No newline at end of file diff --git a/docs/sdk/models/operations/getitemartworkglobals.md b/docs/sdk/models/operations/getitemartworkglobals.md new file mode 100644 index 00000000..eca62be7 --- /dev/null +++ b/docs/sdk/models/operations/getitemartworkglobals.md @@ -0,0 +1,35 @@ +# GetItemArtworkGlobals + +## Example Usage + +```typescript +import { GetItemArtworkGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetItemArtworkGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getitemartworkrequest.md b/docs/sdk/models/operations/getitemartworkrequest.md new file mode 100644 index 00000000..b67054d7 --- /dev/null +++ b/docs/sdk/models/operations/getitemartworkrequest.md @@ -0,0 +1,31 @@ +# GetItemArtworkRequest + +## Example Usage + +```typescript +import { GetItemArtworkElement, GetItemArtworkRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetItemArtworkRequest = { + ids: "", + element: GetItemArtworkElement.Art, + timestamp: 848928, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `element` | [operations.GetItemArtworkElement](../../../sdk/models/operations/getitemartworkelement.md) | :heavy_check_mark: | N/A | | +| `timestamp` | *number* | :heavy_check_mark: | A timestamp on the element used for cache management in the client | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getitemartworkresponse.md b/docs/sdk/models/operations/getitemartworkresponse.md new file mode 100644 index 00000000..89c66787 --- /dev/null +++ b/docs/sdk/models/operations/getitemartworkresponse.md @@ -0,0 +1,19 @@ +# GetItemArtworkResponse + +## Example Usage + +```typescript +import { GetItemArtworkResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | +| `twoHundredAudioMpeg3ResponseStream` | *ReadableStream* | :heavy_minus_sign: | OK | +| `twoHundredImageJpegResponseStream` | *ReadableStream* | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getitemdecisionglobals.md b/docs/sdk/models/operations/getitemdecisionglobals.md new file mode 100644 index 00000000..77463073 --- /dev/null +++ b/docs/sdk/models/operations/getitemdecisionglobals.md @@ -0,0 +1,35 @@ +# GetItemDecisionGlobals + +## Example Usage + +```typescript +import { GetItemDecisionGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetItemDecisionGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getitemdecisionrequest.md b/docs/sdk/models/operations/getitemdecisionrequest.md new file mode 100644 index 00000000..81eac6e2 --- /dev/null +++ b/docs/sdk/models/operations/getitemdecisionrequest.md @@ -0,0 +1,29 @@ +# GetItemDecisionRequest + +## Example Usage + +```typescript +import { GetItemDecisionRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetItemDecisionRequest = { + queueId: 304397, + itemId: 32, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `queueId` | *number* | :heavy_check_mark: | The queue id | | +| `itemId` | *number* | :heavy_check_mark: | The item ids | 32 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getitemdecisionresponse.md b/docs/sdk/models/operations/getitemdecisionresponse.md new file mode 100644 index 00000000..77f7ef7a --- /dev/null +++ b/docs/sdk/models/operations/getitemdecisionresponse.md @@ -0,0 +1,21 @@ +# GetItemDecisionResponse + +## Example Usage + +```typescript +import { GetItemDecisionResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetItemDecisionResponse = { + contentType: "", + statusCode: 651217, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithDecision` | [shared.MediaContainerWithDecision](../../../sdk/models/shared/mediacontainerwithdecision.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getitemtreeglobals.md b/docs/sdk/models/operations/getitemtreeglobals.md new file mode 100644 index 00000000..61369636 --- /dev/null +++ b/docs/sdk/models/operations/getitemtreeglobals.md @@ -0,0 +1,35 @@ +# GetItemTreeGlobals + +## Example Usage + +```typescript +import { GetItemTreeGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetItemTreeGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getitemtreerequest.md b/docs/sdk/models/operations/getitemtreerequest.md new file mode 100644 index 00000000..f1bb7dcc --- /dev/null +++ b/docs/sdk/models/operations/getitemtreerequest.md @@ -0,0 +1,27 @@ +# GetItemTreeRequest + +## Example Usage + +```typescript +import { GetItemTreeRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetItemTreeRequest = { + ids: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getitemtreeresponse.md b/docs/sdk/models/operations/getitemtreeresponse.md new file mode 100644 index 00000000..690f3078 --- /dev/null +++ b/docs/sdk/models/operations/getitemtreeresponse.md @@ -0,0 +1,21 @@ +# GetItemTreeResponse + +## Example Usage + +```typescript +import { GetItemTreeResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetItemTreeResponse = { + contentType: "", + statusCode: 812303, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithNestedMetadata` | [shared.MediaContainerWithNestedMetadata](../../../sdk/models/shared/mediacontainerwithnestedmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarydetailsdirectory.md b/docs/sdk/models/operations/getlibrarydetailsdirectory.md deleted file mode 100644 index bfdac3cf..00000000 --- a/docs/sdk/models/operations/getlibrarydetailsdirectory.md +++ /dev/null @@ -1,25 +0,0 @@ -# GetLibraryDetailsDirectory - -## Example Usage - -```typescript -import { GetLibraryDetailsDirectory } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryDetailsDirectory = { - key: "search?type=1", - title: "Search...", - secondary: true, - prompt: "Search Movies", - search: true, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `key` | *string* | :heavy_minus_sign: | N/A | search?type=1 | -| `title` | *string* | :heavy_minus_sign: | N/A | Search... | -| `secondary` | *boolean* | :heavy_minus_sign: | N/A | true | -| `prompt` | *string* | :heavy_minus_sign: | N/A | Search Movies | -| `search` | *boolean* | :heavy_minus_sign: | N/A | true | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarydetailsfield.md b/docs/sdk/models/operations/getlibrarydetailsfield.md deleted file mode 100644 index 2287d745..00000000 --- a/docs/sdk/models/operations/getlibrarydetailsfield.md +++ /dev/null @@ -1,23 +0,0 @@ -# GetLibraryDetailsField - -## Example Usage - -```typescript -import { GetLibraryDetailsField } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryDetailsField = { - key: "label", - title: "Label", - type: "tag", - subType: "bitrate", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `key` | *string* | :heavy_minus_sign: | N/A | label | -| `title` | *string* | :heavy_minus_sign: | N/A | Label | -| `type` | *string* | :heavy_minus_sign: | N/A | tag | -| `subType` | *string* | :heavy_minus_sign: | N/A | bitrate | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarydetailsfieldtype.md b/docs/sdk/models/operations/getlibrarydetailsfieldtype.md deleted file mode 100644 index 9d4c725f..00000000 --- a/docs/sdk/models/operations/getlibrarydetailsfieldtype.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetLibraryDetailsFieldType - -## Example Usage - -```typescript -import { GetLibraryDetailsFieldType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryDetailsFieldType = { - type: "resolution", - operator: [ - { - key: "=", - title: "is", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `type` | *string* | :heavy_minus_sign: | N/A | resolution | -| `operator` | [operations.GetLibraryDetailsOperator](../../../sdk/models/operations/getlibrarydetailsoperator.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarydetailsfilter.md b/docs/sdk/models/operations/getlibrarydetailsfilter.md deleted file mode 100644 index 266c03d8..00000000 --- a/docs/sdk/models/operations/getlibrarydetailsfilter.md +++ /dev/null @@ -1,25 +0,0 @@ -# GetLibraryDetailsFilter - -## Example Usage - -```typescript -import { GetLibraryDetailsFilter } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryDetailsFilter = { - filter: "label", - filterType: "string", - key: "/library/sections/1/label", - title: "Labels", - type: "filter", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `filter` | *string* | :heavy_minus_sign: | N/A | label | -| `filterType` | *string* | :heavy_minus_sign: | N/A | string | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/sections/1/label | -| `title` | *string* | :heavy_minus_sign: | N/A | Labels | -| `type` | *string* | :heavy_minus_sign: | N/A | filter | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarydetailsglobals.md b/docs/sdk/models/operations/getlibrarydetailsglobals.md new file mode 100644 index 00000000..57c4cc2a --- /dev/null +++ b/docs/sdk/models/operations/getlibrarydetailsglobals.md @@ -0,0 +1,35 @@ +# GetLibraryDetailsGlobals + +## Example Usage + +```typescript +import { GetLibraryDetailsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetLibraryDetailsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarydetailsmediacontainer.md b/docs/sdk/models/operations/getlibrarydetailsmediacontainer.md index 1f0af0ea..8ec7b62e 100644 --- a/docs/sdk/models/operations/getlibrarydetailsmediacontainer.md +++ b/docs/sdk/models/operations/getlibrarydetailsmediacontainer.md @@ -6,69 +6,153 @@ 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: [ { - 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: [ + autotag: [ { - filter: "label", - filterType: "string", - key: "/library/sections/1/label", - title: "Labels", - type: "filter", + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", }, ], - sort: [ + country: [ { - default: "asc", - defaultDirection: "desc", - descKey: "random:desc", - firstCharacterKey: "/library/sections/1/firstCharacter", - key: "random", - title: "Randomly", + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", }, ], - field: [ + director: [ { - key: "label", - title: "Label", - type: "tag", - subType: "bitrate", + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", }, ], - }, - ], - fieldType: [ - { - type: "resolution", - operator: [ + genre: [ { - key: "=", - title: "is", + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", }, ], }, @@ -78,20 +162,19 @@ let value: GetLibraryDetailsMediaContainer = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 29 | -| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | false | -| `art` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg | -| `content` | *string* | :heavy_minus_sign: | N/A | secondary | -| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | -| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `mediaTagVersion` | *number* | :heavy_minus_sign: | N/A | 1701731894 | -| `thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie.png | -| `title1` | *string* | :heavy_minus_sign: | N/A | Movies | -| `viewGroup` | *string* | :heavy_minus_sign: | N/A | secondary | -| `viewMode` | *number* | :heavy_minus_sign: | N/A | 65592 | -| `directory` | [operations.GetLibraryDetailsDirectory](../../../sdk/models/operations/getlibrarydetailsdirectory.md)[] | :heavy_minus_sign: | N/A | | -| `type` | [operations.GetLibraryDetailsType](../../../sdk/models/operations/getlibrarydetailstype.md)[] | :heavy_minus_sign: | N/A | | -| `fieldType` | [operations.GetLibraryDetailsFieldType](../../../sdk/models/operations/getlibrarydetailsfieldtype.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `content` | *string* | :heavy_minus_sign: | The flavors of directory found here:
- Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users.
- Secondary: These are marked with `"secondary": true` and were used by old clients to provide nested menus allowing for primative (but structured) navigation.
- Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `"search": true` which used to be used to allow clients to build search dialogs on the fly. | +| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | +| `art` | *string* | :heavy_minus_sign: | N/A | +| `directory` | [shared.Metadata](../../../sdk/models/shared/metadata.md)[] | :heavy_minus_sign: | N/A | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | +| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | +| `mediaTagVersion` | *number* | :heavy_minus_sign: | N/A | +| `size` | *number* | :heavy_minus_sign: | N/A | +| `sortAsc` | *boolean* | :heavy_minus_sign: | N/A | +| `thumb` | *string* | :heavy_minus_sign: | N/A | +| `title1` | *string* | :heavy_minus_sign: | N/A | +| `viewGroup` | *string* | :heavy_minus_sign: | N/A | +| `viewMode` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarydetailsoperator.md b/docs/sdk/models/operations/getlibrarydetailsoperator.md deleted file mode 100644 index 2767f969..00000000 --- a/docs/sdk/models/operations/getlibrarydetailsoperator.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetLibraryDetailsOperator - -## Example Usage - -```typescript -import { GetLibraryDetailsOperator } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryDetailsOperator = { - key: "=", - title: "is", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `key` | *string* | :heavy_minus_sign: | N/A | = | -| `title` | *string* | :heavy_minus_sign: | N/A | is | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarydetailsrequest.md b/docs/sdk/models/operations/getlibrarydetailsrequest.md index 1d366687..0b2a5749 100644 --- a/docs/sdk/models/operations/getlibrarydetailsrequest.md +++ b/docs/sdk/models/operations/getlibrarydetailsrequest.md @@ -4,15 +4,27 @@ ```typescript import { GetLibraryDetailsRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; let value: GetLibraryDetailsRequest = { - sectionKey: 9518, + sectionId: "", + includeDetails: BoolInt.One, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `includeDetails` | [operations.IncludeDetails](../../../sdk/models/operations/includedetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts).
Only exists for backwards compatibility, media providers other than the server libraries have it on always.
| | -| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *string* | :heavy_check_mark: | The section identifier | | +| `includeDetails` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts). Only exists for backwards compatibility, media providers other than the server libraries have it on always. | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarydetailsresponse.md b/docs/sdk/models/operations/getlibrarydetailsresponse.md index c0bb9beb..6a1d52fe 100644 --- a/docs/sdk/models/operations/getlibrarydetailsresponse.md +++ b/docs/sdk/models/operations/getlibrarydetailsresponse.md @@ -18,4 +18,4 @@ let value: GetLibraryDetailsResponse = { | `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 | -| `object` | [operations.GetLibraryDetailsResponseBody](../../../sdk/models/operations/getlibrarydetailsresponsebody.md) | :heavy_minus_sign: | The details of the library | \ No newline at end of file +| `object` | [operations.GetLibraryDetailsResponseBody](../../../sdk/models/operations/getlibrarydetailsresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarydetailsresponsebody.md b/docs/sdk/models/operations/getlibrarydetailsresponsebody.md index 1981d42c..a0dd441d 100644 --- a/docs/sdk/models/operations/getlibrarydetailsresponsebody.md +++ b/docs/sdk/models/operations/getlibrarydetailsresponsebody.md @@ -1,6 +1,6 @@ # GetLibraryDetailsResponseBody -The details of the library +OK ## Example Usage @@ -9,69 +9,153 @@ import { GetLibraryDetailsResponseBody } from "@lukehagar/plexjs/sdk/models/oper 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, - }, - ], - type: [ - { - key: "/library/sections/1/all?type=1", - type: "movie", - title: "Movies", - active: false, - filter: [ + autotag: [ { - filter: "label", - filterType: "string", - key: "/library/sections/1/label", - title: "Labels", - type: "filter", + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", }, ], - sort: [ + country: [ { - default: "asc", - defaultDirection: "desc", - descKey: "random:desc", - firstCharacterKey: "/library/sections/1/firstCharacter", - key: "random", - title: "Randomly", + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", }, ], - field: [ + director: [ { - key: "label", - title: "Label", - type: "tag", - subType: "bitrate", + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", }, ], - }, - ], - fieldType: [ - { - type: "resolution", - operator: [ + genre: [ { - key: "=", - title: "is", + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", }, ], }, diff --git a/docs/sdk/models/operations/getlibrarydetailssort.md b/docs/sdk/models/operations/getlibrarydetailssort.md deleted file mode 100644 index aed7e297..00000000 --- a/docs/sdk/models/operations/getlibrarydetailssort.md +++ /dev/null @@ -1,27 +0,0 @@ -# GetLibraryDetailsSort - -## Example Usage - -```typescript -import { GetLibraryDetailsSort } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryDetailsSort = { - default: "asc", - defaultDirection: "desc", - descKey: "random:desc", - firstCharacterKey: "/library/sections/1/firstCharacter", - key: "random", - title: "Randomly", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| `default` | *string* | :heavy_minus_sign: | N/A | asc | -| `defaultDirection` | *string* | :heavy_minus_sign: | N/A | desc | -| `descKey` | *string* | :heavy_minus_sign: | N/A | random:desc | -| `firstCharacterKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/1/firstCharacter | -| `key` | *string* | :heavy_minus_sign: | N/A | random | -| `title` | *string* | :heavy_minus_sign: | N/A | Randomly | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarydetailstype.md b/docs/sdk/models/operations/getlibrarydetailstype.md deleted file mode 100644 index 46f7a04a..00000000 --- a/docs/sdk/models/operations/getlibrarydetailstype.md +++ /dev/null @@ -1,53 +0,0 @@ -# GetLibraryDetailsType - -## Example Usage - -```typescript -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", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/sections/1/all?type=1 | -| `type` | *string* | :heavy_minus_sign: | N/A | movie | -| `title` | *string* | :heavy_minus_sign: | N/A | Movies | -| `active` | *boolean* | :heavy_minus_sign: | N/A | false | -| `filter` | [operations.GetLibraryDetailsFilter](../../../sdk/models/operations/getlibrarydetailsfilter.md)[] | :heavy_minus_sign: | N/A | | -| `sort` | [operations.GetLibraryDetailsSort](../../../sdk/models/operations/getlibrarydetailssort.md)[] | :heavy_minus_sign: | N/A | | -| `field` | [operations.GetLibraryDetailsField](../../../sdk/models/operations/getlibrarydetailsfield.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryhubscountry.md b/docs/sdk/models/operations/getlibraryhubscountry.md deleted file mode 100644 index f3cd2087..00000000 --- a/docs/sdk/models/operations/getlibraryhubscountry.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetLibraryHubsCountry - -## Example Usage - -```typescript -import { GetLibraryHubsCountry } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryHubsCountry = { - tag: "United States of America", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | -| `tag` | *string* | :heavy_minus_sign: | N/A | United States of America | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryhubsdirector.md b/docs/sdk/models/operations/getlibraryhubsdirector.md deleted file mode 100644 index 33d70106..00000000 --- a/docs/sdk/models/operations/getlibraryhubsdirector.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetLibraryHubsDirector - -## Example Usage - -```typescript -import { GetLibraryHubsDirector } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryHubsDirector = { - tag: "Nathan Greno", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *string* | :heavy_minus_sign: | N/A | Nathan Greno | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryhubsgenre.md b/docs/sdk/models/operations/getlibraryhubsgenre.md deleted file mode 100644 index 752b3f72..00000000 --- a/docs/sdk/models/operations/getlibraryhubsgenre.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetLibraryHubsGenre - -## Example Usage - -```typescript -import { GetLibraryHubsGenre } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryHubsGenre = { - tag: "Animation", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *string* | :heavy_minus_sign: | N/A | Animation | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryhubshub.md b/docs/sdk/models/operations/getlibraryhubshub.md deleted file mode 100644 index f81bc8a3..00000000 --- a/docs/sdk/models/operations/getlibraryhubshub.md +++ /dev/null @@ -1,132 +0,0 @@ -# GetLibraryHubsHub - -## Example Usage - -```typescript -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: [ - { - 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, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0 | -| `title` | *string* | :heavy_minus_sign: | N/A | Recently Played Movies | -| `type` | *string* | :heavy_minus_sign: | N/A | movie | -| `hubIdentifier` | *string* | :heavy_minus_sign: | N/A | movie.recentlyviewed.1 | -| `context` | *string* | :heavy_minus_sign: | N/A | hub.movie.recentlyviewed | -| `size` | *number* | :heavy_minus_sign: | N/A | 6 | -| `more` | *boolean* | :heavy_minus_sign: | N/A | true | -| `style` | *string* | :heavy_minus_sign: | N/A | shelf | -| `hubKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66485,66098,57249,11449,5858,14944 | -| `metadata` | [operations.GetLibraryHubsMetadata](../../../sdk/models/operations/getlibraryhubsmetadata.md)[] | :heavy_minus_sign: | N/A | | -| `promoted` | *boolean* | :heavy_minus_sign: | N/A | true | -| `random` | *boolean* | :heavy_minus_sign: | N/A | true | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryhubsmedia.md b/docs/sdk/models/operations/getlibraryhubsmedia.md deleted file mode 100644 index 1b57bd2f..00000000 --- a/docs/sdk/models/operations/getlibraryhubsmedia.md +++ /dev/null @@ -1,62 +0,0 @@ -# GetLibraryHubsMedia - -## Example Usage - -```typescript -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", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_minus_sign: | N/A | 38247 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 6017237 | -| `bitrate` | *number* | :heavy_minus_sign: | N/A | 2051 | -| `width` | *number* | :heavy_minus_sign: | N/A | 1920 | -| `height` | *number* | :heavy_minus_sign: | N/A | 1080 | -| `aspectRatio` | *number* | :heavy_minus_sign: | N/A | 1.78 | -| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 2 | -| `audioCodec` | *string* | :heavy_minus_sign: | N/A | aac | -| `videoCodec` | *string* | :heavy_minus_sign: | N/A | h264 | -| `videoResolution` | *string* | :heavy_minus_sign: | N/A | 1080 | -| `container` | *string* | :heavy_minus_sign: | N/A | mp4 | -| `videoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p | -| `optimizedForStreaming` | *number* | :heavy_minus_sign: | N/A | 1 | -| `audioProfile` | *string* | :heavy_minus_sign: | N/A | lc | -| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | -| `videoProfile` | *string* | :heavy_minus_sign: | N/A | high | -| `part` | [operations.GetLibraryHubsPart](../../../sdk/models/operations/getlibraryhubspart.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryhubsmediacontainer.md b/docs/sdk/models/operations/getlibraryhubsmediacontainer.md deleted file mode 100644 index 179354e7..00000000 --- a/docs/sdk/models/operations/getlibraryhubsmediacontainer.md +++ /dev/null @@ -1,138 +0,0 @@ -# GetLibraryHubsMediaContainer - -## Example Usage - -```typescript -import { GetLibraryHubsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; -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: [ - { - 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, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 7 | -| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | true | -| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | -| `librarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | -| `hub` | [operations.GetLibraryHubsHub](../../../sdk/models/operations/getlibraryhubshub.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryhubsmetadata.md b/docs/sdk/models/operations/getlibraryhubsmetadata.md deleted file mode 100644 index a212ddf9..00000000 --- a/docs/sdk/models/operations/getlibraryhubsmetadata.md +++ /dev/null @@ -1,138 +0,0 @@ -# GetLibraryHubsMetadata - -## Example Usage - -```typescript -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: [ - { - 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", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 14944 | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/14944 | -| `guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d77686eeb5d26001f1eb339 | -| `studio` | *string* | :heavy_minus_sign: | N/A | Walt Disney Animation Studios | -| `type` | *string* | :heavy_minus_sign: | N/A | movie | -| `title` | *string* | :heavy_minus_sign: | N/A | Tangled | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | -| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | -| `librarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/1 | -| `contentRating` | *string* | :heavy_minus_sign: | N/A | PG | -| `summary` | *string* | :heavy_minus_sign: | N/A | 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` | *number* | :heavy_minus_sign: | N/A | 8.9 | -| `audienceRating` | *number* | :heavy_minus_sign: | N/A | 8.7 | -| `viewCount` | *number* | :heavy_minus_sign: | N/A | 1 | -| `lastViewedAt` | *number* | :heavy_minus_sign: | N/A | 1704936047 | -| `year` | *number* | :heavy_minus_sign: | N/A | 2010 | -| `tagline` | *string* | :heavy_minus_sign: | N/A | They're taking adventure to new lengths. | -| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/14944/thumb/1705739847 | -| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/14944/art/1705739847 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 6017237 | -| `originallyAvailableAt` | [RFCDate](../../../types/rfcdate.md) | :heavy_minus_sign: | N/A | 2010-11-24 00:00:00 +0000 UTC | -| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1589412494 | -| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705739847 | -| `audienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | -| `primaryExtraKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/14952 | -| `ratingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | -| `media` | [operations.GetLibraryHubsMedia](../../../sdk/models/operations/getlibraryhubsmedia.md)[] | :heavy_minus_sign: | N/A | | -| `genre` | [operations.GetLibraryHubsGenre](../../../sdk/models/operations/getlibraryhubsgenre.md)[] | :heavy_minus_sign: | N/A | | -| `country` | [operations.GetLibraryHubsCountry](../../../sdk/models/operations/getlibraryhubscountry.md)[] | :heavy_minus_sign: | N/A | | -| `director` | [operations.GetLibraryHubsDirector](../../../sdk/models/operations/getlibraryhubsdirector.md)[] | :heavy_minus_sign: | N/A | | -| `role` | [operations.GetLibraryHubsRole](../../../sdk/models/operations/getlibraryhubsrole.md)[] | :heavy_minus_sign: | N/A | | -| `writer` | [operations.GetLibraryHubsWriter](../../../sdk/models/operations/getlibraryhubswriter.md)[] | :heavy_minus_sign: | N/A | | -| `skipCount` | *number* | :heavy_minus_sign: | N/A | 1 | -| `chapterSource` | *string* | :heavy_minus_sign: | N/A | media | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryhubspart.md b/docs/sdk/models/operations/getlibraryhubspart.md deleted file mode 100644 index 535ffa8d..00000000 --- a/docs/sdk/models/operations/getlibraryhubspart.md +++ /dev/null @@ -1,35 +0,0 @@ -# GetLibraryHubsPart - -## Example Usage - -```typescript -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", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `id` | *number* | :heavy_minus_sign: | N/A | 38247 | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/parts/38247/1589412494/file.mp4 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 6017237 | -| `file` | *string* | :heavy_minus_sign: | N/A | /movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4 | -| `size` | *number* | :heavy_minus_sign: | N/A | 1545647447 | -| `audioProfile` | *string* | :heavy_minus_sign: | N/A | lc | -| `container` | *string* | :heavy_minus_sign: | N/A | mp4 | -| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | -| `optimizedForStreaming` | *boolean* | :heavy_minus_sign: | N/A | true | -| `videoProfile` | *string* | :heavy_minus_sign: | N/A | high | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryhubsrequest.md b/docs/sdk/models/operations/getlibraryhubsrequest.md deleted file mode 100644 index 2d44aefb..00000000 --- a/docs/sdk/models/operations/getlibraryhubsrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetLibraryHubsRequest - -## Example Usage - -```typescript -import { GetLibraryHubsRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryHubsRequest = { - sectionId: 7247.75, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query | -| `count` | *number* | :heavy_minus_sign: | The number of items to return with each hub. | -| `onlyTransient` | [operations.QueryParamOnlyTransient](../../../sdk/models/operations/queryparamonlytransient.md) | :heavy_minus_sign: | 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). | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryhubsresponse.md b/docs/sdk/models/operations/getlibraryhubsresponse.md deleted file mode 100644 index 8e0520a6..00000000 --- a/docs/sdk/models/operations/getlibraryhubsresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetLibraryHubsResponse - -## Example Usage - -```typescript -import { GetLibraryHubsResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryHubsResponse = { - contentType: "", - statusCode: 455564, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetLibraryHubsResponseBody](../../../sdk/models/operations/getlibraryhubsresponsebody.md) | :heavy_minus_sign: | The hubs specific to the library | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryhubsresponsebody.md b/docs/sdk/models/operations/getlibraryhubsresponsebody.md deleted file mode 100644 index d950fbcd..00000000 --- a/docs/sdk/models/operations/getlibraryhubsresponsebody.md +++ /dev/null @@ -1,136 +0,0 @@ -# GetLibraryHubsResponseBody - -The hubs specific to the library - -## Example Usage - -```typescript -import { GetLibraryHubsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; -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", - }, - ], - promoted: true, - random: true, - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetLibraryHubsMediaContainer](../../../sdk/models/operations/getlibraryhubsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryhubsrole.md b/docs/sdk/models/operations/getlibraryhubsrole.md deleted file mode 100644 index 4ba46b64..00000000 --- a/docs/sdk/models/operations/getlibraryhubsrole.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetLibraryHubsRole - -## Example Usage - -```typescript -import { GetLibraryHubsRole } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryHubsRole = { - tag: "Donna Murphy", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *string* | :heavy_minus_sign: | N/A | Donna Murphy | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryhubswriter.md b/docs/sdk/models/operations/getlibraryhubswriter.md deleted file mode 100644 index 43011a2b..00000000 --- a/docs/sdk/models/operations/getlibraryhubswriter.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetLibraryHubsWriter - -## Example Usage - -```typescript -import { GetLibraryHubsWriter } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryHubsWriter = { - tag: "Wilhelm Grimm", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *string* | :heavy_minus_sign: | N/A | Wilhelm Grimm | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsactivedirection.md b/docs/sdk/models/operations/getlibraryitemsactivedirection.md deleted file mode 100644 index 68591818..00000000 --- a/docs/sdk/models/operations/getlibraryitemsactivedirection.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetLibraryItemsActiveDirection - -The direction of the sort. Can be either `asc` or `desc`. - - -## Example Usage - -```typescript -import { GetLibraryItemsActiveDirection } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsActiveDirection = - GetLibraryItemsActiveDirection.Ascending; -``` - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Ascending` | asc | -| `Descending` | desc | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemscollection.md b/docs/sdk/models/operations/getlibraryitemscollection.md deleted file mode 100644 index 3b64f633..00000000 --- a/docs/sdk/models/operations/getlibraryitemscollection.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetLibraryItemsCollection - -## Example Usage - -```typescript -import { GetLibraryItemsCollection } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsCollection = { - tag: "My Awesome Collection", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `tag` | *string* | :heavy_check_mark: | The user-made collection this media item belongs to | My Awesome Collection | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemscountry.md b/docs/sdk/models/operations/getlibraryitemscountry.md deleted file mode 100644 index baf8f935..00000000 --- a/docs/sdk/models/operations/getlibraryitemscountry.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetLibraryItemsCountry - -## Example Usage - -```typescript -import { GetLibraryItemsCountry } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsCountry = { - id: 259, - tag: "United States of America", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | The unique identifier for the country.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | -| `tag` | *string* | :heavy_check_mark: | The country of origin of this media item | United States of America | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsdefaultdirection.md b/docs/sdk/models/operations/getlibraryitemsdefaultdirection.md deleted file mode 100644 index 2cba14c3..00000000 --- a/docs/sdk/models/operations/getlibraryitemsdefaultdirection.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetLibraryItemsDefaultDirection - -The direction of the sort. Can be either `asc` or `desc`. - - -## Example Usage - -```typescript -import { GetLibraryItemsDefaultDirection } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsDefaultDirection = - GetLibraryItemsDefaultDirection.Ascending; -``` - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Ascending` | asc | -| `Descending` | desc | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsdirector.md b/docs/sdk/models/operations/getlibraryitemsdirector.md deleted file mode 100644 index a00e8182..00000000 --- a/docs/sdk/models/operations/getlibraryitemsdirector.md +++ /dev/null @@ -1,22 +0,0 @@ -# GetLibraryItemsDirector - -## Example Usage - -```typescript -import { GetLibraryItemsDirector } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsDirector = { - id: 126522, - tag: "Danny Boyle", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | Unique identifier for the director. | 126522 | -| `tag` | *string* | :heavy_check_mark: | The role of Director | Danny Boyle | -| `thumb` | *string* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the director. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsfield.md b/docs/sdk/models/operations/getlibraryitemsfield.md deleted file mode 100644 index 157602ef..00000000 --- a/docs/sdk/models/operations/getlibraryitemsfield.md +++ /dev/null @@ -1,23 +0,0 @@ -# GetLibraryItemsField - -## Example Usage - -```typescript -import { GetLibraryItemsField } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsField = { - key: "show.title", - title: "Show Title", - type: "string", - subType: "rating", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `key` | *string* | :heavy_check_mark: | N/A | show.title | -| `title` | *string* | :heavy_check_mark: | N/A | Show Title | -| `type` | *string* | :heavy_check_mark: | N/A | string | -| `subType` | *string* | :heavy_minus_sign: | N/A | rating | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsfieldtype.md b/docs/sdk/models/operations/getlibraryitemsfieldtype.md deleted file mode 100644 index da0ee0e1..00000000 --- a/docs/sdk/models/operations/getlibraryitemsfieldtype.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetLibraryItemsFieldType - -## Example Usage - -```typescript -import { GetLibraryItemsFieldType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsFieldType = { - type: "tag", - operator: [], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `type` | *string* | :heavy_check_mark: | N/A | tag | -| `operator` | [operations.GetLibraryItemsOperator](../../../sdk/models/operations/getlibraryitemsoperator.md)[] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsfilter.md b/docs/sdk/models/operations/getlibraryitemsfilter.md deleted file mode 100644 index 87ae32d8..00000000 --- a/docs/sdk/models/operations/getlibraryitemsfilter.md +++ /dev/null @@ -1,25 +0,0 @@ -# GetLibraryItemsFilter - -## Example Usage - -```typescript -import { GetLibraryItemsFilter } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsFilter = { - filter: "genre", - filterType: "string", - key: "/library/sections/2/genre?type=2", - title: "Genre", - type: "filter", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `filter` | *string* | :heavy_check_mark: | N/A | genre | -| `filterType` | *string* | :heavy_check_mark: | N/A | string | -| `key` | *string* | :heavy_check_mark: | N/A | /library/sections/2/genre?type=2 | -| `title` | *string* | :heavy_check_mark: | N/A | Genre | -| `type` | *string* | :heavy_check_mark: | N/A | filter | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsgenre.md b/docs/sdk/models/operations/getlibraryitemsgenre.md deleted file mode 100644 index 31f5f78c..00000000 --- a/docs/sdk/models/operations/getlibraryitemsgenre.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetLibraryItemsGenre - -## Example Usage - -```typescript -import { GetLibraryItemsGenre } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsGenre = { - id: 259, - tag: "Crime", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | The unique identifier for the genre.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | -| `tag` | *string* | :heavy_check_mark: | The genre name of this media-item
| Crime | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsglobals.md b/docs/sdk/models/operations/getlibraryitemsglobals.md new file mode 100644 index 00000000..85dec377 --- /dev/null +++ b/docs/sdk/models/operations/getlibraryitemsglobals.md @@ -0,0 +1,35 @@ +# GetLibraryItemsGlobals + +## Example Usage + +```typescript +import { GetLibraryItemsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetLibraryItemsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsguids.md b/docs/sdk/models/operations/getlibraryitemsguids.md deleted file mode 100644 index 91bc572e..00000000 --- a/docs/sdk/models/operations/getlibraryitemsguids.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetLibraryItemsGuids - -## Example Usage - -```typescript -import { GetLibraryItemsGuids } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsGuids = { - id: - "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
| {
"imdbExample": {
"summary": "IMDB example",
"value": "imdb://tt13015952"
},
"tmdbExample": {
"summary": "TMDB example",
"value": "tmdb://2434012"
},
"tvdbExample": {
"summary": "TVDB example",
"value": "tvdb://7945991"
}
} | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemshasthumbnail.md b/docs/sdk/models/operations/getlibraryitemshasthumbnail.md deleted file mode 100644 index a7a9e9c3..00000000 --- a/docs/sdk/models/operations/getlibraryitemshasthumbnail.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetLibraryItemsHasThumbnail - -Indicates if the part has a thumbnail. - - -## Example Usage - -```typescript -import { GetLibraryItemsHasThumbnail } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsHasThumbnail = GetLibraryItemsHasThumbnail.True; -``` - -## Values - -| Name | Value | -| ------- | ------- | -| `False` | 0 | -| `True` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsimage.md b/docs/sdk/models/operations/getlibraryitemsimage.md deleted file mode 100644 index 998a8ae2..00000000 --- a/docs/sdk/models/operations/getlibraryitemsimage.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetLibraryItemsImage - -## Example Usage - -```typescript -import { GetLibraryItemsImage, GetLibraryItemsLibraryResponseType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsImage = { - alt: "Episode 1", - type: GetLibraryItemsLibraryResponseType.Background, - url: "/library/metadata/45521/thumb/1644710589", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `alt` | *string* | :heavy_check_mark: | N/A | Episode 1 | -| `type` | [operations.GetLibraryItemsLibraryResponseType](../../../sdk/models/operations/getlibraryitemslibraryresponsetype.md) | :heavy_check_mark: | N/A | background | -| `url` | *string* | :heavy_check_mark: | N/A | /library/metadata/45521/thumb/1644710589 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemslibraryoptimizedforstreaming.md b/docs/sdk/models/operations/getlibraryitemslibraryoptimizedforstreaming.md deleted file mode 100644 index 94d5d9fe..00000000 --- a/docs/sdk/models/operations/getlibraryitemslibraryoptimizedforstreaming.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetLibraryItemsLibraryOptimizedForStreaming - -Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - - - -## Supported Types - -### `operations.GetLibraryItemsOptimizedForStreaming1` - -```typescript -const value: operations.GetLibraryItemsOptimizedForStreaming1 = - GetLibraryItemsOptimizedForStreaming1.One; -``` - -### `boolean` - -```typescript -const value: boolean = true; -``` - diff --git a/docs/sdk/models/operations/getlibraryitemslibraryresponsetype.md b/docs/sdk/models/operations/getlibraryitemslibraryresponsetype.md deleted file mode 100644 index ec9c386f..00000000 --- a/docs/sdk/models/operations/getlibraryitemslibraryresponsetype.md +++ /dev/null @@ -1,22 +0,0 @@ -# GetLibraryItemsLibraryResponseType - -## Example Usage - -```typescript -import { GetLibraryItemsLibraryResponseType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsLibraryResponseType = - GetLibraryItemsLibraryResponseType.Background; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `CoverPoster` | coverPoster | -| `Background` | background | -| `Snapshot` | snapshot | -| `ClearLogo` | clearLogo | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemslibrarytype.md b/docs/sdk/models/operations/getlibraryitemslibrarytype.md deleted file mode 100644 index d25c87b2..00000000 --- a/docs/sdk/models/operations/getlibraryitemslibrarytype.md +++ /dev/null @@ -1,53 +0,0 @@ -# GetLibraryItemsLibraryType - -## Example Usage - -```typescript -import { GetLibraryItemsLibraryType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsLibraryType = { - key: "/library/sections/2/all?type=2", - type: "show", - title: "TV Shows", - active: false, - filter: [ - { - filter: "genre", - filterType: "string", - key: "/library/sections/2/genre?type=2", - title: "Genre", - type: "filter", - }, - ], - sort: [ - { - default: "asc", - active: false, - descKey: "titleSort:desc", - firstCharacterKey: "/library/sections/2/firstCharacter", - key: "titleSort", - title: "Title", - }, - ], - field: [ - { - key: "show.title", - title: "Show Title", - type: "string", - subType: "rating", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `key` | *string* | :heavy_check_mark: | N/A | /library/sections/2/all?type=2 | -| `type` | *string* | :heavy_check_mark: | N/A | show | -| `title` | *string* | :heavy_check_mark: | N/A | TV Shows | -| `active` | *boolean* | :heavy_check_mark: | N/A | false | -| `filter` | [operations.GetLibraryItemsFilter](../../../sdk/models/operations/getlibraryitemsfilter.md)[] | :heavy_minus_sign: | N/A | | -| `sort` | [operations.GetLibraryItemsSort](../../../sdk/models/operations/getlibraryitemssort.md)[] | :heavy_minus_sign: | N/A | | -| `field` | [operations.GetLibraryItemsField](../../../sdk/models/operations/getlibraryitemsfield.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemslocation.md b/docs/sdk/models/operations/getlibraryitemslocation.md deleted file mode 100644 index ffaa0bc0..00000000 --- a/docs/sdk/models/operations/getlibraryitemslocation.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetLibraryItemsLocation - -The folder path for the media item. - -## Example Usage - -```typescript -import { GetLibraryItemsLocation } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsLocation = { - path: "/TV Shows/Clarkson's Farm", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `path` | *string* | :heavy_check_mark: | N/A | /TV Shows/Clarkson's Farm | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsmedia.md b/docs/sdk/models/operations/getlibraryitemsmedia.md deleted file mode 100644 index baf17051..00000000 --- a/docs/sdk/models/operations/getlibraryitemsmedia.md +++ /dev/null @@ -1,69 +0,0 @@ -# GetLibraryItemsMedia - -## Example Usage - -```typescript -import { GetLibraryItemsHasThumbnail, GetLibraryItemsMedia } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsMedia = { - id: 387322, - duration: 9610350, - bitrate: 25512, - width: 3840, - height: 1602, - aspectRatio: 2.35, - audioChannels: 6, - displayOffset: 50, - audioCodec: "aac", - videoCodec: "hevc", - videoResolution: "4k", - container: "mp4", - videoFrameRate: "24p", - videoProfile: "main 10", - hasVoiceActivity: false, - audioProfile: "dts", - has64bitOffsets: false, - part: [ - { - accessible: true, - exists: true, - id: 418385, - key: "/library/parts/418385/1735864239/file.mkv", - indexes: "sd", - duration: 9610350, - file: "/mnt/Movies_1/W/Wicked (2024).mkv", - size: 30649952104, - packetLength: 188, - container: "mkv", - videoProfile: "main 10", - audioProfile: "dts", - has64bitOffsets: false, - hasThumbnail: GetLibraryItemsHasThumbnail.True, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | Unique media identifier. | 387322 | -| `duration` | *number* | :heavy_minus_sign: | Duration of the media in milliseconds. | 9610350 | -| `bitrate` | *number* | :heavy_minus_sign: | Bitrate in bits per second. | 25512 | -| `width` | *number* | :heavy_minus_sign: | Video width in pixels. | 3840 | -| `height` | *number* | :heavy_minus_sign: | Video height in pixels. | 1602 | -| `aspectRatio` | *number* | :heavy_minus_sign: | Aspect ratio of the video. | 2.35 | -| `audioChannels` | *number* | :heavy_minus_sign: | Number of audio channels. | 6 | -| `displayOffset` | *number* | :heavy_minus_sign: | N/A | 50 | -| `audioCodec` | *string* | :heavy_minus_sign: | Audio codec used. | aac | -| `videoCodec` | *string* | :heavy_minus_sign: | Video codec used. | hevc | -| `videoResolution` | *string* | :heavy_minus_sign: | Video resolution (e.g., 4k). | 4k | -| `container` | *string* | :heavy_minus_sign: | Container format of the media. | mp4 | -| `videoFrameRate` | *string* | :heavy_minus_sign: | Frame rate of the video. Values found include NTSC, PAL, 24p
| 24p | -| `videoProfile` | *string* | :heavy_minus_sign: | Video profile (e.g., main 10). | main 10 | -| `hasVoiceActivity` | *boolean* | :heavy_minus_sign: | Indicates whether voice activity is detected. | false | -| `audioProfile` | *string* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `optimizedForStreaming` | *operations.GetLibraryItemsOptimizedForStreaming* | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | -| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | Indicates whether the media has 64-bit offsets.
This is relevant for media files that may require larger offsets than what 32-bit integers can provide.
| false | -| `part` | [operations.GetLibraryItemsPart](../../../sdk/models/operations/getlibraryitemspart.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsmediacontainer.md b/docs/sdk/models/operations/getlibraryitemsmediacontainer.md deleted file mode 100644 index 1730e591..00000000 --- a/docs/sdk/models/operations/getlibraryitemsmediacontainer.md +++ /dev/null @@ -1,99 +0,0 @@ -# GetLibraryItemsMediaContainer - -## Example Usage - -```typescript -import { GetLibraryItemsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsMediaContainer = { - size: 50, - totalSize: 50, - offset: 0, - content: "secondary", - allowSync: false, - nocache: true, - art: "/:/resources/show-fanart.jpg", - identifier: "com.plexapp.plugins.library", - librarySectionID: 2, - librarySectionTitle: "TV Series", - librarySectionUUID: "e69655a2-ef48-4aba-bb19-0cc34d1e7d36", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1734362201, - thumb: "/:/resources/show.png", - title1: "TV Series", - title2: "By Starring Actor", - viewGroup: "secondary", - viewMode: "131131", - mixedParents: true, - metadata: [], - meta: { - type: [ - { - key: "/library/sections/2/all?type=2", - type: "show", - title: "TV Shows", - active: false, - filter: [ - { - filter: "genre", - filterType: "string", - key: "/library/sections/2/genre?type=2", - title: "Genre", - type: "filter", - }, - ], - sort: [ - { - default: "asc", - active: false, - descKey: "titleSort:desc", - firstCharacterKey: "/library/sections/2/firstCharacter", - key: "titleSort", - title: "Title", - }, - ], - field: [ - { - key: "show.title", - title: "Show Title", - type: "string", - subType: "rating", - }, - ], - }, - ], - fieldType: [ - { - type: "tag", - operator: [], - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `totalSize` | *number* | :heavy_check_mark: | Total number of media items in the library. | 50 | -| `offset` | *number* | :heavy_check_mark: | Offset value for pagination. | 0 | -| `content` | *string* | :heavy_check_mark: | The content type or mode. | secondary | -| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `nocache` | *boolean* | :heavy_check_mark: | Specifies whether caching is disabled. | true | -| `art` | *string* | :heavy_check_mark: | URL for the background artwork of the media container. | /:/resources/show-fanart.jpg | -| `identifier` | *string* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `librarySectionID` | *number* | :heavy_minus_sign: | The unique identifier for the library section. | 2 | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | The title of the library section. | TV Series | -| `librarySectionUUID` | *string* | :heavy_minus_sign: | The universally unique identifier for the library section. | e69655a2-ef48-4aba-bb19-0cc34d1e7d36 | -| `mediaTagPrefix` | *string* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | -| `mediaTagVersion` | *number* | :heavy_check_mark: | The version number for media tags. | 1734362201 | -| `thumb` | *string* | :heavy_check_mark: | URL for the thumbnail image of the media container. | /:/resources/show.png | -| `title1` | *string* | :heavy_check_mark: | The primary title of the media container. | TV Series | -| `title2` | *string* | :heavy_check_mark: | The secondary title of the media container. | By Starring Actor | -| `viewGroup` | *string* | :heavy_check_mark: | Identifier for the view group layout. | secondary | -| `viewMode` | *string* | :heavy_minus_sign: | Identifier for the view mode. | 131131 | -| `mixedParents` | *boolean* | :heavy_minus_sign: | Indicates if the media container has mixed parents. | true | -| `metadata` | [operations.GetLibraryItemsMetadata](../../../sdk/models/operations/getlibraryitemsmetadata.md)[] | :heavy_check_mark: | An array of metadata items. | | -| `meta` | [operations.GetLibraryItemsMeta](../../../sdk/models/operations/getlibraryitemsmeta.md) | :heavy_minus_sign: | The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
| | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsmeta.md b/docs/sdk/models/operations/getlibraryitemsmeta.md deleted file mode 100644 index d9244eb3..00000000 --- a/docs/sdk/models/operations/getlibraryitemsmeta.md +++ /dev/null @@ -1,61 +0,0 @@ -# GetLibraryItemsMeta - -The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - - -## Example Usage - -```typescript -import { GetLibraryItemsMeta } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsMeta = { - type: [ - { - key: "/library/sections/2/all?type=2", - type: "show", - title: "TV Shows", - active: false, - filter: [ - { - filter: "genre", - filterType: "string", - key: "/library/sections/2/genre?type=2", - title: "Genre", - type: "filter", - }, - ], - sort: [ - { - default: "asc", - active: false, - descKey: "titleSort:desc", - firstCharacterKey: "/library/sections/2/firstCharacter", - key: "titleSort", - title: "Title", - }, - ], - field: [ - { - key: "show.title", - title: "Show Title", - type: "string", - subType: "rating", - }, - ], - }, - ], - fieldType: [ - { - type: "tag", - operator: [], - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `type` | [operations.GetLibraryItemsLibraryType](../../../sdk/models/operations/getlibraryitemslibrarytype.md)[] | :heavy_minus_sign: | N/A | -| `fieldType` | [operations.GetLibraryItemsFieldType](../../../sdk/models/operations/getlibraryitemsfieldtype.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsmetadata.md b/docs/sdk/models/operations/getlibraryitemsmetadata.md deleted file mode 100644 index cd1039ee..00000000 --- a/docs/sdk/models/operations/getlibraryitemsmetadata.md +++ /dev/null @@ -1,325 +0,0 @@ -# GetLibraryItemsMetadata - -Unknown - - -## Example Usage - -```typescript -import { - FlattenSeasons, - GetLibraryItemsHasThumbnail, - GetLibraryItemsLibraryResponseType, - GetLibraryItemsMetadata, - GetLibraryItemsType, - ShowOrdering, -} 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", - slug: "4-for-texas", - studio: "20th Century Studios", - type: GetLibraryItemsType.Movie, - title: "Avatar: The Way of Water", - banner: "/library/metadata/58683/banner/1703239236", - titleSort: "Whale", - contentRating: "PG-13", - summary: - "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\n" - + "Once a familiar threat returns to finish what was previously started, Jake must\n" - + "work with Neytiri and the army of the Na'vi race to protect their home.\n" - + "", - rating: 7.6, - audienceRating: 9.2, - year: 2022, - tagline: "Return to Pandora.", - thumb: "/library/metadata/58683/thumb/1703239236", - art: "/library/metadata/58683/art/1703239236", - theme: "/library/metadata/1/theme/1705636920", - index: 1, - leafCount: 14, - viewedLeafCount: 0, - childCount: 1, - seasonCount: 2022, - duration: 11558112, - originallyAvailableAt: new RFCDate("2022-12-14"), - addedAt: 1556281940, - updatedAt: 1556281940, - audienceRatingImage: "rottentomatoes://image.rating.upright", - chapterSource: "media", - primaryExtraKey: "/library/metadata/58684", - originalTitle: "映画 ブラッククローバー 魔法帝の剣", - parentRatingKey: "66", - grandparentRatingKey: "66", - parentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentSlug: "alice-in-borderland-2020", - grandparentKey: "/library/metadata/66", - parentKey: "/library/metadata/66", - grandparentTitle: "Caprica", - grandparentThumb: "/library/metadata/66/thumb/1705716261", - grandparentTheme: "/library/metadata/66/theme/1705716261", - grandparentArt: "/library/metadata/66/art/1705716261", - parentTitle: "Caprica", - parentIndex: 1, - parentThumb: "/library/metadata/66/thumb/1705716261", - ratingImage: "rottentomatoes://image.rating.ripe", - viewCount: 1, - viewOffset: 5222500, - skipCount: 1, - subtype: "clip", - lastRatedAt: 1721813113, - createdAtAccuracy: "epoch,local", - createdAtTZOffset: "0", - lastViewedAt: 1682752242, - userRating: 10, - image: [ - { - alt: "Episode 1", - type: GetLibraryItemsLibraryResponseType.Background, - url: "/library/metadata/45521/thumb/1644710589", - }, - ], - ultraBlurColors: { - topLeft: "11333b", - topRight: "0a232d", - bottomRight: "73958", - bottomLeft: "1f5066", - }, - guids: [ - { - id: - "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}", - }, - ], - librarySectionID: 1, - librarySectionTitle: "Movies", - librarySectionKey: "/library/sections/1", - showOrdering: ShowOrdering.TvdbAbsolute, - flattenSeasons: FlattenSeasons.Show, - skipChildren: false, - media: [ - { - id: 387322, - duration: 9610350, - bitrate: 25512, - width: 3840, - height: 1602, - aspectRatio: 2.35, - audioChannels: 6, - displayOffset: 50, - audioCodec: "aac", - videoCodec: "hevc", - videoResolution: "4k", - container: "mp4", - videoFrameRate: "24p", - videoProfile: "main 10", - hasVoiceActivity: false, - audioProfile: "dts", - has64bitOffsets: false, - part: [ - { - accessible: true, - exists: true, - id: 418385, - key: "/library/parts/418385/1735864239/file.mkv", - indexes: "sd", - duration: 9610350, - file: "/mnt/Movies_1/W/Wicked (2024).mkv", - size: 30649952104, - packetLength: 188, - container: "mkv", - videoProfile: "main 10", - audioProfile: "dts", - has64bitOffsets: false, - hasThumbnail: GetLibraryItemsHasThumbnail.True, - }, - ], - }, - ], - genre: [ - { - id: 259, - tag: "Crime", - }, - ], - country: [ - { - id: 259, - tag: "United States of America", - }, - ], - director: [ - { - id: 126522, - tag: "Danny Boyle", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", - }, - ], - writer: [ - { - id: 126522, - tag: "Jamie P. Hanson", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", - }, - ], - producer: [ - { - id: 109501, - filter: "actor=109501", - tag: "Bob Odenkirk", - tagKey: "5d77683254f42c001f8c3f69", - role: "Jimmy McGill", - thumb: - "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg", - }, - ], - collection: [ - { - tag: "My Awesome Collection", - }, - ], - role: [ - { - id: 126522, - tag: "Teller", - role: "Self - Judge", - thumb: - "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg", - }, - ], - ratings: [ - { - image: "imdb://image.rating", - value: 9, - type: "audience", - }, - ], - similar: [ - { - id: 26, - filter: "similar=26", - tag: "Breaking Bad", - }, - ], - location: [ - { - path: "/TV Shows/Clarkson's Farm", - }, - ], - chapter: [ - { - id: 4, - filter: "thumb=4", - index: 1, - startTimeOffset: 0, - endTimeOffset: 100100, - thumb: "/library/media/46883/chapterImages/1", - }, - ], - marker: [ - { - id: 306970, - type: "credits", - startTimeOffset: 4176050, - endTimeOffset: 4393389, - final: true, - attributes: { - id: 306970, - version: 4, - }, - }, - ], - extras: { - size: 1, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *string* | :heavy_check_mark: | The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. | 58683 | -| `key` | *string* | :heavy_check_mark: | The unique key for the media item. | /library/metadata/58683 | -| `guid` | *string* | :heavy_check_mark: | The globally unique identifier for the media item. | plex://movie/5d7768ba96b655001fdc0408 | -| `slug` | *string* | :heavy_check_mark: | A URL‐friendly version of the media title. | 4-for-texas | -| `studio` | *string* | :heavy_minus_sign: | The studio that produced the media item. | 20th Century Studios | -| `type` | [operations.GetLibraryItemsType](../../../sdk/models/operations/getlibraryitemstype.md) | :heavy_check_mark: | N/A | movie | -| `title` | *string* | :heavy_check_mark: | The title of the media item. | Avatar: The Way of Water | -| `banner` | *string* | :heavy_check_mark: | The banner image URL for the media item. | /library/metadata/58683/banner/1703239236 | -| `titleSort` | *string* | :heavy_check_mark: | The sort title used for ordering media items. | Whale | -| `contentRating` | *string* | :heavy_minus_sign: | The content rating for the media item. | PG-13 | -| `summary` | *string* | :heavy_check_mark: | A synopsis of the media item. | 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` | *number* | :heavy_check_mark: | The critic rating for the media item. | 7.6 | -| `audienceRating` | *number* | :heavy_check_mark: | The audience rating for the media item. | 9.2 | -| `year` | *number* | :heavy_minus_sign: | The release year of the media item. | 2022 | -| `tagline` | *string* | :heavy_check_mark: | A brief tagline for the media item. | Return to Pandora. | -| `thumb` | *string* | :heavy_check_mark: | The thumbnail image URL for the media item. | /library/metadata/58683/thumb/1703239236 | -| `art` | *string* | :heavy_check_mark: | The art image URL for the media item. | /library/metadata/58683/art/1703239236 | -| `theme` | *string* | :heavy_check_mark: | The theme URL for the media item. | /library/metadata/1/theme/1705636920 | -| `index` | *number* | :heavy_check_mark: | The index position of the media item. | 1 | -| `leafCount` | *number* | :heavy_minus_sign: | The number of leaf items (end nodes) under this media item. | 14 | -| `viewedLeafCount` | *number* | :heavy_minus_sign: | The number of leaf items that have been viewed. | 0 | -| `childCount` | *number* | :heavy_check_mark: | The number of child items associated with this media item. | 1 | -| `seasonCount` | *number* | :heavy_check_mark: | The total number of seasons (for TV shows). | 2022 | -| `duration` | *number* | :heavy_check_mark: | The duration of the media item in milliseconds. | 11558112 | -| `originallyAvailableAt` | [RFCDate](../../../types/rfcdate.md) | :heavy_minus_sign: | The original release date of the media item. | 2022-12-14 | -| `addedAt` | *number* | :heavy_check_mark: | N/A | 1556281940 | -| `updatedAt` | *number* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 | -| `audienceRatingImage` | *string* | :heavy_minus_sign: | The URL for the audience rating image. | rottentomatoes://image.rating.upright | -| `chapterSource` | *string* | :heavy_minus_sign: | The source from which chapter data is derived. | media | -| `primaryExtraKey` | *string* | :heavy_minus_sign: | The primary extra key associated with this media item. | /library/metadata/58684 | -| `originalTitle` | *string* | :heavy_minus_sign: | The original title of the media item (if different). | 映画 ブラッククローバー 魔法帝の剣 | -| `parentRatingKey` | *string* | :heavy_minus_sign: | The rating key of the parent media item. | 66 | -| `grandparentRatingKey` | *string* | :heavy_minus_sign: | The rating key of the grandparent media item. | 66 | -| `parentGuid` | *string* | :heavy_minus_sign: | The GUID of the parent media item. | plex://show/5d9c081b170e24001f2a7be4 | -| `grandparentGuid` | *string* | :heavy_minus_sign: | The GUID of the grandparent media item. | plex://show/5d9c081b170e24001f2a7be4 | -| `grandparentSlug` | *string* | :heavy_minus_sign: | The slug for the grandparent media item. | alice-in-borderland-2020 | -| `grandparentKey` | *string* | :heavy_minus_sign: | The key of the grandparent media item. | /library/metadata/66 | -| `parentKey` | *string* | :heavy_minus_sign: | The key of the parent media item. | /library/metadata/66 | -| `grandparentTitle` | *string* | :heavy_minus_sign: | The title of the grandparent media item. | Caprica | -| `grandparentThumb` | *string* | :heavy_minus_sign: | The thumbnail URL for the grandparent media item. | /library/metadata/66/thumb/1705716261 | -| `grandparentTheme` | *string* | :heavy_minus_sign: | The theme URL for the grandparent media item. | /library/metadata/66/theme/1705716261 | -| `grandparentArt` | *string* | :heavy_minus_sign: | The art URL for the grandparent media item. | /library/metadata/66/art/1705716261 | -| `parentTitle` | *string* | :heavy_minus_sign: | The title of the parent media item. | Caprica | -| `parentIndex` | *number* | :heavy_minus_sign: | The index position of the parent media item. | 1 | -| `parentThumb` | *string* | :heavy_minus_sign: | The thumbnail URL for the parent media item. | /library/metadata/66/thumb/1705716261 | -| `ratingImage` | *string* | :heavy_minus_sign: | The URL for the rating image. | rottentomatoes://image.rating.ripe | -| `viewCount` | *number* | :heavy_minus_sign: | The number of times this media item has been viewed. | 1 | -| `viewOffset` | *number* | :heavy_minus_sign: | The current playback offset (in milliseconds). | 5222500 | -| `skipCount` | *number* | :heavy_minus_sign: | The number of times this media item has been skipped. | 1 | -| `subtype` | *string* | :heavy_minus_sign: | A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. | clip | -| `lastRatedAt` | *number* | :heavy_minus_sign: | The Unix timestamp representing the last time the item was rated. | 1721813113 | -| `createdAtAccuracy` | *string* | :heavy_minus_sign: | The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). | epoch,local | -| `createdAtTZOffset` | *string* | :heavy_minus_sign: | The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. | 0 | -| `lastViewedAt` | *number* | :heavy_minus_sign: | Unix timestamp for when the media item was last viewed. | 1682752242 | -| `userRating` | *number* | :heavy_minus_sign: | The rating provided by a user for the item. This value is expressed as a decimal number. | 10 | -| `image` | [operations.GetLibraryItemsImage](../../../sdk/models/operations/getlibraryitemsimage.md)[] | :heavy_minus_sign: | N/A | | -| `ultraBlurColors` | [operations.GetLibraryItemsUltraBlurColors](../../../sdk/models/operations/getlibraryitemsultrablurcolors.md) | :heavy_minus_sign: | N/A | | -| `guids` | [operations.GetLibraryItemsGuids](../../../sdk/models/operations/getlibraryitemsguids.md)[] | :heavy_minus_sign: | N/A | | -| `librarySectionID` | *number* | :heavy_minus_sign: | The identifier for the library section. | 1 | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | The title of the library section. | Movies | -| `librarySectionKey` | *string* | :heavy_minus_sign: | The key corresponding to the library section. | /library/sections/1 | -| `showOrdering` | [operations.ShowOrdering](../../../sdk/models/operations/showordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show.
Options:
- None = Library default
- tmdbAiring = The Movie Database (Aired)
- aired = TheTVDB (Aired)
- dvd = TheTVDB (DVD)
- absolute = TheTVDB (Absolute)
| absolute | -| `flattenSeasons` | [operations.FlattenSeasons](../../../sdk/models/operations/flattenseasons.md) | :heavy_minus_sign: | Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
| 1 | -| `skipChildren` | *boolean* | :heavy_minus_sign: | Indicates whether child items should be skipped. | false | -| `media` | [operations.GetLibraryItemsMedia](../../../sdk/models/operations/getlibraryitemsmedia.md)[] | :heavy_minus_sign: | N/A | | -| `genre` | [operations.GetLibraryItemsGenre](../../../sdk/models/operations/getlibraryitemsgenre.md)[] | :heavy_minus_sign: | N/A | | -| `country` | [operations.GetLibraryItemsCountry](../../../sdk/models/operations/getlibraryitemscountry.md)[] | :heavy_minus_sign: | N/A | | -| `director` | [operations.GetLibraryItemsDirector](../../../sdk/models/operations/getlibraryitemsdirector.md)[] | :heavy_minus_sign: | N/A | | -| `writer` | [operations.GetLibraryItemsWriter](../../../sdk/models/operations/getlibraryitemswriter.md)[] | :heavy_minus_sign: | N/A | | -| `producer` | [operations.GetLibraryItemsProducer](../../../sdk/models/operations/getlibraryitemsproducer.md)[] | :heavy_minus_sign: | N/A | | -| `collection` | [operations.GetLibraryItemsCollection](../../../sdk/models/operations/getlibraryitemscollection.md)[] | :heavy_minus_sign: | N/A | | -| `role` | [operations.GetLibraryItemsRole](../../../sdk/models/operations/getlibraryitemsrole.md)[] | :heavy_minus_sign: | N/A | | -| `ratings` | [operations.Ratings](../../../sdk/models/operations/ratings.md)[] | :heavy_minus_sign: | N/A | | -| `similar` | [operations.GetLibraryItemsSimilar](../../../sdk/models/operations/getlibraryitemssimilar.md)[] | :heavy_minus_sign: | N/A | | -| `location` | [operations.GetLibraryItemsLocation](../../../sdk/models/operations/getlibraryitemslocation.md)[] | :heavy_minus_sign: | N/A | | -| `chapter` | [operations.Chapter](../../../sdk/models/operations/chapter.md)[] | :heavy_minus_sign: | N/A | | -| `marker` | [operations.Marker](../../../sdk/models/operations/marker.md)[] | :heavy_minus_sign: | N/A | | -| `extras` | [operations.Extras](../../../sdk/models/operations/extras.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsoperator.md b/docs/sdk/models/operations/getlibraryitemsoperator.md deleted file mode 100644 index e8aa4b14..00000000 --- a/docs/sdk/models/operations/getlibraryitemsoperator.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetLibraryItemsOperator - -## Example Usage - -```typescript -import { GetLibraryItemsOperator } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsOperator = { - key: "=", - title: "is", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `key` | *string* | :heavy_check_mark: | N/A | = | -| `title` | *string* | :heavy_check_mark: | N/A | is | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsoptimizedforstreaming.md b/docs/sdk/models/operations/getlibraryitemsoptimizedforstreaming.md deleted file mode 100644 index 2ea3846e..00000000 --- a/docs/sdk/models/operations/getlibraryitemsoptimizedforstreaming.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetLibraryItemsOptimizedForStreaming - -Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - - -## Supported Types - -### `operations.OptimizedForStreaming1` - -```typescript -const value: operations.OptimizedForStreaming1 = OptimizedForStreaming1.One; -``` - -### `boolean` - -```typescript -const value: boolean = true; -``` - diff --git a/docs/sdk/models/operations/getlibraryitemsoptimizedforstreaming1.md b/docs/sdk/models/operations/getlibraryitemsoptimizedforstreaming1.md deleted file mode 100644 index dc9ea553..00000000 --- a/docs/sdk/models/operations/getlibraryitemsoptimizedforstreaming1.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetLibraryItemsOptimizedForStreaming1 - -## Example Usage - -```typescript -import { GetLibraryItemsOptimizedForStreaming1 } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsOptimizedForStreaming1 = - GetLibraryItemsOptimizedForStreaming1.One; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemspart.md b/docs/sdk/models/operations/getlibraryitemspart.md deleted file mode 100644 index c35d5580..00000000 --- a/docs/sdk/models/operations/getlibraryitemspart.md +++ /dev/null @@ -1,44 +0,0 @@ -# GetLibraryItemsPart - -## Example Usage - -```typescript -import { GetLibraryItemsHasThumbnail, GetLibraryItemsPart } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsPart = { - accessible: true, - exists: true, - id: 418385, - key: "/library/parts/418385/1735864239/file.mkv", - indexes: "sd", - duration: 9610350, - file: "/mnt/Movies_1/W/Wicked (2024).mkv", - size: 30649952104, - packetLength: 188, - container: "mkv", - videoProfile: "main 10", - audioProfile: "dts", - has64bitOffsets: false, - hasThumbnail: GetLibraryItemsHasThumbnail.True, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `accessible` | *boolean* | :heavy_minus_sign: | Indicates if the part is accessible. | true | -| `exists` | *boolean* | :heavy_minus_sign: | Indicates if the part exists. | true | -| `id` | *number* | :heavy_check_mark: | Unique part identifier. | 418385 | -| `key` | *string* | :heavy_minus_sign: | Key to access this part. | /library/parts/418385/1735864239/file.mkv | -| `indexes` | *string* | :heavy_minus_sign: | N/A | sd | -| `duration` | *number* | :heavy_minus_sign: | Duration of the part in milliseconds. | 9610350 | -| `file` | *string* | :heavy_minus_sign: | File path for the part. | /mnt/Movies_1/W/Wicked (2024).mkv | -| `size` | *number* | :heavy_minus_sign: | File size in bytes. | 30649952104 | -| `packetLength` | *number* | :heavy_minus_sign: | N/A | 188 | -| `container` | *string* | :heavy_minus_sign: | Container format of the part. | mkv | -| `videoProfile` | *string* | :heavy_minus_sign: | Video profile for the part. | main 10 | -| `audioProfile` | *string* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | -| `optimizedForStreaming` | *operations.GetLibraryItemsLibraryOptimizedForStreaming* | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
| | -| `hasThumbnail` | [operations.GetLibraryItemsHasThumbnail](../../../sdk/models/operations/getlibraryitemshasthumbnail.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsproducer.md b/docs/sdk/models/operations/getlibraryitemsproducer.md deleted file mode 100644 index 9c1e5605..00000000 --- a/docs/sdk/models/operations/getlibraryitemsproducer.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetLibraryItemsProducer - -## Example Usage - -```typescript -import { GetLibraryItemsProducer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsProducer = { - id: 109501, - filter: "actor=109501", - tag: "Bob Odenkirk", - tagKey: "5d77683254f42c001f8c3f69", - role: "Jimmy McGill", - thumb: - "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | The unique role identifier. | 109501 | -| `filter` | *string* | :heavy_check_mark: | The filter string for the role. | actor=109501 | -| `tag` | *string* | :heavy_check_mark: | The actor's name. | Bob Odenkirk | -| `tagKey` | *string* | :heavy_check_mark: | A key associated with the actor tag. | 5d77683254f42c001f8c3f69 | -| `role` | *string* | :heavy_minus_sign: | The character name or role. | Jimmy McGill | -| `thumb` | *string* | :heavy_minus_sign: | URL for the role thumbnail image. | https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsqueryparamincludemeta.md b/docs/sdk/models/operations/getlibraryitemsqueryparamincludemeta.md deleted file mode 100644 index d642650d..00000000 --- a/docs/sdk/models/operations/getlibraryitemsqueryparamincludemeta.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetLibraryItemsQueryParamIncludeMeta - -Adds the Meta object to the response - - -## Example Usage - -```typescript -import { GetLibraryItemsQueryParamIncludeMeta } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsQueryParamIncludeMeta = - GetLibraryItemsQueryParamIncludeMeta.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsqueryparamtype.md b/docs/sdk/models/operations/getlibraryitemsqueryparamtype.md deleted file mode 100644 index e405de7d..00000000 --- a/docs/sdk/models/operations/getlibraryitemsqueryparamtype.md +++ /dev/null @@ -1,34 +0,0 @@ -# GetLibraryItemsQueryParamType - -The type of media to retrieve or filter by. -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 - - -## Example Usage - -```typescript -import { GetLibraryItemsQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsQueryParamType = GetLibraryItemsQueryParamType.TvShow; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Artist` | 5 | -| `Album` | 6 | -| `Track` | 7 | -| `PhotoAlbum` | 8 | -| `Photo` | 9 | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsrequest.md b/docs/sdk/models/operations/getlibraryitemsrequest.md index a42345cc..b9ce472f 100644 --- a/docs/sdk/models/operations/getlibraryitemsrequest.md +++ b/docs/sdk/models/operations/getlibraryitemsrequest.md @@ -3,31 +3,23 @@ ## Example Usage ```typescript -import { - GetLibraryItemsQueryParamIncludeMeta, - GetLibraryItemsQueryParamType, - GetLibraryItemsRequest, - IncludeGuids, - Tag, -} from "@lukehagar/plexjs/sdk/models/operations"; +import { GetLibraryItemsRequest } from "@lukehagar/plexjs/sdk/models/operations"; -let value: GetLibraryItemsRequest = { - tag: Tag.OnDeck, - includeGuids: IncludeGuids.Enable, - type: GetLibraryItemsQueryParamType.TvShow, - sectionKey: 9518, - includeMeta: GetLibraryItemsQueryParamIncludeMeta.Enable, -}; +let value: GetLibraryItemsRequest = {}; ``` ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tag` | [operations.Tag](../../../sdk/models/operations/tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | | -| `includeGuids` | [operations.IncludeGuids](../../../sdk/models/operations/includeguids.md) | :heavy_minus_sign: | Adds the Guids object to the response
| 1 | -| `type` | [operations.GetLibraryItemsQueryParamType](../../../sdk/models/operations/getlibraryitemsqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
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
| 2 | -| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | -| `includeMeta` | [operations.GetLibraryItemsQueryParamIncludeMeta](../../../sdk/models/operations/getlibraryitemsqueryparamincludemeta.md) | :heavy_minus_sign: | Adds the Meta object to the response
| 1 | -| `xPlexContainerStart` | *number* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 0
| 0 | -| `xPlexContainerSize` | *number* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 50
| 50 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `mediaQuery` | [shared.MediaQuery](../../../sdk/models/shared/mediaquery.md) | :heavy_minus_sign: | This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsresponse.md b/docs/sdk/models/operations/getlibraryitemsresponse.md index 7752dacb..6a5b49b1 100644 --- a/docs/sdk/models/operations/getlibraryitemsresponse.md +++ b/docs/sdk/models/operations/getlibraryitemsresponse.md @@ -7,15 +7,17 @@ import { GetLibraryItemsResponse } from "@lukehagar/plexjs/sdk/models/operations let value: GetLibraryItemsResponse = { contentType: "", - statusCode: 603151, + statusCode: 886917, + headers: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetLibraryItemsResponseBody](../../../sdk/models/operations/getlibraryitemsresponsebody.md) | :heavy_minus_sign: | The contents of the library by section and tag | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsresponsebody.md b/docs/sdk/models/operations/getlibraryitemsresponsebody.md deleted file mode 100644 index b6579337..00000000 --- a/docs/sdk/models/operations/getlibraryitemsresponsebody.md +++ /dev/null @@ -1,83 +0,0 @@ -# GetLibraryItemsResponseBody - -The contents of the library by section and tag - -## Example Usage - -```typescript -import { GetLibraryItemsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsResponseBody = { - mediaContainer: { - size: 50, - totalSize: 50, - offset: 0, - content: "secondary", - allowSync: false, - nocache: true, - art: "/:/resources/show-fanart.jpg", - identifier: "com.plexapp.plugins.library", - librarySectionID: 2, - librarySectionTitle: "TV Series", - librarySectionUUID: "e69655a2-ef48-4aba-bb19-0cc34d1e7d36", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1734362201, - thumb: "/:/resources/show.png", - title1: "TV Series", - title2: "By Starring Actor", - viewGroup: "secondary", - viewMode: "131131", - mixedParents: true, - metadata: [], - meta: { - type: [ - { - key: "/library/sections/2/all?type=2", - type: "show", - title: "TV Shows", - active: false, - filter: [ - { - filter: "genre", - filterType: "string", - key: "/library/sections/2/genre?type=2", - title: "Genre", - type: "filter", - }, - ], - sort: [ - { - default: "asc", - active: false, - descKey: "titleSort:desc", - firstCharacterKey: "/library/sections/2/firstCharacter", - key: "titleSort", - title: "Title", - }, - ], - field: [ - { - key: "show.title", - title: "Show Title", - type: "string", - subType: "rating", - }, - ], - }, - ], - fieldType: [ - { - type: "tag", - operator: [], - }, - ], - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetLibraryItemsMediaContainer](../../../sdk/models/operations/getlibraryitemsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsrole.md b/docs/sdk/models/operations/getlibraryitemsrole.md deleted file mode 100644 index 083f8283..00000000 --- a/docs/sdk/models/operations/getlibraryitemsrole.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetLibraryItemsRole - -## Example Usage - -```typescript -import { GetLibraryItemsRole } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsRole = { - id: 126522, - tag: "Teller", - role: "Self - Judge", - thumb: - "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | The unique identifier for the role.
NOTE: This is different for each Plex server and is not globally unique.
| 126522 | -| `tag` | *string* | :heavy_check_mark: | The display tag for the actor (typically the actor's name). | Teller | -| `role` | *string* | :heavy_minus_sign: | The role played by the actor in the media item. | Self - Judge | -| `thumb` | *string* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the actor. | https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemssimilar.md b/docs/sdk/models/operations/getlibraryitemssimilar.md deleted file mode 100644 index fc3bcef9..00000000 --- a/docs/sdk/models/operations/getlibraryitemssimilar.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetLibraryItemsSimilar - -## Example Usage - -```typescript -import { GetLibraryItemsSimilar } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsSimilar = { - id: 26, - filter: "similar=26", - tag: "Breaking Bad", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `id` | *number* | :heavy_check_mark: | The unique similar item identifier. | 26 | -| `filter` | *string* | :heavy_check_mark: | The filter string for similar items. | similar=26 | -| `tag` | *string* | :heavy_check_mark: | The tag or title of the similar content. | Breaking Bad | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemssort.md b/docs/sdk/models/operations/getlibraryitemssort.md deleted file mode 100644 index eada0e22..00000000 --- a/docs/sdk/models/operations/getlibraryitemssort.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetLibraryItemsSort - -## Example Usage - -```typescript -import { GetLibraryItemsSort } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsSort = { - default: "asc", - active: false, - descKey: "titleSort:desc", - firstCharacterKey: "/library/sections/2/firstCharacter", - key: "titleSort", - title: "Title", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `default` | *string* | :heavy_minus_sign: | N/A | asc | -| `active` | *boolean* | :heavy_minus_sign: | N/A | false | -| `activeDirection` | [operations.GetLibraryItemsActiveDirection](../../../sdk/models/operations/getlibraryitemsactivedirection.md) | :heavy_minus_sign: | The direction of the sort. Can be either `asc` or `desc`.
| asc | -| `defaultDirection` | [operations.GetLibraryItemsDefaultDirection](../../../sdk/models/operations/getlibraryitemsdefaultdirection.md) | :heavy_minus_sign: | The direction of the sort. Can be either `asc` or `desc`.
| asc | -| `descKey` | *string* | :heavy_minus_sign: | N/A | titleSort:desc | -| `firstCharacterKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/2/firstCharacter | -| `key` | *string* | :heavy_check_mark: | N/A | titleSort | -| `title` | *string* | :heavy_check_mark: | N/A | Title | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemstype.md b/docs/sdk/models/operations/getlibraryitemstype.md deleted file mode 100644 index 320e9f0c..00000000 --- a/docs/sdk/models/operations/getlibraryitemstype.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetLibraryItemsType - -The type of media content in the Plex library. This can represent videos, music, or photos. - - -## Example Usage - -```typescript -import { GetLibraryItemsType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsType = GetLibraryItemsType.Movie; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Movie` | movie | -| `TvShow` | show | -| `Season` | season | -| `Episode` | episode | -| `Artist` | artist | -| `Album` | album | -| `Track` | track | -| `PhotoAlbum` | photoalbum | -| `Photo` | photo | -| `Collection` | collection | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemsultrablurcolors.md b/docs/sdk/models/operations/getlibraryitemsultrablurcolors.md deleted file mode 100644 index 04243979..00000000 --- a/docs/sdk/models/operations/getlibraryitemsultrablurcolors.md +++ /dev/null @@ -1,23 +0,0 @@ -# GetLibraryItemsUltraBlurColors - -## Example Usage - -```typescript -import { GetLibraryItemsUltraBlurColors } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsUltraBlurColors = { - topLeft: "11333b", - topRight: "0a232d", - bottomRight: "73958", - bottomLeft: "1f5066", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `topLeft` | *string* | :heavy_check_mark: | N/A | 11333b | -| `topRight` | *string* | :heavy_check_mark: | N/A | 0a232d | -| `bottomRight` | *string* | :heavy_check_mark: | N/A | 73958 | -| `bottomLeft` | *string* | :heavy_check_mark: | N/A | 1f5066 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibraryitemswriter.md b/docs/sdk/models/operations/getlibraryitemswriter.md deleted file mode 100644 index 72cbdba0..00000000 --- a/docs/sdk/models/operations/getlibraryitemswriter.md +++ /dev/null @@ -1,22 +0,0 @@ -# GetLibraryItemsWriter - -## Example Usage - -```typescript -import { GetLibraryItemsWriter } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibraryItemsWriter = { - id: 126522, - tag: "Jamie P. Hanson", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | Unique identifier for the writer. | 126522 | -| `tag` | *string* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson | -| `thumb` | *string* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the writer. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarymatchesglobals.md b/docs/sdk/models/operations/getlibrarymatchesglobals.md new file mode 100644 index 00000000..18804430 --- /dev/null +++ b/docs/sdk/models/operations/getlibrarymatchesglobals.md @@ -0,0 +1,35 @@ +# GetLibraryMatchesGlobals + +## Example Usage + +```typescript +import { GetLibraryMatchesGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetLibraryMatchesGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarymatchesrequest.md b/docs/sdk/models/operations/getlibrarymatchesrequest.md new file mode 100644 index 00000000..6ea83d76 --- /dev/null +++ b/docs/sdk/models/operations/getlibrarymatchesrequest.md @@ -0,0 +1,43 @@ +# GetLibraryMatchesRequest + +## Example Usage + +```typescript +import { GetLibraryMatchesRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: GetLibraryMatchesRequest = { + includeFullMetadata: BoolInt.One, + includeAncestorMetadata: BoolInt.One, + includeAlternateMetadataSources: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `type` | *number* | :heavy_minus_sign: | The metadata type to filter by | | +| `includeFullMetadata` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | N/A | 1 | +| `includeAncestorMetadata` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | N/A | 1 | +| `includeAlternateMetadataSources` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | N/A | 1 | +| `guid` | *string* | :heavy_minus_sign: | Used for movies, shows, artists, albums, and tracks. Allowed for various URI schemes, to be defined. | | +| `title` | *string* | :heavy_minus_sign: | The title to filter by or assign | | +| `year` | *number* | :heavy_minus_sign: | Used for movies shows, and albums. Optional. | | +| `path` | *string* | :heavy_minus_sign: | Used for movies, episodes, and tracks. The full path to the media file, used for "cloud-scanning" an item. | | +| `grandparentTitle` | *string* | :heavy_minus_sign: | Used for episodes and tracks. The title of the show/artist. Required if `path` isn't passed. | | +| `grandparentYear` | *number* | :heavy_minus_sign: | Used for episodes. The year of the show. | | +| `parentIndex` | *number* | :heavy_minus_sign: | Used for episodes and tracks. The season/album number. | | +| `index` | *number* | :heavy_minus_sign: | Used for episodes and tracks. The episode/tracks number in the season/album. | | +| `originallyAvailableAt` | *string* | :heavy_minus_sign: | Used for episodes. In the format `YYYY-MM-DD`. | | +| `parentTitle` | *string* | :heavy_minus_sign: | Used for albums and tracks. The artist name for albums or the album name for tracks. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarymatchesresponse.md b/docs/sdk/models/operations/getlibrarymatchesresponse.md new file mode 100644 index 00000000..863e00c7 --- /dev/null +++ b/docs/sdk/models/operations/getlibrarymatchesresponse.md @@ -0,0 +1,23 @@ +# GetLibraryMatchesResponse + +## Example Usage + +```typescript +import { GetLibraryMatchesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetLibraryMatchesResponse = { + contentType: "", + statusCode: 138814, + headers: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallactivedirection.md b/docs/sdk/models/operations/getlibrarysectionsallactivedirection.md deleted file mode 100644 index e24fcf96..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallactivedirection.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetLibrarySectionsAllActiveDirection - -The direction of the sort. Can be either `asc` or `desc`. - - -## Example Usage - -```typescript -import { GetLibrarySectionsAllActiveDirection } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllActiveDirection = - GetLibrarySectionsAllActiveDirection.Ascending; -``` - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Ascending` | asc | -| `Descending` | desc | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallcollection.md b/docs/sdk/models/operations/getlibrarysectionsallcollection.md deleted file mode 100644 index 8774287e..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallcollection.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetLibrarySectionsAllCollection - -## Example Usage - -```typescript -import { GetLibrarySectionsAllCollection } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllCollection = { - tag: "My Awesome Collection", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `tag` | *string* | :heavy_check_mark: | The user-made collection this media item belongs to | My Awesome Collection | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallcountry.md b/docs/sdk/models/operations/getlibrarysectionsallcountry.md deleted file mode 100644 index fada2417..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallcountry.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetLibrarySectionsAllCountry - -## Example Usage - -```typescript -import { GetLibrarySectionsAllCountry } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllCountry = { - tag: "United States of America", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `tag` | *string* | :heavy_check_mark: | The country of origin of this media item | United States of America | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsalldefaultdirection.md b/docs/sdk/models/operations/getlibrarysectionsalldefaultdirection.md deleted file mode 100644 index 4c4764dd..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsalldefaultdirection.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetLibrarySectionsAllDefaultDirection - -The direction of the sort. Can be either `asc` or `desc`. - - -## Example Usage - -```typescript -import { GetLibrarySectionsAllDefaultDirection } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllDefaultDirection = - GetLibrarySectionsAllDefaultDirection.Ascending; -``` - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Ascending` | asc | -| `Descending` | desc | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsalldirector.md b/docs/sdk/models/operations/getlibrarysectionsalldirector.md deleted file mode 100644 index 063b18ed..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsalldirector.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetLibrarySectionsAllDirector - -## Example Usage - -```typescript -import { GetLibrarySectionsAllDirector } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllDirector = { - tag: "Danny Boyle", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | -| `tag` | *string* | :heavy_check_mark: | The role of Director | Danny Boyle | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallfield.md b/docs/sdk/models/operations/getlibrarysectionsallfield.md deleted file mode 100644 index 60c21273..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallfield.md +++ /dev/null @@ -1,23 +0,0 @@ -# GetLibrarySectionsAllField - -## Example Usage - -```typescript -import { GetLibrarySectionsAllField } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllField = { - key: "show.title", - title: "Show Title", - type: "string", - subType: "rating", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `key` | *string* | :heavy_check_mark: | N/A | show.title | -| `title` | *string* | :heavy_check_mark: | N/A | Show Title | -| `type` | *string* | :heavy_check_mark: | N/A | string | -| `subType` | *string* | :heavy_minus_sign: | N/A | rating | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallfieldtype.md b/docs/sdk/models/operations/getlibrarysectionsallfieldtype.md deleted file mode 100644 index d382bd6a..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallfieldtype.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetLibrarySectionsAllFieldType - -## Example Usage - -```typescript -import { GetLibrarySectionsAllFieldType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllFieldType = { - type: "tag", - operator: [], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `type` | *string* | :heavy_check_mark: | N/A | tag | -| `operator` | [operations.GetLibrarySectionsAllOperator](../../../sdk/models/operations/getlibrarysectionsalloperator.md)[] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallfilter.md b/docs/sdk/models/operations/getlibrarysectionsallfilter.md deleted file mode 100644 index 6ae077a6..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallfilter.md +++ /dev/null @@ -1,27 +0,0 @@ -# GetLibrarySectionsAllFilter - -## Example Usage - -```typescript -import { GetLibrarySectionsAllFilter } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllFilter = { - filter: "genre", - filterType: "string", - key: "/library/sections/2/genre?type=2", - title: "Genre", - type: "filter", - advanced: true, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `filter` | *string* | :heavy_check_mark: | N/A | genre | -| `filterType` | *string* | :heavy_check_mark: | N/A | string | -| `key` | *string* | :heavy_check_mark: | N/A | /library/sections/2/genre?type=2 | -| `title` | *string* | :heavy_check_mark: | N/A | Genre | -| `type` | *string* | :heavy_check_mark: | N/A | filter | -| `advanced` | *boolean* | :heavy_minus_sign: | N/A | true | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallgenre.md b/docs/sdk/models/operations/getlibrarysectionsallgenre.md deleted file mode 100644 index 348ee626..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallgenre.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetLibrarySectionsAllGenre - -## Example Usage - -```typescript -import { GetLibrarySectionsAllGenre } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllGenre = { - tag: "Crime", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| `tag` | *string* | :heavy_check_mark: | The genre name of this media-item
| Crime | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallguids.md b/docs/sdk/models/operations/getlibrarysectionsallguids.md deleted file mode 100644 index e8567512..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallguids.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetLibrarySectionsAllGuids - -## Example Usage - -```typescript -import { GetLibrarySectionsAllGuids } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllGuids = { - id: - "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
| {
"imdbExample": {
"summary": "IMDB example",
"value": "imdb://tt13015952"
},
"tmdbExample": {
"summary": "TMDB example",
"value": "tmdb://2434012"
},
"tvdbExample": {
"summary": "TVDB example",
"value": "tvdb://7945991"
}
} | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallhasthumbnail.md b/docs/sdk/models/operations/getlibrarysectionsallhasthumbnail.md deleted file mode 100644 index 91da4d03..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallhasthumbnail.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetLibrarySectionsAllHasThumbnail - -Indicates if the part has a thumbnail. - -## Example Usage - -```typescript -import { GetLibrarySectionsAllHasThumbnail } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllHasThumbnail = - GetLibrarySectionsAllHasThumbnail.True; -``` - -## Values - -| Name | Value | -| ------- | ------- | -| `False` | 0 | -| `True` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallimage.md b/docs/sdk/models/operations/getlibrarysectionsallimage.md deleted file mode 100644 index 26afce7c..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallimage.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetLibrarySectionsAllImage - -## Example Usage - -```typescript -import { GetLibrarySectionsAllImage, GetLibrarySectionsAllLibraryResponseType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllImage = { - alt: "Episode 1", - type: GetLibrarySectionsAllLibraryResponseType.Background, - url: "/library/metadata/45521/thumb/1644710589", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -| `alt` | *string* | :heavy_check_mark: | N/A | Episode 1 | -| `type` | [operations.GetLibrarySectionsAllLibraryResponseType](../../../sdk/models/operations/getlibrarysectionsalllibraryresponsetype.md) | :heavy_check_mark: | N/A | background | -| `url` | *string* | :heavy_check_mark: | N/A | /library/metadata/45521/thumb/1644710589 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsalllibraryoptimizedforstreaming.md b/docs/sdk/models/operations/getlibrarysectionsalllibraryoptimizedforstreaming.md deleted file mode 100644 index 282473bc..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsalllibraryoptimizedforstreaming.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetLibrarySectionsAllLibraryOptimizedForStreaming - -Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - - -## Supported Types - -### `operations.GetLibrarySectionsAllOptimizedForStreamingLibrary1` - -```typescript -const value: operations.GetLibrarySectionsAllOptimizedForStreamingLibrary1 = - GetLibrarySectionsAllOptimizedForStreamingLibrary1.One; -``` - -### `boolean` - -```typescript -const value: boolean = true; -``` - diff --git a/docs/sdk/models/operations/getlibrarysectionsalllibraryresponsetype.md b/docs/sdk/models/operations/getlibrarysectionsalllibraryresponsetype.md deleted file mode 100644 index b8ba9a66..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsalllibraryresponsetype.md +++ /dev/null @@ -1,22 +0,0 @@ -# GetLibrarySectionsAllLibraryResponseType - -## Example Usage - -```typescript -import { GetLibrarySectionsAllLibraryResponseType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllLibraryResponseType = - GetLibrarySectionsAllLibraryResponseType.Background; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `CoverPoster` | coverPoster | -| `Background` | background | -| `Snapshot` | snapshot | -| `ClearLogo` | clearLogo | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsalllibrarytype.md b/docs/sdk/models/operations/getlibrarysectionsalllibrarytype.md deleted file mode 100644 index 0f146f00..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsalllibrarytype.md +++ /dev/null @@ -1,31 +0,0 @@ -# GetLibrarySectionsAllLibraryType - -The type of media content in the Plex library. This can represent videos, music, or photos. - - -## Example Usage - -```typescript -import { GetLibrarySectionsAllLibraryType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllLibraryType = - GetLibrarySectionsAllLibraryType.Movie; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Movie` | movie | -| `TvShow` | show | -| `Season` | season | -| `Episode` | episode | -| `Artist` | artist | -| `Album` | album | -| `Track` | track | -| `PhotoAlbum` | photoalbum | -| `Photo` | photo | -| `Collection` | collection | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallmedia.md b/docs/sdk/models/operations/getlibrarysectionsallmedia.md deleted file mode 100644 index 90f8a170..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallmedia.md +++ /dev/null @@ -1,123 +0,0 @@ -# GetLibrarySectionsAllMedia - -## Example Usage - -```typescript -import { GetLibrarySectionsAllHasThumbnail, GetLibrarySectionsAllMedia } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllMedia = { - id: 387322, - duration: 9610350, - bitrate: 25512, - width: 3840, - height: 1602, - aspectRatio: 2.35, - audioChannels: 6, - displayOffset: 50, - audioCodec: "eac3", - videoCodec: "hevc", - videoResolution: "4k", - container: "mkv", - videoFrameRate: "24p", - videoProfile: "main 10", - hasVoiceActivity: false, - audioProfile: "dts", - has64bitOffsets: false, - part: [ - { - accessible: true, - exists: true, - id: 418385, - key: "/library/parts/418385/1735864239/file.mkv", - indexes: "sd", - duration: 9610350, - file: "/mnt/Movies_1/W/Wicked (2024).mkv", - size: 30649952104, - packetLength: 188, - container: "mkv", - videoProfile: "main 10", - audioProfile: "dts", - has64bitOffsets: false, - hasThumbnail: GetLibrarySectionsAllHasThumbnail.True, - stream: [ - { - id: 1002625, - format: "srt", - default: true, - codec: "hevc", - index: 0, - bitrate: 24743, - language: "English", - languageTag: "en", - languageCode: "eng", - headerCompression: true, - doviblCompatID: 1, - doviblPresent: true, - dovielPresent: false, - doviLevel: 6, - doviPresent: true, - doviProfile: 8, - dovirpuPresent: true, - doviVersion: "1.0", - bitDepth: 10, - chromaLocation: "topleft", - chromaSubsampling: "4:2:0", - codedHeight: 1608, - codedWidth: 3840, - closedCaptions: true, - colorPrimaries: "bt2020", - colorRange: "tv", - colorSpace: "bt2020nc", - colorTrc: "smpte2084", - frameRate: 23.976, - key: "/library/streams/216389", - height: 1602, - level: 150, - original: true, - hasScalingMatrix: false, - profile: "main 10", - scanType: "progressive", - embeddedInVideo: "progressive", - refFrames: 1, - width: 3840, - displayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - extendedDisplayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - selected: true, - forced: true, - channels: 6, - audioChannelLayout: "5.1(side)", - samplingRate: 48000, - canAutoSync: false, - hearingImpaired: true, - dub: true, - title: "SDH", - }, - ], - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | Unique media identifier. | 387322 | -| `duration` | *number* | :heavy_minus_sign: | Duration of the media in milliseconds. | 9610350 | -| `bitrate` | *number* | :heavy_minus_sign: | Bitrate in bits per second. | 25512 | -| `width` | *number* | :heavy_minus_sign: | Video width in pixels. | 3840 | -| `height` | *number* | :heavy_minus_sign: | Video height in pixels. | 1602 | -| `aspectRatio` | *number* | :heavy_minus_sign: | Aspect ratio of the video. | 2.35 | -| `audioChannels` | *number* | :heavy_minus_sign: | Number of audio channels. | 6 | -| `displayOffset` | *number* | :heavy_minus_sign: | N/A | 50 | -| `audioCodec` | *string* | :heavy_minus_sign: | Audio codec used. | eac3 | -| `videoCodec` | *string* | :heavy_minus_sign: | Video codec used. | hevc | -| `videoResolution` | *string* | :heavy_minus_sign: | Video resolution (e.g., 4k). | 4k | -| `container` | *string* | :heavy_minus_sign: | File container type. | mkv | -| `videoFrameRate` | *string* | :heavy_minus_sign: | Frame rate of the video. Values found include NTSC, PAL, 24p
| 24p | -| `videoProfile` | *string* | :heavy_minus_sign: | Video profile (e.g., main 10). | main 10 | -| `hasVoiceActivity` | *boolean* | :heavy_minus_sign: | Indicates whether voice activity is detected. | false | -| `audioProfile` | *string* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `optimizedForStreaming` | *operations.GetLibrarySectionsAllOptimizedForStreaming* | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | -| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | -| `part` | [operations.GetLibrarySectionsAllPart](../../../sdk/models/operations/getlibrarysectionsallpart.md)[] | :heavy_minus_sign: | An array of parts for this media item. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallmediacontainer.md b/docs/sdk/models/operations/getlibrarysectionsallmediacontainer.md deleted file mode 100644 index 9abe8bfa..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallmediacontainer.md +++ /dev/null @@ -1,311 +0,0 @@ -# GetLibrarySectionsAllMediaContainer - -## Example Usage - -```typescript -import { - GetLibrarySectionsAllHasThumbnail, - GetLibrarySectionsAllLibraryResponseType, - GetLibrarySectionsAllLibraryType, - GetLibrarySectionsAllMediaContainer, -} from "@lukehagar/plexjs/sdk/models/operations"; -import { RFCDate } from "@lukehagar/plexjs/sdk/types"; - -let value: GetLibrarySectionsAllMediaContainer = { - size: 50, - totalSize: 50, - offset: 0, - allowSync: false, - art: "/:/resources/show-fanart.jpg", - content: "secondary", - identifier: "com.plexapp.plugins.library", - librarySectionID: 2, - librarySectionTitle: "TV Series", - librarySectionUUID: "e69655a2-ef48-4aba-bb19-0cc34d1e7d36", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1734362201, - thumb: "/:/resources/show.png", - nocache: true, - title1: "TV Series", - title2: "By Starring Actor", - viewGroup: "secondary", - meta: { - type: [ - { - key: "/library/sections/2/all?type=2", - type: "filter", - subtype: "clip", - title: "TV Shows", - active: false, - filter: [ - { - filter: "genre", - filterType: "string", - key: "/library/sections/2/genre?type=2", - title: "Genre", - type: "filter", - advanced: true, - }, - ], - sort: [ - { - default: "asc", - active: false, - descKey: "titleSort:desc", - firstCharacterKey: "/library/sections/2/firstCharacter", - key: "titleSort", - title: "Title", - }, - ], - field: [ - { - key: "show.title", - title: "Show Title", - type: "string", - subType: "rating", - }, - ], - }, - ], - fieldType: [ - { - type: "tag", - operator: [ - { - key: "=", - title: "is", - }, - ], - }, - ], - }, - metadata: [ - { - ratingKey: "58683", - key: "/library/metadata/58683", - guid: "plex://movie/5d7768ba96b655001fdc0408", - slug: "4-for-texas", - studio: "20th Century Studios", - type: GetLibrarySectionsAllLibraryType.Movie, - title: "Avatar: The Way of Water", - titleSort: "Whale", - contentRating: "PG-13", - summary: - "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\n" - + "Once a familiar threat returns to finish what was previously started, Jake must\n" - + "work with Neytiri and the army of the Na'vi race to protect their home.\n" - + "", - rating: 7.6, - audienceRating: 9.2, - year: 2022, - tagline: "Return to Pandora.", - thumb: "/library/metadata/58683/thumb/1703239236", - art: "/library/metadata/58683/art/1703239236", - theme: "/library/metadata/1/theme/1705636920", - index: 1, - leafCount: 14, - viewedLeafCount: 0, - childCount: 1, - seasonCount: 2022, - duration: 11558112, - originallyAvailableAt: new RFCDate("2022-12-14"), - addedAt: 1556281940, - updatedAt: 1556281940, - audienceRatingImage: "rottentomatoes://image.rating.upright", - chapterSource: "media", - primaryExtraKey: "/library/metadata/58684", - originalTitle: "映画 ブラッククローバー 魔法帝の剣", - parentRatingKey: "66", - grandparentRatingKey: "66", - parentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentSlug: "alice-in-borderland-2020", - grandparentKey: "/library/metadata/66", - parentKey: "/library/metadata/66", - grandparentTitle: "Caprica", - grandparentThumb: "/library/metadata/66/thumb/1705716261", - grandparentTheme: "/library/metadata/66/theme/1705716261", - grandparentArt: "/library/metadata/66/art/1705716261", - parentTitle: "Caprica", - parentIndex: 1, - parentThumb: "/library/metadata/66/thumb/1705716261", - ratingImage: "rottentomatoes://image.rating.ripe", - viewCount: 1, - viewOffset: 5222500, - skipCount: 1, - subtype: "clip", - lastRatedAt: 1721813113, - createdAtAccuracy: "epoch,local", - createdAtTZOffset: "0", - lastViewedAt: 1682752242, - userRating: 10, - image: [ - { - alt: "Episode 1", - type: GetLibrarySectionsAllLibraryResponseType.Background, - url: "/library/metadata/45521/thumb/1644710589", - }, - ], - ultraBlurColors: { - topLeft: "11333b", - topRight: "0a232d", - bottomRight: "73958", - bottomLeft: "1f5066", - }, - guids: [ - { - id: - "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}", - }, - ], - media: [ - { - id: 387322, - duration: 9610350, - bitrate: 25512, - width: 3840, - height: 1602, - aspectRatio: 2.35, - audioChannels: 6, - displayOffset: 50, - audioCodec: "eac3", - videoCodec: "hevc", - videoResolution: "4k", - container: "mkv", - videoFrameRate: "24p", - videoProfile: "main 10", - hasVoiceActivity: false, - audioProfile: "dts", - has64bitOffsets: false, - part: [ - { - accessible: true, - exists: true, - id: 418385, - key: "/library/parts/418385/1735864239/file.mkv", - indexes: "sd", - duration: 9610350, - file: "/mnt/Movies_1/W/Wicked (2024).mkv", - size: 30649952104, - packetLength: 188, - container: "mkv", - videoProfile: "main 10", - audioProfile: "dts", - has64bitOffsets: false, - hasThumbnail: GetLibrarySectionsAllHasThumbnail.True, - stream: [ - { - id: 1002625, - format: "srt", - default: true, - codec: "hevc", - index: 0, - bitrate: 24743, - language: "English", - languageTag: "en", - languageCode: "eng", - headerCompression: true, - doviblCompatID: 1, - doviblPresent: true, - dovielPresent: false, - doviLevel: 6, - doviPresent: true, - doviProfile: 8, - dovirpuPresent: true, - doviVersion: "1.0", - bitDepth: 10, - chromaLocation: "topleft", - chromaSubsampling: "4:2:0", - codedHeight: 1608, - codedWidth: 3840, - closedCaptions: true, - colorPrimaries: "bt2020", - colorRange: "tv", - colorSpace: "bt2020nc", - colorTrc: "smpte2084", - frameRate: 23.976, - key: "/library/streams/216389", - height: 1602, - level: 150, - original: true, - hasScalingMatrix: false, - profile: "main 10", - scanType: "progressive", - embeddedInVideo: "progressive", - refFrames: 1, - width: 3840, - displayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - extendedDisplayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - selected: true, - forced: true, - channels: 6, - audioChannelLayout: "5.1(side)", - samplingRate: 48000, - canAutoSync: false, - hearingImpaired: true, - dub: true, - title: "SDH", - }, - ], - }, - ], - }, - ], - genre: [ - { - tag: "Crime", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - director: [ - { - tag: "Danny Boyle", - }, - ], - writer: [ - { - tag: "Jamie P. Hanson", - }, - ], - role: [ - { - tag: "Teller", - }, - ], - collection: [ - { - tag: "My Awesome Collection", - }, - ], - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `totalSize` | *number* | :heavy_check_mark: | Total number of media items in the library. | 50 | -| `offset` | *number* | :heavy_check_mark: | Offset value for pagination. | 0 | -| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `art` | *string* | :heavy_check_mark: | URL for the background artwork of the media container. | /:/resources/show-fanart.jpg | -| `content` | *string* | :heavy_check_mark: | The content type or mode. | secondary | -| `identifier` | *string* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `librarySectionID` | *number* | :heavy_minus_sign: | The unique identifier for the library section. | 2 | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | The title of the library section. | TV Series | -| `librarySectionUUID` | *string* | :heavy_minus_sign: | The universally unique identifier for the library section. | e69655a2-ef48-4aba-bb19-0cc34d1e7d36 | -| `mediaTagPrefix` | *string* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | -| `mediaTagVersion` | *number* | :heavy_check_mark: | The version number for media tags. | 1734362201 | -| `thumb` | *string* | :heavy_check_mark: | URL for the thumbnail image of the media container. | /:/resources/show.png | -| `nocache` | *boolean* | :heavy_check_mark: | Specifies whether caching is disabled. | true | -| `title1` | *string* | :heavy_check_mark: | The primary title of the media container. | TV Series | -| `title2` | *string* | :heavy_check_mark: | The secondary title of the media container. | By Starring Actor | -| `viewGroup` | *string* | :heavy_check_mark: | Identifier for the view group layout. | secondary | -| `meta` | [operations.GetLibrarySectionsAllMeta](../../../sdk/models/operations/getlibrarysectionsallmeta.md) | :heavy_minus_sign: | The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
| | -| `metadata` | [operations.GetLibrarySectionsAllMetadata](../../../sdk/models/operations/getlibrarysectionsallmetadata.md)[] | :heavy_minus_sign: | An array of metadata items. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallmeta.md b/docs/sdk/models/operations/getlibrarysectionsallmeta.md deleted file mode 100644 index e553fb6a..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallmeta.md +++ /dev/null @@ -1,68 +0,0 @@ -# GetLibrarySectionsAllMeta - -The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - - -## Example Usage - -```typescript -import { GetLibrarySectionsAllMeta } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllMeta = { - type: [ - { - key: "/library/sections/2/all?type=2", - type: "filter", - subtype: "clip", - title: "TV Shows", - active: false, - filter: [ - { - filter: "genre", - filterType: "string", - key: "/library/sections/2/genre?type=2", - title: "Genre", - type: "filter", - advanced: true, - }, - ], - sort: [ - { - default: "asc", - active: false, - descKey: "titleSort:desc", - firstCharacterKey: "/library/sections/2/firstCharacter", - key: "titleSort", - title: "Title", - }, - ], - field: [ - { - key: "show.title", - title: "Show Title", - type: "string", - subType: "rating", - }, - ], - }, - ], - fieldType: [ - { - type: "tag", - operator: [ - { - key: "=", - title: "is", - }, - ], - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `type` | [operations.GetLibrarySectionsAllType](../../../sdk/models/operations/getlibrarysectionsalltype.md)[] | :heavy_minus_sign: | N/A | -| `fieldType` | [operations.GetLibrarySectionsAllFieldType](../../../sdk/models/operations/getlibrarysectionsallfieldtype.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallmetadata.md b/docs/sdk/models/operations/getlibrarysectionsallmetadata.md deleted file mode 100644 index 67721ec6..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallmetadata.md +++ /dev/null @@ -1,288 +0,0 @@ -# GetLibrarySectionsAllMetadata - -Unknown - - -## Example Usage - -```typescript -import { - GetLibrarySectionsAllHasThumbnail, - GetLibrarySectionsAllLibraryResponseType, - GetLibrarySectionsAllLibraryType, - GetLibrarySectionsAllMetadata, -} from "@lukehagar/plexjs/sdk/models/operations"; -import { RFCDate } from "@lukehagar/plexjs/sdk/types"; - -let value: GetLibrarySectionsAllMetadata = { - ratingKey: "58683", - key: "/library/metadata/58683", - guid: "plex://movie/5d7768ba96b655001fdc0408", - slug: "4-for-texas", - studio: "20th Century Studios", - type: GetLibrarySectionsAllLibraryType.Movie, - title: "Avatar: The Way of Water", - titleSort: "Whale", - contentRating: "PG-13", - summary: - "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\n" - + "Once a familiar threat returns to finish what was previously started, Jake must\n" - + "work with Neytiri and the army of the Na'vi race to protect their home.\n" - + "", - rating: 7.6, - audienceRating: 9.2, - year: 2022, - tagline: "Return to Pandora.", - thumb: "/library/metadata/58683/thumb/1703239236", - art: "/library/metadata/58683/art/1703239236", - theme: "/library/metadata/1/theme/1705636920", - index: 1, - leafCount: 14, - viewedLeafCount: 0, - childCount: 1, - seasonCount: 2022, - duration: 11558112, - originallyAvailableAt: new RFCDate("2022-12-14"), - addedAt: 1556281940, - updatedAt: 1556281940, - audienceRatingImage: "rottentomatoes://image.rating.upright", - chapterSource: "media", - primaryExtraKey: "/library/metadata/58684", - originalTitle: "映画 ブラッククローバー 魔法帝の剣", - parentRatingKey: "66", - grandparentRatingKey: "66", - parentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentSlug: "alice-in-borderland-2020", - grandparentKey: "/library/metadata/66", - parentKey: "/library/metadata/66", - grandparentTitle: "Caprica", - grandparentThumb: "/library/metadata/66/thumb/1705716261", - grandparentTheme: "/library/metadata/66/theme/1705716261", - grandparentArt: "/library/metadata/66/art/1705716261", - parentTitle: "Caprica", - parentIndex: 1, - parentThumb: "/library/metadata/66/thumb/1705716261", - ratingImage: "rottentomatoes://image.rating.ripe", - viewCount: 1, - viewOffset: 5222500, - skipCount: 1, - subtype: "clip", - lastRatedAt: 1721813113, - createdAtAccuracy: "epoch,local", - createdAtTZOffset: "0", - lastViewedAt: 1682752242, - userRating: 10, - image: [ - { - alt: "Episode 1", - type: GetLibrarySectionsAllLibraryResponseType.Background, - url: "/library/metadata/45521/thumb/1644710589", - }, - ], - ultraBlurColors: { - topLeft: "11333b", - topRight: "0a232d", - bottomRight: "73958", - bottomLeft: "1f5066", - }, - guids: [ - { - id: - "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}", - }, - ], - media: [ - { - id: 387322, - duration: 9610350, - bitrate: 25512, - width: 3840, - height: 1602, - aspectRatio: 2.35, - audioChannels: 6, - displayOffset: 50, - audioCodec: "eac3", - videoCodec: "hevc", - videoResolution: "4k", - container: "mkv", - videoFrameRate: "24p", - videoProfile: "main 10", - hasVoiceActivity: false, - audioProfile: "dts", - has64bitOffsets: false, - part: [ - { - accessible: true, - exists: true, - id: 418385, - key: "/library/parts/418385/1735864239/file.mkv", - indexes: "sd", - duration: 9610350, - file: "/mnt/Movies_1/W/Wicked (2024).mkv", - size: 30649952104, - packetLength: 188, - container: "mkv", - videoProfile: "main 10", - audioProfile: "dts", - has64bitOffsets: false, - hasThumbnail: GetLibrarySectionsAllHasThumbnail.True, - stream: [ - { - id: 1002625, - format: "srt", - default: true, - codec: "hevc", - index: 0, - bitrate: 24743, - language: "English", - languageTag: "en", - languageCode: "eng", - headerCompression: true, - doviblCompatID: 1, - doviblPresent: true, - dovielPresent: false, - doviLevel: 6, - doviPresent: true, - doviProfile: 8, - dovirpuPresent: true, - doviVersion: "1.0", - bitDepth: 10, - chromaLocation: "topleft", - chromaSubsampling: "4:2:0", - codedHeight: 1608, - codedWidth: 3840, - closedCaptions: true, - colorPrimaries: "bt2020", - colorRange: "tv", - colorSpace: "bt2020nc", - colorTrc: "smpte2084", - frameRate: 23.976, - key: "/library/streams/216389", - height: 1602, - level: 150, - original: true, - hasScalingMatrix: false, - profile: "main 10", - scanType: "progressive", - embeddedInVideo: "progressive", - refFrames: 1, - width: 3840, - displayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - extendedDisplayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - selected: true, - forced: true, - channels: 6, - audioChannelLayout: "5.1(side)", - samplingRate: 48000, - canAutoSync: false, - hearingImpaired: true, - dub: true, - title: "SDH", - }, - ], - }, - ], - }, - ], - genre: [ - { - tag: "Crime", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - director: [ - { - tag: "Danny Boyle", - }, - ], - writer: [ - { - tag: "Jamie P. Hanson", - }, - ], - role: [ - { - tag: "Teller", - }, - ], - collection: [ - { - tag: "My Awesome Collection", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *string* | :heavy_check_mark: | The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. | 58683 | -| `key` | *string* | :heavy_check_mark: | The unique key for the media item. | /library/metadata/58683 | -| `guid` | *string* | :heavy_check_mark: | The globally unique identifier for the media item. | plex://movie/5d7768ba96b655001fdc0408 | -| `slug` | *string* | :heavy_check_mark: | A URL‐friendly version of the media title. | 4-for-texas | -| `studio` | *string* | :heavy_minus_sign: | The studio that produced the media item. | 20th Century Studios | -| `type` | [operations.GetLibrarySectionsAllLibraryType](../../../sdk/models/operations/getlibrarysectionsalllibrarytype.md) | :heavy_check_mark: | N/A | movie | -| `title` | *string* | :heavy_check_mark: | The title of the media item. | Avatar: The Way of Water | -| `titleSort` | *string* | :heavy_check_mark: | The sort title used for ordering media items. | Whale | -| `contentRating` | *string* | :heavy_minus_sign: | The content rating for the media item. | PG-13 | -| `summary` | *string* | :heavy_check_mark: | A synopsis of the media item. | 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` | *number* | :heavy_check_mark: | The critic rating for the media item. | 7.6 | -| `audienceRating` | *number* | :heavy_check_mark: | The audience rating for the media item. | 9.2 | -| `year` | *number* | :heavy_minus_sign: | The release year of the media item. | 2022 | -| `tagline` | *string* | :heavy_check_mark: | A brief tagline for the media item. | Return to Pandora. | -| `thumb` | *string* | :heavy_check_mark: | The thumbnail image URL for the media item. | /library/metadata/58683/thumb/1703239236 | -| `art` | *string* | :heavy_check_mark: | The art image URL for the media item. | /library/metadata/58683/art/1703239236 | -| `theme` | *string* | :heavy_check_mark: | The theme URL for the media item. | /library/metadata/1/theme/1705636920 | -| `index` | *number* | :heavy_check_mark: | The index position of the media item. | 1 | -| `leafCount` | *number* | :heavy_minus_sign: | The number of leaf items (end nodes) under this media item. | 14 | -| `viewedLeafCount` | *number* | :heavy_minus_sign: | The number of leaf items that have been viewed. | 0 | -| `childCount` | *number* | :heavy_check_mark: | The number of child items associated with this media item. | 1 | -| `seasonCount` | *number* | :heavy_check_mark: | The total number of seasons (for TV shows). | 2022 | -| `duration` | *number* | :heavy_check_mark: | The duration of the media item in milliseconds. | 11558112 | -| `originallyAvailableAt` | [RFCDate](../../../types/rfcdate.md) | :heavy_minus_sign: | The original release date of the media item. | 2022-12-14 | -| `addedAt` | *number* | :heavy_check_mark: | N/A | 1556281940 | -| `updatedAt` | *number* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 | -| `audienceRatingImage` | *string* | :heavy_minus_sign: | The URL for the audience rating image. | rottentomatoes://image.rating.upright | -| `chapterSource` | *string* | :heavy_minus_sign: | The source from which chapter data is derived. | media | -| `primaryExtraKey` | *string* | :heavy_minus_sign: | The primary extra key associated with this media item. | /library/metadata/58684 | -| `originalTitle` | *string* | :heavy_minus_sign: | The original title of the media item (if different). | 映画 ブラッククローバー 魔法帝の剣 | -| `parentRatingKey` | *string* | :heavy_minus_sign: | The rating key of the parent media item. | 66 | -| `grandparentRatingKey` | *string* | :heavy_minus_sign: | The rating key of the grandparent media item. | 66 | -| `parentGuid` | *string* | :heavy_minus_sign: | The GUID of the parent media item. | plex://show/5d9c081b170e24001f2a7be4 | -| `grandparentGuid` | *string* | :heavy_minus_sign: | The GUID of the grandparent media item. | plex://show/5d9c081b170e24001f2a7be4 | -| `grandparentSlug` | *string* | :heavy_minus_sign: | The slug for the grandparent media item. | alice-in-borderland-2020 | -| `grandparentKey` | *string* | :heavy_minus_sign: | The key of the grandparent media item. | /library/metadata/66 | -| `parentKey` | *string* | :heavy_minus_sign: | The key of the parent media item. | /library/metadata/66 | -| `grandparentTitle` | *string* | :heavy_minus_sign: | The title of the grandparent media item. | Caprica | -| `grandparentThumb` | *string* | :heavy_minus_sign: | The thumbnail URL for the grandparent media item. | /library/metadata/66/thumb/1705716261 | -| `grandparentTheme` | *string* | :heavy_minus_sign: | The theme URL for the grandparent media item. | /library/metadata/66/theme/1705716261 | -| `grandparentArt` | *string* | :heavy_minus_sign: | The art URL for the grandparent media item. | /library/metadata/66/art/1705716261 | -| `parentTitle` | *string* | :heavy_minus_sign: | The title of the parent media item. | Caprica | -| `parentIndex` | *number* | :heavy_minus_sign: | The index position of the parent media item. | 1 | -| `parentThumb` | *string* | :heavy_minus_sign: | The thumbnail URL for the parent media item. | /library/metadata/66/thumb/1705716261 | -| `ratingImage` | *string* | :heavy_minus_sign: | The URL for the rating image. | rottentomatoes://image.rating.ripe | -| `viewCount` | *number* | :heavy_minus_sign: | The number of times this media item has been viewed. | 1 | -| `viewOffset` | *number* | :heavy_minus_sign: | The current playback offset (in milliseconds). | 5222500 | -| `skipCount` | *number* | :heavy_minus_sign: | The number of times this media item has been skipped. | 1 | -| `subtype` | *string* | :heavy_minus_sign: | A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. | clip | -| `lastRatedAt` | *number* | :heavy_minus_sign: | The Unix timestamp representing the last time the item was rated. | 1721813113 | -| `createdAtAccuracy` | *string* | :heavy_minus_sign: | The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). | epoch,local | -| `createdAtTZOffset` | *string* | :heavy_minus_sign: | The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. | 0 | -| `lastViewedAt` | *number* | :heavy_minus_sign: | Unix timestamp for when the media item was last viewed. | 1682752242 | -| `userRating` | *number* | :heavy_minus_sign: | The rating provided by a user for the item. This value is expressed as a decimal number. | 10 | -| `image` | [operations.GetLibrarySectionsAllImage](../../../sdk/models/operations/getlibrarysectionsallimage.md)[] | :heavy_minus_sign: | N/A | | -| `ultraBlurColors` | [operations.GetLibrarySectionsAllUltraBlurColors](../../../sdk/models/operations/getlibrarysectionsallultrablurcolors.md) | :heavy_minus_sign: | N/A | | -| `guids` | [operations.GetLibrarySectionsAllGuids](../../../sdk/models/operations/getlibrarysectionsallguids.md)[] | :heavy_minus_sign: | N/A | | -| `media` | [operations.GetLibrarySectionsAllMedia](../../../sdk/models/operations/getlibrarysectionsallmedia.md)[] | :heavy_minus_sign: | N/A | | -| `genre` | [operations.GetLibrarySectionsAllGenre](../../../sdk/models/operations/getlibrarysectionsallgenre.md)[] | :heavy_minus_sign: | N/A | | -| `country` | [operations.GetLibrarySectionsAllCountry](../../../sdk/models/operations/getlibrarysectionsallcountry.md)[] | :heavy_minus_sign: | N/A | | -| `director` | [operations.GetLibrarySectionsAllDirector](../../../sdk/models/operations/getlibrarysectionsalldirector.md)[] | :heavy_minus_sign: | N/A | | -| `writer` | [operations.GetLibrarySectionsAllWriter](../../../sdk/models/operations/getlibrarysectionsallwriter.md)[] | :heavy_minus_sign: | N/A | | -| `role` | [operations.GetLibrarySectionsAllRole](../../../sdk/models/operations/getlibrarysectionsallrole.md)[] | :heavy_minus_sign: | N/A | | -| `collection` | [operations.GetLibrarySectionsAllCollection](../../../sdk/models/operations/getlibrarysectionsallcollection.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsalloperator.md b/docs/sdk/models/operations/getlibrarysectionsalloperator.md deleted file mode 100644 index 44bb8e47..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsalloperator.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetLibrarySectionsAllOperator - -## Example Usage - -```typescript -import { GetLibrarySectionsAllOperator } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllOperator = { - key: "=", - title: "is", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `key` | *string* | :heavy_check_mark: | N/A | = | -| `title` | *string* | :heavy_check_mark: | N/A | is | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsalloptimizedforstreaming.md b/docs/sdk/models/operations/getlibrarysectionsalloptimizedforstreaming.md deleted file mode 100644 index 58fc2710..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsalloptimizedforstreaming.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetLibrarySectionsAllOptimizedForStreaming - -Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - - -## Supported Types - -### `operations.GetLibrarySectionsAllOptimizedForStreaming1` - -```typescript -const value: operations.GetLibrarySectionsAllOptimizedForStreaming1 = - GetLibrarySectionsAllOptimizedForStreaming1.Zero; -``` - -### `boolean` - -```typescript -const value: boolean = true; -``` - diff --git a/docs/sdk/models/operations/getlibrarysectionsalloptimizedforstreaming1.md b/docs/sdk/models/operations/getlibrarysectionsalloptimizedforstreaming1.md deleted file mode 100644 index 5fbe61c7..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsalloptimizedforstreaming1.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetLibrarySectionsAllOptimizedForStreaming1 - -## Example Usage - -```typescript -import { GetLibrarySectionsAllOptimizedForStreaming1 } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllOptimizedForStreaming1 = - GetLibrarySectionsAllOptimizedForStreaming1.One; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsalloptimizedforstreaminglibrary1.md b/docs/sdk/models/operations/getlibrarysectionsalloptimizedforstreaminglibrary1.md deleted file mode 100644 index f176d5c3..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsalloptimizedforstreaminglibrary1.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetLibrarySectionsAllOptimizedForStreamingLibrary1 - -## Example Usage - -```typescript -import { GetLibrarySectionsAllOptimizedForStreamingLibrary1 } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllOptimizedForStreamingLibrary1 = - GetLibrarySectionsAllOptimizedForStreamingLibrary1.One; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallpart.md b/docs/sdk/models/operations/getlibrarysectionsallpart.md deleted file mode 100644 index 00ce4287..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallpart.md +++ /dev/null @@ -1,99 +0,0 @@ -# GetLibrarySectionsAllPart - -## Example Usage - -```typescript -import { GetLibrarySectionsAllHasThumbnail, GetLibrarySectionsAllPart } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllPart = { - accessible: true, - exists: true, - id: 418385, - key: "/library/parts/418385/1735864239/file.mkv", - indexes: "sd", - duration: 9610350, - file: "/mnt/Movies_1/W/Wicked (2024).mkv", - size: 30649952104, - packetLength: 188, - container: "mkv", - videoProfile: "main 10", - audioProfile: "dts", - has64bitOffsets: false, - hasThumbnail: GetLibrarySectionsAllHasThumbnail.True, - stream: [ - { - id: 1002625, - format: "srt", - default: true, - codec: "hevc", - index: 0, - bitrate: 24743, - language: "English", - languageTag: "en", - languageCode: "eng", - headerCompression: true, - doviblCompatID: 1, - doviblPresent: true, - dovielPresent: false, - doviLevel: 6, - doviPresent: true, - doviProfile: 8, - dovirpuPresent: true, - doviVersion: "1.0", - bitDepth: 10, - chromaLocation: "topleft", - chromaSubsampling: "4:2:0", - codedHeight: 1608, - codedWidth: 3840, - closedCaptions: true, - colorPrimaries: "bt2020", - colorRange: "tv", - colorSpace: "bt2020nc", - colorTrc: "smpte2084", - frameRate: 23.976, - key: "/library/streams/216389", - height: 1602, - level: 150, - original: true, - hasScalingMatrix: false, - profile: "main 10", - scanType: "progressive", - embeddedInVideo: "progressive", - refFrames: 1, - width: 3840, - displayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - extendedDisplayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - selected: true, - forced: true, - channels: 6, - audioChannelLayout: "5.1(side)", - samplingRate: 48000, - canAutoSync: false, - hearingImpaired: true, - dub: true, - title: "SDH", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `accessible` | *boolean* | :heavy_minus_sign: | Indicates if the part is accessible. | true | -| `exists` | *boolean* | :heavy_minus_sign: | Indicates if the part exists. | true | -| `id` | *number* | :heavy_check_mark: | Unique part identifier. | 418385 | -| `key` | *string* | :heavy_check_mark: | Key to access this part. | /library/parts/418385/1735864239/file.mkv | -| `indexes` | *string* | :heavy_minus_sign: | N/A | sd | -| `duration` | *number* | :heavy_minus_sign: | Duration of the part in milliseconds. | 9610350 | -| `file` | *string* | :heavy_check_mark: | File path for the part. | /mnt/Movies_1/W/Wicked (2024).mkv | -| `size` | *number* | :heavy_check_mark: | File size in bytes. | 30649952104 | -| `packetLength` | *number* | :heavy_minus_sign: | N/A | 188 | -| `container` | *string* | :heavy_minus_sign: | Container format of the part. | mkv | -| `videoProfile` | *string* | :heavy_minus_sign: | Video profile for the part. | main 10 | -| `audioProfile` | *string* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | -| `optimizedForStreaming` | *operations.GetLibrarySectionsAllLibraryOptimizedForStreaming* | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | -| `hasThumbnail` | [operations.GetLibrarySectionsAllHasThumbnail](../../../sdk/models/operations/getlibrarysectionsallhasthumbnail.md) | :heavy_minus_sign: | N/A | 1 | -| `stream` | [operations.GetLibrarySectionsAllStream](../../../sdk/models/operations/getlibrarysectionsallstream.md)[] | :heavy_minus_sign: | An array of streams for this part. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallqueryparamincludemeta.md b/docs/sdk/models/operations/getlibrarysectionsallqueryparamincludemeta.md deleted file mode 100644 index 3cc02a00..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallqueryparamincludemeta.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetLibrarySectionsAllQueryParamIncludeMeta - -Adds the Meta object to the response - - -## Example Usage - -```typescript -import { GetLibrarySectionsAllQueryParamIncludeMeta } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllQueryParamIncludeMeta = - GetLibrarySectionsAllQueryParamIncludeMeta.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallqueryparamtype.md b/docs/sdk/models/operations/getlibrarysectionsallqueryparamtype.md deleted file mode 100644 index 173f5bfb..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallqueryparamtype.md +++ /dev/null @@ -1,35 +0,0 @@ -# GetLibrarySectionsAllQueryParamType - -The type of media to retrieve or filter by. -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 - - -## Example Usage - -```typescript -import { GetLibrarySectionsAllQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllQueryParamType = - GetLibrarySectionsAllQueryParamType.TvShow; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Artist` | 5 | -| `Album` | 6 | -| `Track` | 7 | -| `PhotoAlbum` | 8 | -| `Photo` | 9 | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallrequest.md b/docs/sdk/models/operations/getlibrarysectionsallrequest.md deleted file mode 100644 index 7d5cbcb8..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallrequest.md +++ /dev/null @@ -1,39 +0,0 @@ -# GetLibrarySectionsAllRequest - -## Example Usage - -```typescript -import { - GetLibrarySectionsAllQueryParamIncludeMeta, - GetLibrarySectionsAllQueryParamType, - GetLibrarySectionsAllRequest, - IncludeAdvanced, - QueryParamIncludeCollections, - QueryParamIncludeExternalMedia, - QueryParamIncludeGuids, -} from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllRequest = { - sectionKey: 9518, - type: GetLibrarySectionsAllQueryParamType.TvShow, - includeMeta: GetLibrarySectionsAllQueryParamIncludeMeta.Enable, - includeGuids: QueryParamIncludeGuids.Enable, - includeAdvanced: IncludeAdvanced.Enable, - includeCollections: QueryParamIncludeCollections.Enable, - includeExternalMedia: QueryParamIncludeExternalMedia.Enable, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | -| `type` | [operations.GetLibrarySectionsAllQueryParamType](../../../sdk/models/operations/getlibrarysectionsallqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
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
| 2 | -| `includeMeta` | [operations.GetLibrarySectionsAllQueryParamIncludeMeta](../../../sdk/models/operations/getlibrarysectionsallqueryparamincludemeta.md) | :heavy_minus_sign: | Adds the Meta object to the response
| 1 | -| `includeGuids` | [operations.QueryParamIncludeGuids](../../../sdk/models/operations/queryparamincludeguids.md) | :heavy_minus_sign: | Adds the Guid object to the response
| 1 | -| `includeAdvanced` | [operations.IncludeAdvanced](../../../sdk/models/operations/includeadvanced.md) | :heavy_minus_sign: | N/A | 1 | -| `includeCollections` | [operations.QueryParamIncludeCollections](../../../sdk/models/operations/queryparamincludecollections.md) | :heavy_minus_sign: | N/A | 1 | -| `includeExternalMedia` | [operations.QueryParamIncludeExternalMedia](../../../sdk/models/operations/queryparamincludeexternalmedia.md) | :heavy_minus_sign: | N/A | 1 | -| `xPlexContainerStart` | *number* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 0
| 0 | -| `xPlexContainerSize` | *number* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 50
| 50 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallresponse.md b/docs/sdk/models/operations/getlibrarysectionsallresponse.md deleted file mode 100644 index cc508d19..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetLibrarySectionsAllResponse - -## Example Usage - -```typescript -import { GetLibrarySectionsAllResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllResponse = { - contentType: "", - statusCode: 118591, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetLibrarySectionsAllResponseBody](../../../sdk/models/operations/getlibrarysectionsallresponsebody.md) | :heavy_minus_sign: | Successful response containing media container data. | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallresponsebody.md b/docs/sdk/models/operations/getlibrarysectionsallresponsebody.md deleted file mode 100644 index 8e5c8d3e..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallresponsebody.md +++ /dev/null @@ -1,297 +0,0 @@ -# GetLibrarySectionsAllResponseBody - -Successful response containing media container data. - -## Example Usage - -```typescript -import { - GetLibrarySectionsAllHasThumbnail, - GetLibrarySectionsAllLibraryResponseType, - GetLibrarySectionsAllLibraryType, - GetLibrarySectionsAllResponseBody, -} from "@lukehagar/plexjs/sdk/models/operations"; -import { RFCDate } from "@lukehagar/plexjs/sdk/types"; - -let value: GetLibrarySectionsAllResponseBody = { - mediaContainer: { - size: 50, - totalSize: 50, - offset: 0, - allowSync: false, - art: "/:/resources/show-fanart.jpg", - content: "secondary", - identifier: "com.plexapp.plugins.library", - librarySectionID: 2, - librarySectionTitle: "TV Series", - librarySectionUUID: "e69655a2-ef48-4aba-bb19-0cc34d1e7d36", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1734362201, - thumb: "/:/resources/show.png", - nocache: true, - title1: "TV Series", - title2: "By Starring Actor", - viewGroup: "secondary", - meta: { - type: [ - { - key: "/library/sections/2/all?type=2", - type: "filter", - subtype: "clip", - title: "TV Shows", - active: false, - filter: [ - { - filter: "genre", - filterType: "string", - key: "/library/sections/2/genre?type=2", - title: "Genre", - type: "filter", - advanced: true, - }, - ], - sort: [ - { - default: "asc", - active: false, - descKey: "titleSort:desc", - firstCharacterKey: "/library/sections/2/firstCharacter", - key: "titleSort", - title: "Title", - }, - ], - field: [ - { - key: "show.title", - title: "Show Title", - type: "string", - subType: "rating", - }, - ], - }, - ], - fieldType: [ - { - type: "tag", - operator: [ - { - key: "=", - title: "is", - }, - ], - }, - ], - }, - metadata: [ - { - ratingKey: "58683", - key: "/library/metadata/58683", - guid: "plex://movie/5d7768ba96b655001fdc0408", - slug: "4-for-texas", - studio: "20th Century Studios", - type: GetLibrarySectionsAllLibraryType.Movie, - title: "Avatar: The Way of Water", - titleSort: "Whale", - contentRating: "PG-13", - summary: - "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\n" - + "Once a familiar threat returns to finish what was previously started, Jake must\n" - + "work with Neytiri and the army of the Na'vi race to protect their home.\n" - + "", - rating: 7.6, - audienceRating: 9.2, - year: 2022, - tagline: "Return to Pandora.", - thumb: "/library/metadata/58683/thumb/1703239236", - art: "/library/metadata/58683/art/1703239236", - theme: "/library/metadata/1/theme/1705636920", - index: 1, - leafCount: 14, - viewedLeafCount: 0, - childCount: 1, - seasonCount: 2022, - duration: 11558112, - originallyAvailableAt: new RFCDate("2022-12-14"), - addedAt: 1556281940, - updatedAt: 1556281940, - audienceRatingImage: "rottentomatoes://image.rating.upright", - chapterSource: "media", - primaryExtraKey: "/library/metadata/58684", - originalTitle: "映画 ブラッククローバー 魔法帝の剣", - parentRatingKey: "66", - grandparentRatingKey: "66", - parentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentSlug: "alice-in-borderland-2020", - grandparentKey: "/library/metadata/66", - parentKey: "/library/metadata/66", - grandparentTitle: "Caprica", - grandparentThumb: "/library/metadata/66/thumb/1705716261", - grandparentTheme: "/library/metadata/66/theme/1705716261", - grandparentArt: "/library/metadata/66/art/1705716261", - parentTitle: "Caprica", - parentIndex: 1, - parentThumb: "/library/metadata/66/thumb/1705716261", - ratingImage: "rottentomatoes://image.rating.ripe", - viewCount: 1, - viewOffset: 5222500, - skipCount: 1, - subtype: "clip", - lastRatedAt: 1721813113, - createdAtAccuracy: "epoch,local", - createdAtTZOffset: "0", - lastViewedAt: 1682752242, - userRating: 10, - image: [ - { - alt: "Episode 1", - type: GetLibrarySectionsAllLibraryResponseType.Background, - url: "/library/metadata/45521/thumb/1644710589", - }, - ], - ultraBlurColors: { - topLeft: "11333b", - topRight: "0a232d", - bottomRight: "73958", - bottomLeft: "1f5066", - }, - guids: [ - { - id: - "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}", - }, - ], - media: [ - { - id: 387322, - duration: 9610350, - bitrate: 25512, - width: 3840, - height: 1602, - aspectRatio: 2.35, - audioChannels: 6, - displayOffset: 50, - audioCodec: "eac3", - videoCodec: "hevc", - videoResolution: "4k", - container: "mkv", - videoFrameRate: "24p", - videoProfile: "main 10", - hasVoiceActivity: false, - audioProfile: "dts", - has64bitOffsets: false, - part: [ - { - accessible: true, - exists: true, - id: 418385, - key: "/library/parts/418385/1735864239/file.mkv", - indexes: "sd", - duration: 9610350, - file: "/mnt/Movies_1/W/Wicked (2024).mkv", - size: 30649952104, - packetLength: 188, - container: "mkv", - videoProfile: "main 10", - audioProfile: "dts", - has64bitOffsets: false, - hasThumbnail: GetLibrarySectionsAllHasThumbnail.True, - stream: [ - { - id: 1002625, - format: "srt", - default: true, - codec: "hevc", - index: 0, - bitrate: 24743, - language: "English", - languageTag: "en", - languageCode: "eng", - headerCompression: true, - doviblCompatID: 1, - doviblPresent: true, - dovielPresent: false, - doviLevel: 6, - doviPresent: true, - doviProfile: 8, - dovirpuPresent: true, - doviVersion: "1.0", - bitDepth: 10, - chromaLocation: "topleft", - chromaSubsampling: "4:2:0", - codedHeight: 1608, - codedWidth: 3840, - closedCaptions: true, - colorPrimaries: "bt2020", - colorRange: "tv", - colorSpace: "bt2020nc", - colorTrc: "smpte2084", - frameRate: 23.976, - key: "/library/streams/216389", - height: 1602, - level: 150, - original: true, - hasScalingMatrix: false, - profile: "main 10", - scanType: "progressive", - embeddedInVideo: "progressive", - refFrames: 1, - width: 3840, - displayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - extendedDisplayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - selected: true, - forced: true, - channels: 6, - audioChannelLayout: "5.1(side)", - samplingRate: 48000, - canAutoSync: false, - hearingImpaired: true, - dub: true, - title: "SDH", - }, - ], - }, - ], - }, - ], - genre: [ - { - tag: "Crime", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - director: [ - { - tag: "Danny Boyle", - }, - ], - writer: [ - { - tag: "Jamie P. Hanson", - }, - ], - role: [ - { - tag: "Teller", - }, - ], - collection: [ - { - tag: "My Awesome Collection", - }, - ], - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetLibrarySectionsAllMediaContainer](../../../sdk/models/operations/getlibrarysectionsallmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallrole.md b/docs/sdk/models/operations/getlibrarysectionsallrole.md deleted file mode 100644 index 338f1659..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallrole.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetLibrarySectionsAllRole - -## Example Usage - -```typescript -import { GetLibrarySectionsAllRole } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllRole = { - tag: "Teller", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `tag` | *string* | :heavy_check_mark: | The display tag for the actor (typically the actor's name). | Teller | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallsort.md b/docs/sdk/models/operations/getlibrarysectionsallsort.md deleted file mode 100644 index 56bbd46d..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallsort.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetLibrarySectionsAllSort - -## Example Usage - -```typescript -import { GetLibrarySectionsAllSort } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllSort = { - default: "asc", - active: false, - descKey: "titleSort:desc", - firstCharacterKey: "/library/sections/2/firstCharacter", - key: "titleSort", - title: "Title", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `default` | *string* | :heavy_minus_sign: | N/A | asc | -| `active` | *boolean* | :heavy_minus_sign: | N/A | false | -| `activeDirection` | [operations.GetLibrarySectionsAllActiveDirection](../../../sdk/models/operations/getlibrarysectionsallactivedirection.md) | :heavy_minus_sign: | The direction of the sort. Can be either `asc` or `desc`.
| asc | -| `defaultDirection` | [operations.GetLibrarySectionsAllDefaultDirection](../../../sdk/models/operations/getlibrarysectionsalldefaultdirection.md) | :heavy_minus_sign: | The direction of the sort. Can be either `asc` or `desc`.
| asc | -| `descKey` | *string* | :heavy_minus_sign: | N/A | titleSort:desc | -| `firstCharacterKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/2/firstCharacter | -| `key` | *string* | :heavy_check_mark: | N/A | titleSort | -| `title` | *string* | :heavy_check_mark: | N/A | Title | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallstream.md b/docs/sdk/models/operations/getlibrarysectionsallstream.md deleted file mode 100644 index 51aabbe0..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallstream.md +++ /dev/null @@ -1,116 +0,0 @@ -# GetLibrarySectionsAllStream - -## Example Usage - -```typescript -import { GetLibrarySectionsAllStream } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllStream = { - id: 1002625, - format: "srt", - default: true, - codec: "hevc", - index: 0, - bitrate: 24743, - language: "English", - languageTag: "en", - languageCode: "eng", - headerCompression: true, - doviblCompatID: 1, - doviblPresent: true, - dovielPresent: false, - doviLevel: 6, - doviPresent: true, - doviProfile: 8, - dovirpuPresent: true, - doviVersion: "1.0", - bitDepth: 10, - chromaLocation: "topleft", - chromaSubsampling: "4:2:0", - codedHeight: 1608, - codedWidth: 3840, - closedCaptions: true, - colorPrimaries: "bt2020", - colorRange: "tv", - colorSpace: "bt2020nc", - colorTrc: "smpte2084", - frameRate: 23.976, - key: "/library/streams/216389", - height: 1602, - level: 150, - original: true, - hasScalingMatrix: false, - profile: "main 10", - scanType: "progressive", - embeddedInVideo: "progressive", - refFrames: 1, - width: 3840, - displayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - extendedDisplayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - selected: true, - forced: true, - channels: 6, - audioChannelLayout: "5.1(side)", - samplingRate: 48000, - canAutoSync: false, - hearingImpaired: true, - dub: true, - title: "SDH", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | Unique stream identifier. | 1002625 | -| `streamType` | *number* | :heavy_check_mark: | Stream type:
- VIDEO = 1
- AUDIO = 2
- SUBTITLE = 3
| | -| `format` | *string* | :heavy_minus_sign: | Format of the stream (e.g., srt). | srt | -| `default` | *boolean* | :heavy_minus_sign: | Indicates if this stream is default. | true | -| `codec` | *string* | :heavy_check_mark: | Codec used by the stream. | hevc | -| `index` | *number* | :heavy_minus_sign: | Index of the stream. | 0 | -| `bitrate` | *number* | :heavy_minus_sign: | Bitrate of the stream. | 24743 | -| `language` | *string* | :heavy_minus_sign: | Language of the stream. | English | -| `languageTag` | *string* | :heavy_minus_sign: | Language tag (e.g., en). | en | -| `languageCode` | *string* | :heavy_minus_sign: | ISO language code. | eng | -| `headerCompression` | *boolean* | :heavy_minus_sign: | Indicates whether header compression is enabled. | true | -| `doviblCompatID` | *number* | :heavy_minus_sign: | Dolby Vision BL compatibility ID. | 1 | -| `doviblPresent` | *boolean* | :heavy_minus_sign: | Indicates if Dolby Vision BL is present. | true | -| `dovielPresent` | *boolean* | :heavy_minus_sign: | Indicates if Dolby Vision EL is present. | false | -| `doviLevel` | *number* | :heavy_minus_sign: | Dolby Vision level. | 6 | -| `doviPresent` | *boolean* | :heavy_minus_sign: | Indicates if Dolby Vision is present. | true | -| `doviProfile` | *number* | :heavy_minus_sign: | Dolby Vision profile. | 8 | -| `dovirpuPresent` | *boolean* | :heavy_minus_sign: | Indicates if Dolby Vision RPU is present. | true | -| `doviVersion` | *string* | :heavy_minus_sign: | Dolby Vision version. | 1.0 | -| `bitDepth` | *number* | :heavy_minus_sign: | Bit depth of the video stream. | 10 | -| `chromaLocation` | *string* | :heavy_minus_sign: | Chroma sample location. | topleft | -| `chromaSubsampling` | *string* | :heavy_minus_sign: | Chroma subsampling format. | 4:2:0 | -| `codedHeight` | *number* | :heavy_minus_sign: | Coded video height. | 1608 | -| `codedWidth` | *number* | :heavy_minus_sign: | Coded video width. | 3840 | -| `closedCaptions` | *boolean* | :heavy_minus_sign: | N/A | true | -| `colorPrimaries` | *string* | :heavy_minus_sign: | Color primaries used. | bt2020 | -| `colorRange` | *string* | :heavy_minus_sign: | Color range (e.g., tv). | tv | -| `colorSpace` | *string* | :heavy_minus_sign: | Color space. | bt2020nc | -| `colorTrc` | *string* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 | -| `frameRate` | *number* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 | -| `key` | *string* | :heavy_minus_sign: | Key to access this stream part. | /library/streams/216389 | -| `height` | *number* | :heavy_minus_sign: | Height of the video stream. | 1602 | -| `level` | *number* | :heavy_minus_sign: | Video level. | 150 | -| `original` | *boolean* | :heavy_minus_sign: | Indicates if this is the original stream. | true | -| `hasScalingMatrix` | *boolean* | :heavy_minus_sign: | N/A | false | -| `profile` | *string* | :heavy_minus_sign: | Video profile. | main 10 | -| `scanType` | *string* | :heavy_minus_sign: | N/A | progressive | -| `embeddedInVideo` | *string* | :heavy_minus_sign: | N/A | progressive | -| `refFrames` | *number* | :heavy_minus_sign: | Number of reference frames. | 1 | -| `width` | *number* | :heavy_minus_sign: | Width of the video stream. | 3840 | -| `displayTitle` | *string* | :heavy_check_mark: | Display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | -| `extendedDisplayTitle` | *string* | :heavy_check_mark: | Extended display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | -| `selected` | *boolean* | :heavy_minus_sign: | Indicates if this stream is selected (applicable for audio streams). | true | -| `forced` | *boolean* | :heavy_minus_sign: | N/A | true | -| `channels` | *number* | :heavy_minus_sign: | Number of audio channels (for audio streams). | 6 | -| `audioChannelLayout` | *string* | :heavy_minus_sign: | Audio channel layout. | 5.1(side) | -| `samplingRate` | *number* | :heavy_minus_sign: | Sampling rate for the audio stream. | 48000 | -| `canAutoSync` | *boolean* | :heavy_minus_sign: | Indicates if the stream can auto-sync. | false | -| `hearingImpaired` | *boolean* | :heavy_minus_sign: | Indicates if the stream is for the hearing impaired. | true | -| `dub` | *boolean* | :heavy_minus_sign: | Indicates if the stream is a dub. | true | -| `title` | *string* | :heavy_minus_sign: | Optional title for the stream (e.g., language variant). | SDH | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsalltype.md b/docs/sdk/models/operations/getlibrarysectionsalltype.md deleted file mode 100644 index a7c405ce..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsalltype.md +++ /dev/null @@ -1,56 +0,0 @@ -# GetLibrarySectionsAllType - -## Example Usage - -```typescript -import { GetLibrarySectionsAllType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllType = { - key: "/library/sections/2/all?type=2", - type: "filter", - subtype: "clip", - title: "TV Shows", - active: false, - filter: [ - { - filter: "genre", - filterType: "string", - key: "/library/sections/2/genre?type=2", - title: "Genre", - type: "filter", - advanced: true, - }, - ], - sort: [ - { - default: "asc", - active: false, - descKey: "titleSort:desc", - firstCharacterKey: "/library/sections/2/firstCharacter", - key: "titleSort", - title: "Title", - }, - ], - field: [ - { - key: "show.title", - title: "Show Title", - type: "string", - subType: "rating", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `key` | *string* | :heavy_check_mark: | N/A | /library/sections/2/all?type=2 | -| `type` | *string* | :heavy_check_mark: | N/A | filter | -| `subtype` | *string* | :heavy_minus_sign: | N/A | clip | -| `title` | *string* | :heavy_check_mark: | N/A | TV Shows | -| `active` | *boolean* | :heavy_check_mark: | N/A | false | -| `filter` | [operations.GetLibrarySectionsAllFilter](../../../sdk/models/operations/getlibrarysectionsallfilter.md)[] | :heavy_minus_sign: | N/A | | -| `sort` | [operations.GetLibrarySectionsAllSort](../../../sdk/models/operations/getlibrarysectionsallsort.md)[] | :heavy_minus_sign: | N/A | | -| `field` | [operations.GetLibrarySectionsAllField](../../../sdk/models/operations/getlibrarysectionsallfield.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallultrablurcolors.md b/docs/sdk/models/operations/getlibrarysectionsallultrablurcolors.md deleted file mode 100644 index 00bfe6e6..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallultrablurcolors.md +++ /dev/null @@ -1,23 +0,0 @@ -# GetLibrarySectionsAllUltraBlurColors - -## Example Usage - -```typescript -import { GetLibrarySectionsAllUltraBlurColors } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllUltraBlurColors = { - topLeft: "11333b", - topRight: "0a232d", - bottomRight: "73958", - bottomLeft: "1f5066", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `topLeft` | *string* | :heavy_check_mark: | N/A | 11333b | -| `topRight` | *string* | :heavy_check_mark: | N/A | 0a232d | -| `bottomRight` | *string* | :heavy_check_mark: | N/A | 73958 | -| `bottomLeft` | *string* | :heavy_check_mark: | N/A | 1f5066 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlibrarysectionsallwriter.md b/docs/sdk/models/operations/getlibrarysectionsallwriter.md deleted file mode 100644 index be921fdc..00000000 --- a/docs/sdk/models/operations/getlibrarysectionsallwriter.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetLibrarySectionsAllWriter - -## Example Usage - -```typescript -import { GetLibrarySectionsAllWriter } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetLibrarySectionsAllWriter = { - tag: "Jamie P. Hanson", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *string* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlineupchannelsglobals.md b/docs/sdk/models/operations/getlineupchannelsglobals.md new file mode 100644 index 00000000..320338d5 --- /dev/null +++ b/docs/sdk/models/operations/getlineupchannelsglobals.md @@ -0,0 +1,35 @@ +# GetLineupChannelsGlobals + +## Example Usage + +```typescript +import { GetLineupChannelsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetLineupChannelsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlineupchannelsmediacontainer.md b/docs/sdk/models/operations/getlineupchannelsmediacontainer.md new file mode 100644 index 00000000..19b348db --- /dev/null +++ b/docs/sdk/models/operations/getlineupchannelsmediacontainer.md @@ -0,0 +1,24 @@ +# GetLineupChannelsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetLineupChannelsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetLineupChannelsMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `lineup` | [operations.Lineup](../../../sdk/models/operations/lineup.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlineupchannelsrequest.md b/docs/sdk/models/operations/getlineupchannelsrequest.md new file mode 100644 index 00000000..104ec93f --- /dev/null +++ b/docs/sdk/models/operations/getlineupchannelsrequest.md @@ -0,0 +1,27 @@ +# GetLineupChannelsRequest + +## Example Usage + +```typescript +import { GetLineupChannelsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetLineupChannelsRequest = { + lineup: [], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `lineup` | *string*[] | :heavy_check_mark: | The URIs describing the lineups | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlineupchannelsresponse.md b/docs/sdk/models/operations/getlineupchannelsresponse.md new file mode 100644 index 00000000..8bba8a55 --- /dev/null +++ b/docs/sdk/models/operations/getlineupchannelsresponse.md @@ -0,0 +1,21 @@ +# GetLineupChannelsResponse + +## Example Usage + +```typescript +import { GetLineupChannelsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetLineupChannelsResponse = { + contentType: "", + statusCode: 207965, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetLineupChannelsResponseBody](../../../sdk/models/operations/getlineupchannelsresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlineupchannelsresponsebody.md b/docs/sdk/models/operations/getlineupchannelsresponsebody.md new file mode 100644 index 00000000..49c04dd6 --- /dev/null +++ b/docs/sdk/models/operations/getlineupchannelsresponsebody.md @@ -0,0 +1,17 @@ +# GetLineupChannelsResponseBody + +OK + +## Example Usage + +```typescript +import { GetLineupChannelsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetLineupChannelsResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetLineupChannelsMediaContainer](../../../sdk/models/operations/getlineupchannelsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlineupglobals.md b/docs/sdk/models/operations/getlineupglobals.md new file mode 100644 index 00000000..11156b2c --- /dev/null +++ b/docs/sdk/models/operations/getlineupglobals.md @@ -0,0 +1,35 @@ +# GetLineupGlobals + +## Example Usage + +```typescript +import { GetLineupGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetLineupGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlineuprequest.md b/docs/sdk/models/operations/getlineuprequest.md new file mode 100644 index 00000000..0f2e71fc --- /dev/null +++ b/docs/sdk/models/operations/getlineuprequest.md @@ -0,0 +1,29 @@ +# GetLineupRequest + +## Example Usage + +```typescript +import { GetLineupRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetLineupRequest = { + device: "Mobile", + lineupGroup: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `device` | *string* | :heavy_check_mark: | The URI describing the device | | +| `lineupGroup` | *string* | :heavy_check_mark: | The URI describing the lineupGroup | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlineupresponse.md b/docs/sdk/models/operations/getlineupresponse.md new file mode 100644 index 00000000..32d7b204 --- /dev/null +++ b/docs/sdk/models/operations/getlineupresponse.md @@ -0,0 +1,30 @@ +# GetLineupResponse + +## Example Usage + +```typescript +import { GetLineupResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetLineupResponse = { + contentType: "", + statusCode: 77581, + headers: { + "key": [ + "", + ], + "key1": [ + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlivetvsessionglobals.md b/docs/sdk/models/operations/getlivetvsessionglobals.md new file mode 100644 index 00000000..204842b1 --- /dev/null +++ b/docs/sdk/models/operations/getlivetvsessionglobals.md @@ -0,0 +1,35 @@ +# GetLiveTVSessionGlobals + +## Example Usage + +```typescript +import { GetLiveTVSessionGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetLiveTVSessionGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlivetvsessionrequest.md b/docs/sdk/models/operations/getlivetvsessionrequest.md new file mode 100644 index 00000000..388df920 --- /dev/null +++ b/docs/sdk/models/operations/getlivetvsessionrequest.md @@ -0,0 +1,27 @@ +# GetLiveTVSessionRequest + +## Example Usage + +```typescript +import { GetLiveTVSessionRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetLiveTVSessionRequest = { + sessionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sessionId` | *string* | :heavy_check_mark: | The session id | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getlivetvsessionresponse.md b/docs/sdk/models/operations/getlivetvsessionresponse.md new file mode 100644 index 00000000..f28185f2 --- /dev/null +++ b/docs/sdk/models/operations/getlivetvsessionresponse.md @@ -0,0 +1,28 @@ +# GetLiveTVSessionResponse + +## Example Usage + +```typescript +import { GetLiveTVSessionResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetLiveTVSessionResponse = { + contentType: "", + statusCode: 742160, + headers: { + "key": [ + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediaartsmediacontainer.md b/docs/sdk/models/operations/getmediaartsmediacontainer.md deleted file mode 100644 index 85d4bbba..00000000 --- a/docs/sdk/models/operations/getmediaartsmediacontainer.md +++ /dev/null @@ -1,25 +0,0 @@ -# GetMediaArtsMediaContainer - -## Example Usage - -```typescript -import { GetMediaArtsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaArtsMediaContainer = { - size: 50, - mediaTagVersion: 1734362201, - mediaTagPrefix: "/system/bundle/media/flags/", - identifier: "com.plexapp.plugins.library", - metadata: [], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `mediaTagVersion` | *number* | :heavy_check_mark: | The version number for media tags. | 1734362201 | -| `mediaTagPrefix` | *string* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | -| `identifier` | *string* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `metadata` | [operations.GetMediaArtsMetadata](../../../sdk/models/operations/getmediaartsmetadata.md)[] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediaartsmetadata.md b/docs/sdk/models/operations/getmediaartsmetadata.md deleted file mode 100644 index ff9fdb67..00000000 --- a/docs/sdk/models/operations/getmediaartsmetadata.md +++ /dev/null @@ -1,27 +0,0 @@ -# GetMediaArtsMetadata - -## Example Usage - -```typescript -import { GetMediaArtsMetadata } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaArtsMetadata = { - key: "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", - provider: "tmdb", - ratingKey: - "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", - selected: true, - thumb: - "https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `key` | *string* | :heavy_check_mark: | The URL of the artwork. | https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg | -| `provider` | *string* | :heavy_minus_sign: | The provider of the artwork. | tmdb | -| `ratingKey` | *string* | :heavy_check_mark: | The URL of the artwork. | https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg | -| `selected` | *boolean* | :heavy_check_mark: | Whether this is the selected artwork. | true | -| `thumb` | *string* | :heavy_check_mark: | The URL of the artwork thumbnail. | https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediaartsrequest.md b/docs/sdk/models/operations/getmediaartsrequest.md deleted file mode 100644 index 98a5390f..00000000 --- a/docs/sdk/models/operations/getmediaartsrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetMediaArtsRequest - -## Example Usage - -```typescript -import { GetMediaArtsRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaArtsRequest = { - ratingKey: 16099, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the artwork of. | 16099 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediaartsresponse.md b/docs/sdk/models/operations/getmediaartsresponse.md deleted file mode 100644 index 8e515ef1..00000000 --- a/docs/sdk/models/operations/getmediaartsresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetMediaArtsResponse - -## Example Usage - -```typescript -import { GetMediaArtsResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaArtsResponse = { - contentType: "", - statusCode: 153816, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetMediaArtsResponseBody](../../../sdk/models/operations/getmediaartsresponsebody.md) | :heavy_minus_sign: | The available background artwork for the library item. | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediaartsresponsebody.md b/docs/sdk/models/operations/getmediaartsresponsebody.md deleted file mode 100644 index 3b191967..00000000 --- a/docs/sdk/models/operations/getmediaartsresponsebody.md +++ /dev/null @@ -1,25 +0,0 @@ -# GetMediaArtsResponseBody - -The available background artwork for the library item. - -## Example Usage - -```typescript -import { GetMediaArtsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaArtsResponseBody = { - mediaContainer: { - size: 50, - mediaTagVersion: 1734362201, - mediaTagPrefix: "/system/bundle/media/flags/", - identifier: "com.plexapp.plugins.library", - metadata: [], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetMediaArtsMediaContainer](../../../sdk/models/operations/getmediaartsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadataattributes.md b/docs/sdk/models/operations/getmediametadataattributes.md deleted file mode 100644 index 12ec7542..00000000 --- a/docs/sdk/models/operations/getmediametadataattributes.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetMediaMetaDataAttributes - -Attributes associated with the marker. - -## Example Usage - -```typescript -import { GetMediaMetaDataAttributes } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataAttributes = { - id: 306970, - version: 4, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | The identifier for the attributes. | 306970 | -| `version` | *number* | :heavy_minus_sign: | The version number of the marker attributes. | 4 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadatachapter.md b/docs/sdk/models/operations/getmediametadatachapter.md deleted file mode 100644 index dd8d8390..00000000 --- a/docs/sdk/models/operations/getmediametadatachapter.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetMediaMetaDataChapter - -The thumbnail for the chapter - -## Example Usage - -```typescript -import { GetMediaMetaDataChapter } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataChapter = { - id: 4, - filter: "thumb=4", - index: 1, - startTimeOffset: 0, - endTimeOffset: 100100, - thumb: "/library/media/46883/chapterImages/1", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `id` | *number* | :heavy_check_mark: | N/A | 4 | -| `filter` | *string* | :heavy_check_mark: | N/A | thumb=4 | -| `index` | *number* | :heavy_check_mark: | N/A | 1 | -| `startTimeOffset` | *number* | :heavy_check_mark: | N/A | 0 | -| `endTimeOffset` | *number* | :heavy_check_mark: | N/A | 100100 | -| `thumb` | *string* | :heavy_check_mark: | N/A | /library/media/46883/chapterImages/1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadatacountry.md b/docs/sdk/models/operations/getmediametadatacountry.md deleted file mode 100644 index 8d87ade4..00000000 --- a/docs/sdk/models/operations/getmediametadatacountry.md +++ /dev/null @@ -1,23 +0,0 @@ -# GetMediaMetaDataCountry - -The filter query string for country media items. - -## Example Usage - -```typescript -import { GetMediaMetaDataCountry } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataCountry = { - id: 259, - tag: "United States of America", - filter: "country=19", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | The unique identifier for the country.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | -| `tag` | *string* | :heavy_check_mark: | The country of origin of this media item | United States of America | -| `filter` | *string* | :heavy_check_mark: | N/A | country=19 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadatadirector.md b/docs/sdk/models/operations/getmediametadatadirector.md deleted file mode 100644 index 3acb29dc..00000000 --- a/docs/sdk/models/operations/getmediametadatadirector.md +++ /dev/null @@ -1,26 +0,0 @@ -# GetMediaMetaDataDirector - -## Example Usage - -```typescript -import { GetMediaMetaDataDirector } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataDirector = { - id: 126522, - tag: "Danny Boyle", - filter: "director=235876", - tagKey: "5d776831151a60001f24d031", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | Unique identifier for the director. | 126522 | -| `tag` | *string* | :heavy_check_mark: | The role of Director | Danny Boyle | -| `filter` | *string* | :heavy_check_mark: | The filter string used to query this director. | director=235876 | -| `tagKey` | *string* | :heavy_check_mark: | A unique 24-character hexadecimal key associated with the director's tag, used for internal identification. | 5d776831151a60001f24d031 | -| `thumb` | *string* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the director. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadataextras.md b/docs/sdk/models/operations/getmediametadataextras.md deleted file mode 100644 index 56ca8bcf..00000000 --- a/docs/sdk/models/operations/getmediametadataextras.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetMediaMetaDataExtras - -## Example Usage - -```typescript -import { GetMediaMetaDataExtras } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataExtras = { - size: 1, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `size` | *number* | :heavy_minus_sign: | The size of the extras. | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadatagenre.md b/docs/sdk/models/operations/getmediametadatagenre.md deleted file mode 100644 index cffd0d20..00000000 --- a/docs/sdk/models/operations/getmediametadatagenre.md +++ /dev/null @@ -1,23 +0,0 @@ -# GetMediaMetaDataGenre - -The filter query string for similar items. - -## Example Usage - -```typescript -import { GetMediaMetaDataGenre } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataGenre = { - id: 259, - tag: "Crime", - filter: "genre=19", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | The unique identifier for the genre.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | -| `tag` | *string* | :heavy_check_mark: | The genre name of this media-item
| Crime | -| `filter` | *string* | :heavy_check_mark: | N/A | genre=19 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadataguids.md b/docs/sdk/models/operations/getmediametadataguids.md deleted file mode 100644 index ad8fad3f..00000000 --- a/docs/sdk/models/operations/getmediametadataguids.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetMediaMetaDataGuids - -## Example Usage - -```typescript -import { GetMediaMetaDataGuids } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataGuids = { - id: - "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
| {
"imdbExample": {
"summary": "IMDB example",
"value": "imdb://tt13015952"
},
"tmdbExample": {
"summary": "TMDB example",
"value": "tmdb://2434012"
},
"tvdbExample": {
"summary": "TVDB example",
"value": "tvdb://7945991"
}
} | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadatahasthumbnail.md b/docs/sdk/models/operations/getmediametadatahasthumbnail.md deleted file mode 100644 index 35bf59ca..00000000 --- a/docs/sdk/models/operations/getmediametadatahasthumbnail.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetMediaMetaDataHasThumbnail - -Indicates if the part has a thumbnail. - - -## Example Usage - -```typescript -import { GetMediaMetaDataHasThumbnail } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataHasThumbnail = GetMediaMetaDataHasThumbnail.True; -``` - -## Values - -| Name | Value | -| ------- | ------- | -| `False` | 0 | -| `True` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadataimage.md b/docs/sdk/models/operations/getmediametadataimage.md deleted file mode 100644 index 65887a71..00000000 --- a/docs/sdk/models/operations/getmediametadataimage.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetMediaMetaDataImage - -## Example Usage - -```typescript -import { GetMediaMetaDataImage, GetMediaMetaDataLibraryType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataImage = { - alt: "Episode 1", - type: GetMediaMetaDataLibraryType.Background, - url: "/library/metadata/45521/thumb/1644710589", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `alt` | *string* | :heavy_check_mark: | N/A | Episode 1 | -| `type` | [operations.GetMediaMetaDataLibraryType](../../../sdk/models/operations/getmediametadatalibrarytype.md) | :heavy_check_mark: | N/A | background | -| `url` | *string* | :heavy_check_mark: | N/A | /library/metadata/45521/thumb/1644710589 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadatalibraryoptimizedforstreaming.md b/docs/sdk/models/operations/getmediametadatalibraryoptimizedforstreaming.md deleted file mode 100644 index 7f71701b..00000000 --- a/docs/sdk/models/operations/getmediametadatalibraryoptimizedforstreaming.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetMediaMetaDataLibraryOptimizedForStreaming - -Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - - - -## Supported Types - -### `operations.GetMediaMetaDataOptimizedForStreamingLibrary1` - -```typescript -const value: operations.GetMediaMetaDataOptimizedForStreamingLibrary1 = - GetMediaMetaDataOptimizedForStreamingLibrary1.Zero; -``` - -### `boolean` - -```typescript -const value: boolean = true; -``` - diff --git a/docs/sdk/models/operations/getmediametadatalibrarytype.md b/docs/sdk/models/operations/getmediametadatalibrarytype.md deleted file mode 100644 index c6cadbe1..00000000 --- a/docs/sdk/models/operations/getmediametadatalibrarytype.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetMediaMetaDataLibraryType - -## Example Usage - -```typescript -import { GetMediaMetaDataLibraryType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataLibraryType = GetMediaMetaDataLibraryType.Background; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `CoverPoster` | coverPoster | -| `Background` | background | -| `Snapshot` | snapshot | -| `ClearLogo` | clearLogo | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadatalocation.md b/docs/sdk/models/operations/getmediametadatalocation.md deleted file mode 100644 index 88e705c7..00000000 --- a/docs/sdk/models/operations/getmediametadatalocation.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetMediaMetaDataLocation - -## Example Usage - -```typescript -import { GetMediaMetaDataLocation } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataLocation = { - path: "/TV Shows/Better Call Saul", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `path` | *string* | :heavy_check_mark: | The file path for the location. | /TV Shows/Better Call Saul | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadatamarker.md b/docs/sdk/models/operations/getmediametadatamarker.md deleted file mode 100644 index b7b40578..00000000 --- a/docs/sdk/models/operations/getmediametadatamarker.md +++ /dev/null @@ -1,32 +0,0 @@ -# GetMediaMetaDataMarker - -The final status of the marker - -## Example Usage - -```typescript -import { GetMediaMetaDataMarker } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataMarker = { - id: 306970, - type: "credits", - startTimeOffset: 4176050, - endTimeOffset: 4393389, - final: true, - attributes: { - id: 306970, - version: 4, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | N/A | 306970 | -| `type` | *string* | :heavy_check_mark: | N/A | credits | -| `startTimeOffset` | *number* | :heavy_check_mark: | N/A | 4176050 | -| `endTimeOffset` | *number* | :heavy_check_mark: | N/A | 4393389 | -| `final` | *boolean* | :heavy_minus_sign: | N/A | true | -| `attributes` | [operations.GetMediaMetaDataAttributes](../../../sdk/models/operations/getmediametadataattributes.md) | :heavy_minus_sign: | Attributes associated with the marker. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadatamedia.md b/docs/sdk/models/operations/getmediametadatamedia.md deleted file mode 100644 index 5c12459f..00000000 --- a/docs/sdk/models/operations/getmediametadatamedia.md +++ /dev/null @@ -1,123 +0,0 @@ -# GetMediaMetaDataMedia - -## Example Usage - -```typescript -import { GetMediaMetaDataHasThumbnail, GetMediaMetaDataMedia } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataMedia = { - id: 387322, - duration: 9610350, - bitrate: 25512, - width: 3840, - height: 1602, - aspectRatio: 2.35, - audioChannels: 6, - displayOffset: 50, - audioCodec: "aac", - videoCodec: "hevc", - videoResolution: "4k", - container: "mp4", - videoFrameRate: "24p", - videoProfile: "main 10", - hasVoiceActivity: false, - audioProfile: "dts", - has64bitOffsets: false, - part: [ - { - accessible: true, - exists: true, - id: 418385, - key: "/library/parts/418385/1735864239/file.mkv", - indexes: "sd", - duration: 9610350, - file: "/mnt/Movies_1/W/Wicked (2024).mkv", - size: 30649952104, - packetLength: 188, - container: "mkv", - videoProfile: "main 10", - audioProfile: "dts", - has64bitOffsets: false, - hasThumbnail: GetMediaMetaDataHasThumbnail.True, - stream: [ - { - id: 1002625, - format: "srt", - default: true, - codec: "hevc", - index: 0, - bitrate: 24743, - language: "English", - languageTag: "en", - languageCode: "eng", - headerCompression: true, - doviblCompatID: 1, - doviblPresent: true, - dovielPresent: false, - doviLevel: 6, - doviPresent: true, - doviProfile: 8, - dovirpuPresent: true, - doviVersion: "1.0", - bitDepth: 10, - chromaLocation: "topleft", - chromaSubsampling: "4:2:0", - codedHeight: 1608, - codedWidth: 3840, - closedCaptions: true, - colorPrimaries: "bt2020", - colorRange: "tv", - colorSpace: "bt2020nc", - colorTrc: "smpte2084", - frameRate: 23.976, - key: "/library/streams/216389", - height: 1602, - level: 150, - original: true, - hasScalingMatrix: false, - profile: "main 10", - scanType: "progressive", - embeddedInVideo: "progressive", - refFrames: 1, - width: 3840, - displayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - extendedDisplayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - selected: true, - forced: true, - channels: 6, - audioChannelLayout: "5.1(side)", - samplingRate: 48000, - canAutoSync: false, - hearingImpaired: true, - dub: true, - title: "SDH", - }, - ], - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | Unique media identifier. | 387322 | -| `duration` | *number* | :heavy_minus_sign: | Duration of the media in milliseconds. | 9610350 | -| `bitrate` | *number* | :heavy_minus_sign: | Bitrate in bits per second. | 25512 | -| `width` | *number* | :heavy_minus_sign: | Video width in pixels. | 3840 | -| `height` | *number* | :heavy_minus_sign: | Video height in pixels. | 1602 | -| `aspectRatio` | *number* | :heavy_minus_sign: | Aspect ratio of the video. | 2.35 | -| `audioChannels` | *number* | :heavy_minus_sign: | Number of audio channels. | 6 | -| `displayOffset` | *number* | :heavy_minus_sign: | N/A | 50 | -| `audioCodec` | *string* | :heavy_minus_sign: | Audio codec used. | aac | -| `videoCodec` | *string* | :heavy_minus_sign: | Video codec used. | hevc | -| `videoResolution` | *string* | :heavy_minus_sign: | Video resolution (e.g., 4k). | 4k | -| `container` | *string* | :heavy_minus_sign: | Container format of the media. | mp4 | -| `videoFrameRate` | *string* | :heavy_minus_sign: | Frame rate of the video. Values found include NTSC, PAL, 24p
| 24p | -| `videoProfile` | *string* | :heavy_minus_sign: | Video profile (e.g., main 10). | main 10 | -| `hasVoiceActivity` | *boolean* | :heavy_minus_sign: | Indicates whether voice activity is detected. | false | -| `audioProfile` | *string* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `optimizedForStreaming` | *operations.GetMediaMetaDataOptimizedForStreaming* | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | -| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | Indicates whether the media has 64-bit offsets.
This is relevant for media files that may require larger offsets than what 32-bit integers can provide.
| false | -| `part` | [operations.GetMediaMetaDataPart](../../../sdk/models/operations/getmediametadatapart.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadatamediacontainer.md b/docs/sdk/models/operations/getmediametadatamediacontainer.md deleted file mode 100644 index eca630d5..00000000 --- a/docs/sdk/models/operations/getmediametadatamediacontainer.md +++ /dev/null @@ -1,33 +0,0 @@ -# GetMediaMetaDataMediaContainer - -## Example Usage - -```typescript -import { GetMediaMetaDataMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataMediaContainer = { - size: 50, - allowSync: false, - identifier: "com.plexapp.plugins.library", - librarySectionID: 2, - librarySectionTitle: "TV Series", - librarySectionUUID: "e69655a2-ef48-4aba-bb19-0cc34d1e7d36", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1734362201, - metadata: [], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `identifier` | *string* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `librarySectionID` | *number* | :heavy_minus_sign: | The unique identifier for the library section. | 2 | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | The title of the library section. | TV Series | -| `librarySectionUUID` | *string* | :heavy_minus_sign: | The universally unique identifier for the library section. | e69655a2-ef48-4aba-bb19-0cc34d1e7d36 | -| `mediaTagPrefix` | *string* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | -| `mediaTagVersion` | *number* | :heavy_check_mark: | The version number for media tags. | 1734362201 | -| `metadata` | [operations.GetMediaMetaDataMetadata](../../../sdk/models/operations/getmediametadatametadata.md)[] | :heavy_check_mark: | An array of metadata items. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadatametadata.md b/docs/sdk/models/operations/getmediametadatametadata.md deleted file mode 100644 index d283d6be..00000000 --- a/docs/sdk/models/operations/getmediametadatametadata.md +++ /dev/null @@ -1,371 +0,0 @@ -# GetMediaMetaDataMetadata - -Unknown - - -## Example Usage - -```typescript -import { - GetMediaMetaDataHasThumbnail, - GetMediaMetaDataLibraryType, - GetMediaMetaDataMetadata, - GetMediaMetaDataType, -} from "@lukehagar/plexjs/sdk/models/operations"; -import { RFCDate } from "@lukehagar/plexjs/sdk/types"; - -let value: GetMediaMetaDataMetadata = { - ratingKey: "58683", - key: "/library/metadata/58683", - guid: "plex://movie/5d7768ba96b655001fdc0408", - slug: "4-for-texas", - studio: "20th Century Studios", - type: GetMediaMetaDataType.Movie, - title: "Avatar: The Way of Water", - titleSort: "Whale", - contentRating: "PG-13", - summary: - "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\n" - + "Once a familiar threat returns to finish what was previously started, Jake must\n" - + "work with Neytiri and the army of the Na'vi race to protect their home.\n" - + "", - rating: 7.6, - audienceRating: 9.2, - year: 2022, - tagline: "Return to Pandora.", - thumb: "/library/metadata/58683/thumb/1703239236", - art: "/library/metadata/58683/art/1703239236", - theme: "/library/metadata/1/theme/1705636920", - index: 1, - leafCount: 14, - viewedLeafCount: 0, - childCount: 1, - seasonCount: 2022, - duration: 11558112, - originallyAvailableAt: new RFCDate("2022-12-14"), - addedAt: 1556281940, - updatedAt: 1556281940, - audienceRatingImage: "rottentomatoes://image.rating.upright", - chapterSource: "media", - primaryExtraKey: "/library/metadata/58684", - originalTitle: "映画 ブラッククローバー 魔法帝の剣", - parentRatingKey: "66", - grandparentRatingKey: "66", - parentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentSlug: "alice-in-borderland-2020", - grandparentKey: "/library/metadata/66", - parentKey: "/library/metadata/66", - grandparentTitle: "Caprica", - grandparentThumb: "/library/metadata/66/thumb/1705716261", - grandparentTheme: "/library/metadata/66/theme/1705716261", - grandparentArt: "/library/metadata/66/art/1705716261", - parentTitle: "Caprica", - parentIndex: 1, - parentThumb: "/library/metadata/66/thumb/1705716261", - ratingImage: "rottentomatoes://image.rating.ripe", - viewCount: 1, - viewOffset: 5222500, - skipCount: 1, - subtype: "clip", - lastRatedAt: 1721813113, - createdAtAccuracy: "epoch,local", - createdAtTZOffset: "0", - lastViewedAt: 1682752242, - userRating: 10, - image: [ - { - alt: "Episode 1", - type: GetMediaMetaDataLibraryType.Background, - url: "/library/metadata/45521/thumb/1644710589", - }, - ], - ultraBlurColors: { - topLeft: "11333b", - topRight: "0a232d", - bottomRight: "73958", - bottomLeft: "1f5066", - }, - librarySectionID: 1, - librarySectionTitle: "Movies", - librarySectionKey: "/library/sections/1", - guids: [ - { - id: - "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}", - }, - ], - media: [ - { - id: 387322, - duration: 9610350, - bitrate: 25512, - width: 3840, - height: 1602, - aspectRatio: 2.35, - audioChannels: 6, - displayOffset: 50, - audioCodec: "aac", - videoCodec: "hevc", - videoResolution: "4k", - container: "mp4", - videoFrameRate: "24p", - videoProfile: "main 10", - hasVoiceActivity: false, - audioProfile: "dts", - has64bitOffsets: false, - part: [ - { - accessible: true, - exists: true, - id: 418385, - key: "/library/parts/418385/1735864239/file.mkv", - indexes: "sd", - duration: 9610350, - file: "/mnt/Movies_1/W/Wicked (2024).mkv", - size: 30649952104, - packetLength: 188, - container: "mkv", - videoProfile: "main 10", - audioProfile: "dts", - has64bitOffsets: false, - hasThumbnail: GetMediaMetaDataHasThumbnail.True, - stream: [ - { - id: 1002625, - format: "srt", - default: true, - codec: "hevc", - index: 0, - bitrate: 24743, - language: "English", - languageTag: "en", - languageCode: "eng", - headerCompression: true, - doviblCompatID: 1, - doviblPresent: true, - dovielPresent: false, - doviLevel: 6, - doviPresent: true, - doviProfile: 8, - dovirpuPresent: true, - doviVersion: "1.0", - bitDepth: 10, - chromaLocation: "topleft", - chromaSubsampling: "4:2:0", - codedHeight: 1608, - codedWidth: 3840, - closedCaptions: true, - colorPrimaries: "bt2020", - colorRange: "tv", - colorSpace: "bt2020nc", - colorTrc: "smpte2084", - frameRate: 23.976, - key: "/library/streams/216389", - height: 1602, - level: 150, - original: true, - hasScalingMatrix: false, - profile: "main 10", - scanType: "progressive", - embeddedInVideo: "progressive", - refFrames: 1, - width: 3840, - displayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - extendedDisplayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - selected: true, - forced: true, - channels: 6, - audioChannelLayout: "5.1(side)", - samplingRate: 48000, - canAutoSync: false, - hearingImpaired: true, - dub: true, - title: "SDH", - }, - ], - }, - ], - }, - ], - genre: [ - { - id: 259, - tag: "Crime", - filter: "genre=19", - }, - ], - country: [ - { - id: 259, - tag: "United States of America", - filter: "country=19", - }, - ], - director: [ - { - id: 126522, - tag: "Danny Boyle", - filter: "director=235876", - tagKey: "5d776831151a60001f24d031", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", - }, - ], - writer: [ - { - id: 126522, - tag: "Jamie P. Hanson", - filter: "writer=126522", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", - tagKey: "5d77683d85719b001f3a535e", - }, - ], - producer: [ - { - id: 109501, - filter: "actor=109501", - tag: "Bob Odenkirk", - tagKey: "5d77683254f42c001f8c3f69", - role: "Jimmy McGill", - thumb: - "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg", - }, - ], - role: [ - { - id: 126522, - tag: "Teller", - role: "Self - Judge", - filter: "actor=126522", - tagKey: "5d77683d85719b001f3a535e", - thumb: - "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg", - }, - ], - ratings: [ - { - image: "imdb://image.rating", - value: 9, - type: "audience", - }, - ], - similar: [ - { - id: 26, - filter: "similar=26", - tag: "Breaking Bad", - }, - ], - location: [ - { - path: "/TV Shows/Better Call Saul", - }, - ], - chapter: [ - { - id: 4, - filter: "thumb=4", - index: 1, - startTimeOffset: 0, - endTimeOffset: 100100, - thumb: "/library/media/46883/chapterImages/1", - }, - ], - marker: [ - { - id: 306970, - type: "credits", - startTimeOffset: 4176050, - endTimeOffset: 4393389, - final: true, - attributes: { - id: 306970, - version: 4, - }, - }, - ], - extras: { - size: 1, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *string* | :heavy_check_mark: | The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. | 58683 | -| `key` | *string* | :heavy_check_mark: | The unique key for the media item. | /library/metadata/58683 | -| `guid` | *string* | :heavy_check_mark: | The globally unique identifier for the media item. | plex://movie/5d7768ba96b655001fdc0408 | -| `slug` | *string* | :heavy_check_mark: | A URL‐friendly version of the media title. | 4-for-texas | -| `studio` | *string* | :heavy_minus_sign: | The studio that produced the media item. | 20th Century Studios | -| `type` | [operations.GetMediaMetaDataType](../../../sdk/models/operations/getmediametadatatype.md) | :heavy_check_mark: | N/A | movie | -| `title` | *string* | :heavy_check_mark: | The title of the media item. | Avatar: The Way of Water | -| `titleSort` | *string* | :heavy_check_mark: | The sort title used for ordering media items. | Whale | -| `contentRating` | *string* | :heavy_minus_sign: | The content rating for the media item. | PG-13 | -| `summary` | *string* | :heavy_check_mark: | A synopsis of the media item. | 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` | *number* | :heavy_check_mark: | The critic rating for the media item. | 7.6 | -| `audienceRating` | *number* | :heavy_check_mark: | The audience rating for the media item. | 9.2 | -| `year` | *number* | :heavy_minus_sign: | The release year of the media item. | 2022 | -| `tagline` | *string* | :heavy_check_mark: | A brief tagline for the media item. | Return to Pandora. | -| `thumb` | *string* | :heavy_check_mark: | The thumbnail image URL for the media item. | /library/metadata/58683/thumb/1703239236 | -| `art` | *string* | :heavy_check_mark: | The art image URL for the media item. | /library/metadata/58683/art/1703239236 | -| `theme` | *string* | :heavy_check_mark: | The theme URL for the media item. | /library/metadata/1/theme/1705636920 | -| `index` | *number* | :heavy_check_mark: | The index position of the media item. | 1 | -| `leafCount` | *number* | :heavy_minus_sign: | The number of leaf items (end nodes) under this media item. | 14 | -| `viewedLeafCount` | *number* | :heavy_minus_sign: | The number of leaf items that have been viewed. | 0 | -| `childCount` | *number* | :heavy_check_mark: | The number of child items associated with this media item. | 1 | -| `seasonCount` | *number* | :heavy_check_mark: | The total number of seasons (for TV shows). | 2022 | -| `duration` | *number* | :heavy_check_mark: | The duration of the media item in milliseconds. | 11558112 | -| `originallyAvailableAt` | [RFCDate](../../../types/rfcdate.md) | :heavy_minus_sign: | The original release date of the media item. | 2022-12-14 | -| `addedAt` | *number* | :heavy_check_mark: | N/A | 1556281940 | -| `updatedAt` | *number* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 | -| `audienceRatingImage` | *string* | :heavy_minus_sign: | The URL for the audience rating image. | rottentomatoes://image.rating.upright | -| `chapterSource` | *string* | :heavy_minus_sign: | The source from which chapter data is derived. | media | -| `primaryExtraKey` | *string* | :heavy_minus_sign: | The primary extra key associated with this media item. | /library/metadata/58684 | -| `originalTitle` | *string* | :heavy_minus_sign: | The original title of the media item (if different). | 映画 ブラッククローバー 魔法帝の剣 | -| `parentRatingKey` | *string* | :heavy_minus_sign: | The rating key of the parent media item. | 66 | -| `grandparentRatingKey` | *string* | :heavy_minus_sign: | The rating key of the grandparent media item. | 66 | -| `parentGuid` | *string* | :heavy_minus_sign: | The GUID of the parent media item. | plex://show/5d9c081b170e24001f2a7be4 | -| `grandparentGuid` | *string* | :heavy_minus_sign: | The GUID of the grandparent media item. | plex://show/5d9c081b170e24001f2a7be4 | -| `grandparentSlug` | *string* | :heavy_minus_sign: | The slug for the grandparent media item. | alice-in-borderland-2020 | -| `grandparentKey` | *string* | :heavy_minus_sign: | The key of the grandparent media item. | /library/metadata/66 | -| `parentKey` | *string* | :heavy_minus_sign: | The key of the parent media item. | /library/metadata/66 | -| `grandparentTitle` | *string* | :heavy_minus_sign: | The title of the grandparent media item. | Caprica | -| `grandparentThumb` | *string* | :heavy_minus_sign: | The thumbnail URL for the grandparent media item. | /library/metadata/66/thumb/1705716261 | -| `grandparentTheme` | *string* | :heavy_minus_sign: | The theme URL for the grandparent media item. | /library/metadata/66/theme/1705716261 | -| `grandparentArt` | *string* | :heavy_minus_sign: | The art URL for the grandparent media item. | /library/metadata/66/art/1705716261 | -| `parentTitle` | *string* | :heavy_minus_sign: | The title of the parent media item. | Caprica | -| `parentIndex` | *number* | :heavy_minus_sign: | The index position of the parent media item. | 1 | -| `parentThumb` | *string* | :heavy_minus_sign: | The thumbnail URL for the parent media item. | /library/metadata/66/thumb/1705716261 | -| `ratingImage` | *string* | :heavy_minus_sign: | The URL for the rating image. | rottentomatoes://image.rating.ripe | -| `viewCount` | *number* | :heavy_minus_sign: | The number of times this media item has been viewed. | 1 | -| `viewOffset` | *number* | :heavy_minus_sign: | The current playback offset (in milliseconds). | 5222500 | -| `skipCount` | *number* | :heavy_minus_sign: | The number of times this media item has been skipped. | 1 | -| `subtype` | *string* | :heavy_minus_sign: | A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. | clip | -| `lastRatedAt` | *number* | :heavy_minus_sign: | The Unix timestamp representing the last time the item was rated. | 1721813113 | -| `createdAtAccuracy` | *string* | :heavy_minus_sign: | The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). | epoch,local | -| `createdAtTZOffset` | *string* | :heavy_minus_sign: | The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. | 0 | -| `lastViewedAt` | *number* | :heavy_minus_sign: | Unix timestamp for when the media item was last viewed. | 1682752242 | -| `userRating` | *number* | :heavy_minus_sign: | The rating provided by a user for the item. This value is expressed as a decimal number. | 10 | -| `image` | [operations.GetMediaMetaDataImage](../../../sdk/models/operations/getmediametadataimage.md)[] | :heavy_minus_sign: | N/A | | -| `ultraBlurColors` | [operations.GetMediaMetaDataUltraBlurColors](../../../sdk/models/operations/getmediametadataultrablurcolors.md) | :heavy_minus_sign: | N/A | | -| `librarySectionID` | *number* | :heavy_minus_sign: | The identifier for the library section. | 1 | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | The title of the library section. | Movies | -| `librarySectionKey` | *string* | :heavy_minus_sign: | The key corresponding to the library section. | /library/sections/1 | -| `guids` | [operations.GetMediaMetaDataGuids](../../../sdk/models/operations/getmediametadataguids.md)[] | :heavy_minus_sign: | N/A | | -| `media` | [operations.GetMediaMetaDataMedia](../../../sdk/models/operations/getmediametadatamedia.md)[] | :heavy_minus_sign: | N/A | | -| `genre` | [operations.GetMediaMetaDataGenre](../../../sdk/models/operations/getmediametadatagenre.md)[] | :heavy_minus_sign: | N/A | | -| `country` | [operations.GetMediaMetaDataCountry](../../../sdk/models/operations/getmediametadatacountry.md)[] | :heavy_minus_sign: | N/A | | -| `director` | [operations.GetMediaMetaDataDirector](../../../sdk/models/operations/getmediametadatadirector.md)[] | :heavy_minus_sign: | N/A | | -| `writer` | [operations.GetMediaMetaDataWriter](../../../sdk/models/operations/getmediametadatawriter.md)[] | :heavy_minus_sign: | N/A | | -| `producer` | [operations.GetMediaMetaDataProducer](../../../sdk/models/operations/getmediametadataproducer.md)[] | :heavy_minus_sign: | N/A | | -| `role` | [operations.GetMediaMetaDataRole](../../../sdk/models/operations/getmediametadatarole.md)[] | :heavy_minus_sign: | N/A | | -| `ratings` | [operations.GetMediaMetaDataRatings](../../../sdk/models/operations/getmediametadataratings.md)[] | :heavy_minus_sign: | N/A | | -| `similar` | [operations.GetMediaMetaDataSimilar](../../../sdk/models/operations/getmediametadatasimilar.md)[] | :heavy_minus_sign: | N/A | | -| `location` | [operations.GetMediaMetaDataLocation](../../../sdk/models/operations/getmediametadatalocation.md)[] | :heavy_minus_sign: | N/A | | -| `chapter` | [operations.GetMediaMetaDataChapter](../../../sdk/models/operations/getmediametadatachapter.md)[] | :heavy_minus_sign: | N/A | | -| `marker` | [operations.GetMediaMetaDataMarker](../../../sdk/models/operations/getmediametadatamarker.md)[] | :heavy_minus_sign: | N/A | | -| `extras` | [operations.GetMediaMetaDataExtras](../../../sdk/models/operations/getmediametadataextras.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadataoptimizedforstreaming.md b/docs/sdk/models/operations/getmediametadataoptimizedforstreaming.md deleted file mode 100644 index beae8fea..00000000 --- a/docs/sdk/models/operations/getmediametadataoptimizedforstreaming.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetMediaMetaDataOptimizedForStreaming - -Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - - -## Supported Types - -### `operations.GetMediaMetaDataOptimizedForStreaming1` - -```typescript -const value: operations.GetMediaMetaDataOptimizedForStreaming1 = - GetMediaMetaDataOptimizedForStreaming1.One; -``` - -### `boolean` - -```typescript -const value: boolean = true; -``` - diff --git a/docs/sdk/models/operations/getmediametadataoptimizedforstreaming1.md b/docs/sdk/models/operations/getmediametadataoptimizedforstreaming1.md deleted file mode 100644 index c44624ef..00000000 --- a/docs/sdk/models/operations/getmediametadataoptimizedforstreaming1.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetMediaMetaDataOptimizedForStreaming1 - -## Example Usage - -```typescript -import { GetMediaMetaDataOptimizedForStreaming1 } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataOptimizedForStreaming1 = - GetMediaMetaDataOptimizedForStreaming1.One; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadataoptimizedforstreaminglibrary1.md b/docs/sdk/models/operations/getmediametadataoptimizedforstreaminglibrary1.md deleted file mode 100644 index 06bdbb37..00000000 --- a/docs/sdk/models/operations/getmediametadataoptimizedforstreaminglibrary1.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetMediaMetaDataOptimizedForStreamingLibrary1 - -## Example Usage - -```typescript -import { GetMediaMetaDataOptimizedForStreamingLibrary1 } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataOptimizedForStreamingLibrary1 = - GetMediaMetaDataOptimizedForStreamingLibrary1.Zero; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadatapart.md b/docs/sdk/models/operations/getmediametadatapart.md deleted file mode 100644 index 82023bea..00000000 --- a/docs/sdk/models/operations/getmediametadatapart.md +++ /dev/null @@ -1,99 +0,0 @@ -# GetMediaMetaDataPart - -## Example Usage - -```typescript -import { GetMediaMetaDataHasThumbnail, GetMediaMetaDataPart } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataPart = { - accessible: true, - exists: true, - id: 418385, - key: "/library/parts/418385/1735864239/file.mkv", - indexes: "sd", - duration: 9610350, - file: "/mnt/Movies_1/W/Wicked (2024).mkv", - size: 30649952104, - packetLength: 188, - container: "mkv", - videoProfile: "main 10", - audioProfile: "dts", - has64bitOffsets: false, - hasThumbnail: GetMediaMetaDataHasThumbnail.True, - stream: [ - { - id: 1002625, - format: "srt", - default: true, - codec: "hevc", - index: 0, - bitrate: 24743, - language: "English", - languageTag: "en", - languageCode: "eng", - headerCompression: true, - doviblCompatID: 1, - doviblPresent: true, - dovielPresent: false, - doviLevel: 6, - doviPresent: true, - doviProfile: 8, - dovirpuPresent: true, - doviVersion: "1.0", - bitDepth: 10, - chromaLocation: "topleft", - chromaSubsampling: "4:2:0", - codedHeight: 1608, - codedWidth: 3840, - closedCaptions: true, - colorPrimaries: "bt2020", - colorRange: "tv", - colorSpace: "bt2020nc", - colorTrc: "smpte2084", - frameRate: 23.976, - key: "/library/streams/216389", - height: 1602, - level: 150, - original: true, - hasScalingMatrix: false, - profile: "main 10", - scanType: "progressive", - embeddedInVideo: "progressive", - refFrames: 1, - width: 3840, - displayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - extendedDisplayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - selected: true, - forced: true, - channels: 6, - audioChannelLayout: "5.1(side)", - samplingRate: 48000, - canAutoSync: false, - hearingImpaired: true, - dub: true, - title: "SDH", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `accessible` | *boolean* | :heavy_minus_sign: | Indicates if the part is accessible. | true | -| `exists` | *boolean* | :heavy_minus_sign: | Indicates if the part exists. | true | -| `id` | *number* | :heavy_check_mark: | Unique part identifier. | 418385 | -| `key` | *string* | :heavy_minus_sign: | Key to access this part. | /library/parts/418385/1735864239/file.mkv | -| `indexes` | *string* | :heavy_minus_sign: | N/A | sd | -| `duration` | *number* | :heavy_minus_sign: | Duration of the part in milliseconds. | 9610350 | -| `file` | *string* | :heavy_minus_sign: | File path for the part. | /mnt/Movies_1/W/Wicked (2024).mkv | -| `size` | *number* | :heavy_minus_sign: | File size in bytes. | 30649952104 | -| `packetLength` | *number* | :heavy_minus_sign: | N/A | 188 | -| `container` | *string* | :heavy_minus_sign: | Container format of the part. | mkv | -| `videoProfile` | *string* | :heavy_minus_sign: | Video profile for the part. | main 10 | -| `audioProfile` | *string* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | -| `optimizedForStreaming` | *operations.GetMediaMetaDataLibraryOptimizedForStreaming* | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
| | -| `hasThumbnail` | [operations.GetMediaMetaDataHasThumbnail](../../../sdk/models/operations/getmediametadatahasthumbnail.md) | :heavy_minus_sign: | N/A | 1 | -| `stream` | [operations.GetMediaMetaDataStream](../../../sdk/models/operations/getmediametadatastream.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadataproducer.md b/docs/sdk/models/operations/getmediametadataproducer.md deleted file mode 100644 index 8eea17a9..00000000 --- a/docs/sdk/models/operations/getmediametadataproducer.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetMediaMetaDataProducer - -## Example Usage - -```typescript -import { GetMediaMetaDataProducer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataProducer = { - id: 109501, - filter: "actor=109501", - tag: "Bob Odenkirk", - tagKey: "5d77683254f42c001f8c3f69", - role: "Jimmy McGill", - thumb: - "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | The unique role identifier. | 109501 | -| `filter` | *string* | :heavy_check_mark: | The filter string for the role. | actor=109501 | -| `tag` | *string* | :heavy_check_mark: | The actor's name. | Bob Odenkirk | -| `tagKey` | *string* | :heavy_check_mark: | A key associated with the actor tag. | 5d77683254f42c001f8c3f69 | -| `role` | *string* | :heavy_minus_sign: | The character name or role. | Jimmy McGill | -| `thumb` | *string* | :heavy_minus_sign: | URL for the role thumbnail image. | https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadataratings.md b/docs/sdk/models/operations/getmediametadataratings.md deleted file mode 100644 index 66fa806c..00000000 --- a/docs/sdk/models/operations/getmediametadataratings.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetMediaMetaDataRatings - -## Example Usage - -```typescript -import { GetMediaMetaDataRatings } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataRatings = { - image: "imdb://image.rating", - value: 9, - type: "audience", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `image` | *string* | :heavy_check_mark: | The image or reference for the rating. | imdb://image.rating | -| `value` | *number* | :heavy_check_mark: | The rating value. | 9 | -| `type` | *string* | :heavy_check_mark: | The type of rating (e.g., audience, critic). | audience | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadatarequest.md b/docs/sdk/models/operations/getmediametadatarequest.md deleted file mode 100644 index 3d00d3fa..00000000 --- a/docs/sdk/models/operations/getmediametadatarequest.md +++ /dev/null @@ -1,43 +0,0 @@ -# GetMediaMetaDataRequest - -## Example Usage - -```typescript -import { GetMediaMetaDataRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataRequest = { - ratingKey: "21119,21617", - includeConcerts: true, - includeExtras: true, - includeOnDeck: true, - includePopularLeaves: true, - includePreferences: true, - includeReviews: true, - includeChapters: true, - includeStations: true, - includeExternalMedia: true, - asyncAugmentMetadata: true, - asyncCheckFiles: true, - asyncRefreshAnalysis: true, - asyncRefreshLocalMediaAgent: true, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *string* | :heavy_check_mark: | The id(s) of the library item(s) to return metadata for. Can be a single ID or comma-separated list of IDs. | 21119,21617 | -| `includeConcerts` | *boolean* | :heavy_minus_sign: | Include concerts data if set to true. | true | -| `includeExtras` | *boolean* | :heavy_minus_sign: | Include extra content (e.g. bonus features). | true | -| `includeOnDeck` | *boolean* | :heavy_minus_sign: | Include on-deck items. | true | -| `includePopularLeaves` | *boolean* | :heavy_minus_sign: | Include popular leaves (episodes/chapters). | true | -| `includePreferences` | *boolean* | :heavy_minus_sign: | Include preferences information. | true | -| `includeReviews` | *boolean* | :heavy_minus_sign: | Include reviews for the content. | true | -| `includeChapters` | *boolean* | :heavy_minus_sign: | Include chapter details. | true | -| `includeStations` | *boolean* | :heavy_minus_sign: | Include station data. | true | -| `includeExternalMedia` | *boolean* | :heavy_minus_sign: | Include external media data. | true | -| `asyncAugmentMetadata` | *boolean* | :heavy_minus_sign: | Trigger asynchronous metadata augmentation. | true | -| `asyncCheckFiles` | *boolean* | :heavy_minus_sign: | Trigger asynchronous file checking. | true | -| `asyncRefreshAnalysis` | *boolean* | :heavy_minus_sign: | Trigger asynchronous refresh of analysis. | true | -| `asyncRefreshLocalMediaAgent` | *boolean* | :heavy_minus_sign: | Trigger asynchronous refresh of the local media agent. | true | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadataresponse.md b/docs/sdk/models/operations/getmediametadataresponse.md deleted file mode 100644 index ba049c3f..00000000 --- a/docs/sdk/models/operations/getmediametadataresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetMediaMetaDataResponse - -## Example Usage - -```typescript -import { GetMediaMetaDataResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataResponse = { - contentType: "", - statusCode: 114115, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetMediaMetaDataResponseBody](../../../sdk/models/operations/getmediametadataresponsebody.md) | :heavy_minus_sign: | The metadata of the library item. | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadataresponsebody.md b/docs/sdk/models/operations/getmediametadataresponsebody.md deleted file mode 100644 index 692f41fd..00000000 --- a/docs/sdk/models/operations/getmediametadataresponsebody.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetMediaMetaDataResponseBody - -The metadata of the library item. - -## Example Usage - -```typescript -import { GetMediaMetaDataResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataResponseBody = { - mediaContainer: { - size: 50, - allowSync: false, - identifier: "com.plexapp.plugins.library", - librarySectionID: 2, - librarySectionTitle: "TV Series", - librarySectionUUID: "e69655a2-ef48-4aba-bb19-0cc34d1e7d36", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1734362201, - metadata: [], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetMediaMetaDataMediaContainer](../../../sdk/models/operations/getmediametadatamediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadatarole.md b/docs/sdk/models/operations/getmediametadatarole.md deleted file mode 100644 index 7fdc7310..00000000 --- a/docs/sdk/models/operations/getmediametadatarole.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetMediaMetaDataRole - -## Example Usage - -```typescript -import { GetMediaMetaDataRole } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataRole = { - id: 126522, - tag: "Teller", - role: "Self - Judge", - filter: "actor=126522", - tagKey: "5d77683d85719b001f3a535e", - thumb: - "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | The unique identifier for the role.
NOTE: This is different for each Plex server and is not globally unique.
| 126522 | -| `tag` | *string* | :heavy_check_mark: | The display tag for the actor (typically the actor's name). | Teller | -| `role` | *string* | :heavy_minus_sign: | The role played by the actor in the media item. | Self - Judge | -| `filter` | *string* | :heavy_check_mark: | The filter string used to query this actor. For example, it may indicate that this is an actor with a given key. | actor=126522 | -| `tagKey` | *string* | :heavy_check_mark: | A 24-character hexadecimal unique key associated with the actor's tag, used for internal identification.
NOTE: This is globally unique across all Plex Servers.
| 5d77683d85719b001f3a535e | -| `thumb` | *string* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the actor. | https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadatasimilar.md b/docs/sdk/models/operations/getmediametadatasimilar.md deleted file mode 100644 index 5a8144d8..00000000 --- a/docs/sdk/models/operations/getmediametadatasimilar.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetMediaMetaDataSimilar - -## Example Usage - -```typescript -import { GetMediaMetaDataSimilar } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataSimilar = { - id: 26, - filter: "similar=26", - tag: "Breaking Bad", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `id` | *number* | :heavy_check_mark: | The unique similar item identifier. | 26 | -| `filter` | *string* | :heavy_check_mark: | The filter string for similar items. | similar=26 | -| `tag` | *string* | :heavy_check_mark: | The tag or title of the similar content. | Breaking Bad | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadatastream.md b/docs/sdk/models/operations/getmediametadatastream.md deleted file mode 100644 index ac75efdf..00000000 --- a/docs/sdk/models/operations/getmediametadatastream.md +++ /dev/null @@ -1,116 +0,0 @@ -# GetMediaMetaDataStream - -## Example Usage - -```typescript -import { GetMediaMetaDataStream } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataStream = { - id: 1002625, - format: "srt", - default: true, - codec: "hevc", - index: 0, - bitrate: 24743, - language: "English", - languageTag: "en", - languageCode: "eng", - headerCompression: true, - doviblCompatID: 1, - doviblPresent: true, - dovielPresent: false, - doviLevel: 6, - doviPresent: true, - doviProfile: 8, - dovirpuPresent: true, - doviVersion: "1.0", - bitDepth: 10, - chromaLocation: "topleft", - chromaSubsampling: "4:2:0", - codedHeight: 1608, - codedWidth: 3840, - closedCaptions: true, - colorPrimaries: "bt2020", - colorRange: "tv", - colorSpace: "bt2020nc", - colorTrc: "smpte2084", - frameRate: 23.976, - key: "/library/streams/216389", - height: 1602, - level: 150, - original: true, - hasScalingMatrix: false, - profile: "main 10", - scanType: "progressive", - embeddedInVideo: "progressive", - refFrames: 1, - width: 3840, - displayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - extendedDisplayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - selected: true, - forced: true, - channels: 6, - audioChannelLayout: "5.1(side)", - samplingRate: 48000, - canAutoSync: false, - hearingImpaired: true, - dub: true, - title: "SDH", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | Unique stream identifier. | 1002625 | -| `streamType` | *number* | :heavy_check_mark: | Stream type:
- VIDEO = 1
- AUDIO = 2
- SUBTITLE = 3
| | -| `format` | *string* | :heavy_minus_sign: | Format of the stream (e.g., srt). | srt | -| `default` | *boolean* | :heavy_minus_sign: | Indicates if this stream is default. | true | -| `codec` | *string* | :heavy_minus_sign: | Codec used by the stream. | hevc | -| `index` | *number* | :heavy_minus_sign: | Index of the stream. | 0 | -| `bitrate` | *number* | :heavy_minus_sign: | Bitrate of the stream. | 24743 | -| `language` | *string* | :heavy_minus_sign: | Language of the stream. | English | -| `languageTag` | *string* | :heavy_minus_sign: | Language tag (e.g., en). | en | -| `languageCode` | *string* | :heavy_minus_sign: | ISO language code. | eng | -| `headerCompression` | *boolean* | :heavy_minus_sign: | Indicates whether header compression is enabled. | true | -| `doviblCompatID` | *number* | :heavy_minus_sign: | Dolby Vision BL compatibility ID. | 1 | -| `doviblPresent` | *boolean* | :heavy_minus_sign: | Indicates if Dolby Vision BL is present. | true | -| `dovielPresent` | *boolean* | :heavy_minus_sign: | Indicates if Dolby Vision EL is present. | false | -| `doviLevel` | *number* | :heavy_minus_sign: | Dolby Vision level. | 6 | -| `doviPresent` | *boolean* | :heavy_minus_sign: | Indicates if Dolby Vision is present. | true | -| `doviProfile` | *number* | :heavy_minus_sign: | Dolby Vision profile. | 8 | -| `dovirpuPresent` | *boolean* | :heavy_minus_sign: | Indicates if Dolby Vision RPU is present. | true | -| `doviVersion` | *string* | :heavy_minus_sign: | Dolby Vision version. | 1.0 | -| `bitDepth` | *number* | :heavy_minus_sign: | Bit depth of the video stream. | 10 | -| `chromaLocation` | *string* | :heavy_minus_sign: | Chroma sample location. | topleft | -| `chromaSubsampling` | *string* | :heavy_minus_sign: | Chroma subsampling format. | 4:2:0 | -| `codedHeight` | *number* | :heavy_minus_sign: | Coded video height. | 1608 | -| `codedWidth` | *number* | :heavy_minus_sign: | Coded video width. | 3840 | -| `closedCaptions` | *boolean* | :heavy_minus_sign: | N/A | true | -| `colorPrimaries` | *string* | :heavy_minus_sign: | Color primaries used. | bt2020 | -| `colorRange` | *string* | :heavy_minus_sign: | Color range (e.g., tv). | tv | -| `colorSpace` | *string* | :heavy_minus_sign: | Color space. | bt2020nc | -| `colorTrc` | *string* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 | -| `frameRate` | *number* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 | -| `key` | *string* | :heavy_minus_sign: | Key to access this stream part. | /library/streams/216389 | -| `height` | *number* | :heavy_minus_sign: | Height of the video stream. | 1602 | -| `level` | *number* | :heavy_minus_sign: | Video level. | 150 | -| `original` | *boolean* | :heavy_minus_sign: | Indicates if this is the original stream. | true | -| `hasScalingMatrix` | *boolean* | :heavy_minus_sign: | N/A | false | -| `profile` | *string* | :heavy_minus_sign: | Video profile. | main 10 | -| `scanType` | *string* | :heavy_minus_sign: | N/A | progressive | -| `embeddedInVideo` | *string* | :heavy_minus_sign: | N/A | progressive | -| `refFrames` | *number* | :heavy_minus_sign: | Number of reference frames. | 1 | -| `width` | *number* | :heavy_minus_sign: | Width of the video stream. | 3840 | -| `displayTitle` | *string* | :heavy_minus_sign: | Display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | -| `extendedDisplayTitle` | *string* | :heavy_minus_sign: | Extended display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | -| `selected` | *boolean* | :heavy_minus_sign: | Indicates if this stream is selected (applicable for audio streams). | true | -| `forced` | *boolean* | :heavy_minus_sign: | N/A | true | -| `channels` | *number* | :heavy_minus_sign: | Number of audio channels (for audio streams). | 6 | -| `audioChannelLayout` | *string* | :heavy_minus_sign: | Audio channel layout. | 5.1(side) | -| `samplingRate` | *number* | :heavy_minus_sign: | Sampling rate for the audio stream. | 48000 | -| `canAutoSync` | *boolean* | :heavy_minus_sign: | Indicates if the stream can auto-sync. | false | -| `hearingImpaired` | *boolean* | :heavy_minus_sign: | Indicates if the stream is for the hearing impaired. | true | -| `dub` | *boolean* | :heavy_minus_sign: | Indicates if the stream is a dub. | true | -| `title` | *string* | :heavy_minus_sign: | Optional title for the stream (e.g., language variant). | SDH | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadatatype.md b/docs/sdk/models/operations/getmediametadatatype.md deleted file mode 100644 index 30e4a936..00000000 --- a/docs/sdk/models/operations/getmediametadatatype.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetMediaMetaDataType - -The type of media content in the Plex library. This can represent videos, music, or photos. - - -## Example Usage - -```typescript -import { GetMediaMetaDataType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataType = GetMediaMetaDataType.Movie; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Movie` | movie | -| `TvShow` | show | -| `Season` | season | -| `Episode` | episode | -| `Artist` | artist | -| `Album` | album | -| `Track` | track | -| `PhotoAlbum` | photoalbum | -| `Photo` | photo | -| `Collection` | collection | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadataultrablurcolors.md b/docs/sdk/models/operations/getmediametadataultrablurcolors.md deleted file mode 100644 index 6babe76b..00000000 --- a/docs/sdk/models/operations/getmediametadataultrablurcolors.md +++ /dev/null @@ -1,23 +0,0 @@ -# GetMediaMetaDataUltraBlurColors - -## Example Usage - -```typescript -import { GetMediaMetaDataUltraBlurColors } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataUltraBlurColors = { - topLeft: "11333b", - topRight: "0a232d", - bottomRight: "73958", - bottomLeft: "1f5066", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `topLeft` | *string* | :heavy_check_mark: | N/A | 11333b | -| `topRight` | *string* | :heavy_check_mark: | N/A | 0a232d | -| `bottomRight` | *string* | :heavy_check_mark: | N/A | 73958 | -| `bottomLeft` | *string* | :heavy_check_mark: | N/A | 1f5066 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediametadatawriter.md b/docs/sdk/models/operations/getmediametadatawriter.md deleted file mode 100644 index b6964fc6..00000000 --- a/docs/sdk/models/operations/getmediametadatawriter.md +++ /dev/null @@ -1,26 +0,0 @@ -# GetMediaMetaDataWriter - -## Example Usage - -```typescript -import { GetMediaMetaDataWriter } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaMetaDataWriter = { - id: 126522, - tag: "Jamie P. Hanson", - filter: "writer=126522", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", - tagKey: "5d77683d85719b001f3a535e", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | Unique identifier for the writer. | 126522 | -| `tag` | *string* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson | -| `filter` | *string* | :heavy_check_mark: | The filter string used to query this writer. | writer=126522 | -| `thumb` | *string* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the writer. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | -| `tagKey` | *string* | :heavy_minus_sign: | A 24-character hexadecimal unique key associated with the writer’s tag, used for internal identification. | 5d77683d85719b001f3a535e | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediapartglobals.md b/docs/sdk/models/operations/getmediapartglobals.md new file mode 100644 index 00000000..139464f7 --- /dev/null +++ b/docs/sdk/models/operations/getmediapartglobals.md @@ -0,0 +1,35 @@ +# GetMediaPartGlobals + +## Example Usage + +```typescript +import { GetMediaPartGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetMediaPartGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediapartrequest.md b/docs/sdk/models/operations/getmediapartrequest.md new file mode 100644 index 00000000..7040f960 --- /dev/null +++ b/docs/sdk/models/operations/getmediapartrequest.md @@ -0,0 +1,34 @@ +# GetMediaPartRequest + +## Example Usage + +```typescript +import { GetMediaPartRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: GetMediaPartRequest = { + partId: 488589, + changestamp: 145976, + filename: "example.file", + download: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `partId` | *number* | :heavy_check_mark: | The part id who's index is to be fetched | | +| `changestamp` | *number* | :heavy_check_mark: | The changestamp of the part; used for busting potential caches. Provided in the `key` for the part | | +| `filename` | *string* | :heavy_check_mark: | A generic filename used for a client media stack which relies on the extension in the request. Provided in the `key` for the part | | +| `download` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Whether this is a file download | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediapartresponse.md b/docs/sdk/models/operations/getmediapartresponse.md new file mode 100644 index 00000000..ccf93414 --- /dev/null +++ b/docs/sdk/models/operations/getmediapartresponse.md @@ -0,0 +1,28 @@ +# GetMediaPartResponse + +## Example Usage + +```typescript +import { GetMediaPartResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetMediaPartResponse = { + contentType: "", + statusCode: 778595, + headers: { + "key": [ + "", + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediapostersmediacontainer.md b/docs/sdk/models/operations/getmediapostersmediacontainer.md deleted file mode 100644 index b1ff7551..00000000 --- a/docs/sdk/models/operations/getmediapostersmediacontainer.md +++ /dev/null @@ -1,25 +0,0 @@ -# GetMediaPostersMediaContainer - -## Example Usage - -```typescript -import { GetMediaPostersMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaPostersMediaContainer = { - size: 50, - mediaTagVersion: 1734362201, - mediaTagPrefix: "/system/bundle/media/flags/", - identifier: "com.plexapp.plugins.library", - metadata: [], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `mediaTagVersion` | *number* | :heavy_check_mark: | The version number for media tags. | 1734362201 | -| `mediaTagPrefix` | *string* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | -| `identifier` | *string* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `metadata` | [operations.GetMediaPostersMetadata](../../../sdk/models/operations/getmediapostersmetadata.md)[] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediapostersmetadata.md b/docs/sdk/models/operations/getmediapostersmetadata.md deleted file mode 100644 index d577eeef..00000000 --- a/docs/sdk/models/operations/getmediapostersmetadata.md +++ /dev/null @@ -1,27 +0,0 @@ -# GetMediaPostersMetadata - -## Example Usage - -```typescript -import { GetMediaPostersMetadata } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaPostersMetadata = { - key: "https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg", - provider: "tmdb", - ratingKey: - "https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg", - selected: true, - thumb: - "https://images.plex.tv/photo?height=336&width=225&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FhntBJjqbv4m0Iyniqaztv9xaudI%2Ejpg", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `key` | *string* | :heavy_check_mark: | The URL of the poster. | https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg | -| `provider` | *string* | :heavy_minus_sign: | The provider of the poster. | tmdb | -| `ratingKey` | *string* | :heavy_check_mark: | The URL of the poster. | https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg | -| `selected` | *boolean* | :heavy_check_mark: | Whether this is the selected poster. | true | -| `thumb` | *string* | :heavy_check_mark: | The URL of the poster thumbnail. | https://images.plex.tv/photo?height=336&width=225&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FhntBJjqbv4m0Iyniqaztv9xaudI%2Ejpg | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediapostersrequest.md b/docs/sdk/models/operations/getmediapostersrequest.md deleted file mode 100644 index 81c39b16..00000000 --- a/docs/sdk/models/operations/getmediapostersrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetMediaPostersRequest - -## Example Usage - -```typescript -import { GetMediaPostersRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaPostersRequest = { - ratingKey: 16099, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the posters of. | 16099 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediapostersresponse.md b/docs/sdk/models/operations/getmediapostersresponse.md deleted file mode 100644 index 4aaf3050..00000000 --- a/docs/sdk/models/operations/getmediapostersresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetMediaPostersResponse - -## Example Usage - -```typescript -import { GetMediaPostersResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaPostersResponse = { - contentType: "", - statusCode: 802181, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetMediaPostersResponseBody](../../../sdk/models/operations/getmediapostersresponsebody.md) | :heavy_minus_sign: | The available posters for the library item. | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediapostersresponsebody.md b/docs/sdk/models/operations/getmediapostersresponsebody.md deleted file mode 100644 index ee871f51..00000000 --- a/docs/sdk/models/operations/getmediapostersresponsebody.md +++ /dev/null @@ -1,25 +0,0 @@ -# GetMediaPostersResponseBody - -The available posters for the library item. - -## Example Usage - -```typescript -import { GetMediaPostersResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaPostersResponseBody = { - mediaContainer: { - size: 50, - mediaTagVersion: 1734362201, - mediaTagPrefix: "/system/bundle/media/flags/", - identifier: "com.plexapp.plugins.library", - metadata: [], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetMediaPostersMediaContainer](../../../sdk/models/operations/getmediapostersmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediaprovidersdirectory.md b/docs/sdk/models/operations/getmediaprovidersdirectory.md deleted file mode 100644 index 20250666..00000000 --- a/docs/sdk/models/operations/getmediaprovidersdirectory.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetMediaProvidersDirectory - -## Example Usage - -```typescript -import { GetMediaProvidersDirectory } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaProvidersDirectory = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `hubKey` | *string* | :heavy_minus_sign: | N/A | -| `title` | *string* | :heavy_minus_sign: | N/A | -| `agent` | *string* | :heavy_minus_sign: | N/A | -| `language` | *string* | :heavy_minus_sign: | N/A | -| `refreshing` | *boolean* | :heavy_minus_sign: | N/A | -| `scanner` | *string* | :heavy_minus_sign: | N/A | -| `uuid` | *string* | :heavy_minus_sign: | N/A | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `key` | *string* | :heavy_minus_sign: | N/A | -| `type` | *string* | :heavy_minus_sign: | N/A | -| `subtype` | *string* | :heavy_minus_sign: | N/A | -| `updatedAt` | *number* | :heavy_minus_sign: | N/A | -| `scannedAt` | *number* | :heavy_minus_sign: | N/A | -| `pivot` | [operations.Pivot](../../../sdk/models/operations/pivot.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediaprovidersmediacontainer.md b/docs/sdk/models/operations/getmediaprovidersmediacontainer.md deleted file mode 100644 index e68db287..00000000 --- a/docs/sdk/models/operations/getmediaprovidersmediacontainer.md +++ /dev/null @@ -1,77 +0,0 @@ -# GetMediaProvidersMediaContainer - -## Example Usage - -```typescript -import { GetMediaProvidersMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaProvidersMediaContainer = { - mediaProvider: [ - { - feature: [ - { - type: "", - flavor: "global", - scrobbleKey: "/:/scrobble/new", - unscrobbleKey: "/:/unscrobble/new", - action: [ - { - id: "addToContinueWatching", - key: "/actions/addToContinueWatching", - }, - ], - }, - ], - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | -| `allowCameraUpload` | *boolean* | :heavy_minus_sign: | N/A | -| `allowChannelAccess` | *boolean* | :heavy_minus_sign: | N/A | -| `allowSharing` | *boolean* | :heavy_minus_sign: | N/A | -| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | -| `allowTuners` | *boolean* | :heavy_minus_sign: | N/A | -| `backgroundProcessing` | *boolean* | :heavy_minus_sign: | N/A | -| `certificate` | *boolean* | :heavy_minus_sign: | N/A | -| `companionProxy` | *boolean* | :heavy_minus_sign: | N/A | -| `countryCode` | *string* | :heavy_minus_sign: | N/A | -| `diagnostics` | *string* | :heavy_minus_sign: | N/A | -| `eventStream` | *boolean* | :heavy_minus_sign: | N/A | -| `friendlyName` | *string* | :heavy_minus_sign: | N/A | -| `livetv` | *number* | :heavy_minus_sign: | N/A | -| `machineIdentifier` | *string* | :heavy_minus_sign: | N/A | -| `musicAnalysis` | *number* | :heavy_minus_sign: | N/A | -| `myPlex` | *boolean* | :heavy_minus_sign: | N/A | -| `myPlexMappingState` | *string* | :heavy_minus_sign: | N/A | -| `myPlexSigninState` | *string* | :heavy_minus_sign: | N/A | -| `myPlexSubscription` | *boolean* | :heavy_minus_sign: | N/A | -| `myPlexUsername` | *string* | :heavy_minus_sign: | N/A | -| `offlineTranscode` | *number* | :heavy_minus_sign: | N/A | -| `ownerFeatures` | *string* | :heavy_minus_sign: | N/A | -| `platform` | *string* | :heavy_minus_sign: | N/A | -| `platformVersion` | *string* | :heavy_minus_sign: | N/A | -| `pluginHost` | *boolean* | :heavy_minus_sign: | N/A | -| `pushNotifications` | *boolean* | :heavy_minus_sign: | N/A | -| `readOnlyLibraries` | *boolean* | :heavy_minus_sign: | N/A | -| `streamingBrainABRVersion` | *number* | :heavy_minus_sign: | N/A | -| `streamingBrainVersion` | *number* | :heavy_minus_sign: | N/A | -| `sync` | *boolean* | :heavy_minus_sign: | N/A | -| `transcoderActiveVideoSessions` | *number* | :heavy_minus_sign: | N/A | -| `transcoderAudio` | *boolean* | :heavy_minus_sign: | N/A | -| `transcoderLyrics` | *boolean* | :heavy_minus_sign: | N/A | -| `transcoderSubtitles` | *boolean* | :heavy_minus_sign: | N/A | -| `transcoderVideo` | *boolean* | :heavy_minus_sign: | N/A | -| `transcoderVideoBitrates` | *string* | :heavy_minus_sign: | N/A | -| `transcoderVideoQualities` | *string* | :heavy_minus_sign: | N/A | -| `transcoderVideoResolutions` | *string* | :heavy_minus_sign: | N/A | -| `updatedAt` | *number* | :heavy_minus_sign: | N/A | -| `updater` | *boolean* | :heavy_minus_sign: | N/A | -| `version` | *string* | :heavy_minus_sign: | N/A | -| `voiceSearch` | *boolean* | :heavy_minus_sign: | N/A | -| `mediaProvider` | [operations.MediaProvider](../../../sdk/models/operations/mediaprovider.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediaprovidersrequest.md b/docs/sdk/models/operations/getmediaprovidersrequest.md deleted file mode 100644 index 699781ca..00000000 --- a/docs/sdk/models/operations/getmediaprovidersrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetMediaProvidersRequest - -## Example Usage - -```typescript -import { GetMediaProvidersRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaProvidersRequest = { - xPlexToken: "CV5xoxjTpFKUzBTShsaf", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `xPlexToken` | *string* | :heavy_check_mark: | An authentication token, obtained from plex.tv | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediaprovidersresponse.md b/docs/sdk/models/operations/getmediaprovidersresponse.md deleted file mode 100644 index e16881c6..00000000 --- a/docs/sdk/models/operations/getmediaprovidersresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetMediaProvidersResponse - -## Example Usage - -```typescript -import { GetMediaProvidersResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaProvidersResponse = { - contentType: "", - statusCode: 674530, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetMediaProvidersResponseBody](../../../sdk/models/operations/getmediaprovidersresponsebody.md) | :heavy_minus_sign: | Media providers and their features | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmediaprovidersresponsebody.md b/docs/sdk/models/operations/getmediaprovidersresponsebody.md deleted file mode 100644 index dc7f44ea..00000000 --- a/docs/sdk/models/operations/getmediaprovidersresponsebody.md +++ /dev/null @@ -1,38 +0,0 @@ -# GetMediaProvidersResponseBody - -Media providers and their features - -## Example Usage - -```typescript -import { GetMediaProvidersResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMediaProvidersResponseBody = { - mediaContainer: { - mediaProvider: [ - { - feature: [ - { - type: "", - flavor: "global", - scrobbleKey: "/:/scrobble/new", - unscrobbleKey: "/:/unscrobble/new", - action: [ - { - id: "addToContinueWatching", - key: "/actions/addToContinueWatching", - }, - ], - }, - ], - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetMediaProvidersMediaContainer](../../../sdk/models/operations/getmediaprovidersmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmetadatachildrendirectory.md b/docs/sdk/models/operations/getmetadatachildrendirectory.md deleted file mode 100644 index 0d218a02..00000000 --- a/docs/sdk/models/operations/getmetadatachildrendirectory.md +++ /dev/null @@ -1,25 +0,0 @@ -# GetMetadataChildrenDirectory - -## Example Usage - -```typescript -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", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `leafCount` | *number* | :heavy_minus_sign: | N/A | 16 | -| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/30072/thumb/1705739923 | -| `viewedLeafCount` | *number* | :heavy_minus_sign: | N/A | 16 | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/30072/allLeaves | -| `title` | *string* | :heavy_minus_sign: | N/A | All episodes | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmetadatachildrenmediacontainer.md b/docs/sdk/models/operations/getmetadatachildrenmediacontainer.md deleted file mode 100644 index 41dcf566..00000000 --- a/docs/sdk/models/operations/getmetadatachildrenmediacontainer.md +++ /dev/null @@ -1,101 +0,0 @@ -# GetMetadataChildrenMediaContainer - -## Example Usage - -```typescript -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, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 3 | -| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | true | -| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/30072/art/1705739923 | -| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `key` | *string* | :heavy_minus_sign: | N/A | 30072 | -| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 2 | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | TV Shows | -| `librarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 4bb2521c-8ba9-459b-aaee-8ab8bc35eabd | -| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `mediaTagVersion` | *number* | :heavy_minus_sign: | N/A | 1701731894 | -| `nocache` | *boolean* | :heavy_minus_sign: | N/A | true | -| `parentIndex` | *number* | :heavy_minus_sign: | N/A | 1 | -| `parentTitle` | *string* | :heavy_minus_sign: | N/A | Reacher | -| `parentYear` | *number* | :heavy_minus_sign: | N/A | 2022 | -| `summary` | *string* | :heavy_minus_sign: | N/A | 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` | *string* | :heavy_minus_sign: | N/A | /library/metadata/30072/theme/1705739923 | -| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/30072/thumb/1705739923 | -| `title1` | *string* | :heavy_minus_sign: | N/A | TV Shows | -| `title2` | *string* | :heavy_minus_sign: | N/A | Reacher | -| `viewGroup` | *string* | :heavy_minus_sign: | N/A | season | -| `viewMode` | *number* | :heavy_minus_sign: | N/A | 65593 | -| `directory` | [operations.GetMetadataChildrenDirectory](../../../sdk/models/operations/getmetadatachildrendirectory.md)[] | :heavy_minus_sign: | N/A | [
{
"leafCount": 16,
"thumb": "/library/metadata/30072/thumb/1705739923",
"viewedLeafCount": 16,
"key": "/library/metadata/30072/allLeaves",
"title": "All episodes"
}
] | -| `metadata` | [operations.GetMetadataChildrenMetadata](../../../sdk/models/operations/getmetadatachildrenmetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmetadatachildrenmetadata.md b/docs/sdk/models/operations/getmetadatachildrenmetadata.md deleted file mode 100644 index 8579d76a..00000000 --- a/docs/sdk/models/operations/getmetadatachildrenmetadata.md +++ /dev/null @@ -1,70 +0,0 @@ -# GetMetadataChildrenMetadata - -## Example Usage - -```typescript -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, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 66488 | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66488/children | -| `parentRatingKey` | *string* | :heavy_minus_sign: | N/A | 30072 | -| `guid` | *string* | :heavy_minus_sign: | N/A | plex://season/652aea6549508477c34c6000 | -| `parentGuid` | *string* | :heavy_minus_sign: | N/A | plex://show/5d9c09190aaccd001f8f42f0 | -| `parentStudio` | *string* | :heavy_minus_sign: | N/A | Amazon Studios | -| `type` | *string* | :heavy_minus_sign: | N/A | season | -| `title` | *string* | :heavy_minus_sign: | N/A | Season 2 | -| `parentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/30072 | -| `parentTitle` | *string* | :heavy_minus_sign: | N/A | Reacher | -| `summary` | *string* | :heavy_minus_sign: | N/A | 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` | *number* | :heavy_minus_sign: | N/A | 2 | -| `parentIndex` | *number* | :heavy_minus_sign: | N/A | 1 | -| `viewCount` | *number* | :heavy_minus_sign: | N/A | 11 | -| `lastViewedAt` | *number* | :heavy_minus_sign: | N/A | 1705646565 | -| `parentYear` | *number* | :heavy_minus_sign: | N/A | 2022 | -| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66488/thumb/1703065033 | -| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/30072/art/1705739923 | -| `parentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/30072/thumb/1705739923 | -| `parentTheme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/30072/theme/1705739923 | -| `leafCount` | *number* | :heavy_minus_sign: | N/A | 8 | -| `viewedLeafCount` | *number* | :heavy_minus_sign: | N/A | 8 | -| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1702602021 | -| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1703065033 | -| `userRating` | *number* | :heavy_minus_sign: | N/A | 9 | -| `skipCount` | *number* | :heavy_minus_sign: | N/A | 1 | -| `lastRatedAt` | *number* | :heavy_minus_sign: | N/A | 1703881224 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmetadatachildrenrequest.md b/docs/sdk/models/operations/getmetadatachildrenrequest.md deleted file mode 100644 index 72e794bf..00000000 --- a/docs/sdk/models/operations/getmetadatachildrenrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetMetadataChildrenRequest - -## Example Usage - -```typescript -import { GetMetadataChildrenRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMetadataChildrenRequest = { - ratingKey: 786.26, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the children of. | -| `includeElements` | *string* | :heavy_minus_sign: | Adds additional elements to the response. Supported types are (Stream)
| \ No newline at end of file diff --git a/docs/sdk/models/operations/getmetadatachildrenresponse.md b/docs/sdk/models/operations/getmetadatachildrenresponse.md deleted file mode 100644 index 9e3480a1..00000000 --- a/docs/sdk/models/operations/getmetadatachildrenresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetMetadataChildrenResponse - -## Example Usage - -```typescript -import { GetMetadataChildrenResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMetadataChildrenResponse = { - contentType: "", - statusCode: 590251, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetMetadataChildrenResponseBody](../../../sdk/models/operations/getmetadatachildrenresponsebody.md) | :heavy_minus_sign: | The children of the library item. | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmetadatachildrenresponsebody.md b/docs/sdk/models/operations/getmetadatachildrenresponsebody.md deleted file mode 100644 index 1c87aa68..00000000 --- a/docs/sdk/models/operations/getmetadatachildrenresponsebody.md +++ /dev/null @@ -1,83 +0,0 @@ -# GetMetadataChildrenResponseBody - -The children of the library item. - -## Example Usage - -```typescript -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", - 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, - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetMetadataChildrenMediaContainer](../../../sdk/models/operations/getmetadatachildrenmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmetadatahubsglobals.md b/docs/sdk/models/operations/getmetadatahubsglobals.md new file mode 100644 index 00000000..1ccec5e8 --- /dev/null +++ b/docs/sdk/models/operations/getmetadatahubsglobals.md @@ -0,0 +1,35 @@ +# GetMetadataHubsGlobals + +## Example Usage + +```typescript +import { GetMetadataHubsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetMetadataHubsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmetadatahubsrequest.md b/docs/sdk/models/operations/getmetadatahubsrequest.md new file mode 100644 index 00000000..6e58bfd5 --- /dev/null +++ b/docs/sdk/models/operations/getmetadatahubsrequest.md @@ -0,0 +1,31 @@ +# GetMetadataHubsRequest + +## Example Usage + +```typescript +import { GetMetadataHubsRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: GetMetadataHubsRequest = { + metadataId: 795565, + onlyTransient: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `metadataId` | *number* | :heavy_check_mark: | The metadata ID for the hubs to fetch | | +| `count` | *number* | :heavy_minus_sign: | Limit results to count items | | +| `onlyTransient` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | 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) | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmetadatahubsresponse.md b/docs/sdk/models/operations/getmetadatahubsresponse.md new file mode 100644 index 00000000..10d3756f --- /dev/null +++ b/docs/sdk/models/operations/getmetadatahubsresponse.md @@ -0,0 +1,35 @@ +# GetMetadataHubsResponse + +## Example Usage + +```typescript +import { GetMetadataHubsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetMetadataHubsResponse = { + contentType: "", + statusCode: 267473, + headers: { + "key": [ + "", + "", + "", + ], + "key1": [ + "", + ], + "key2": [ + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithHubs` | [shared.MediaContainerWithHubs](../../../sdk/models/shared/mediacontainerwithhubs.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmetadataitemglobals.md b/docs/sdk/models/operations/getmetadataitemglobals.md new file mode 100644 index 00000000..269a9a38 --- /dev/null +++ b/docs/sdk/models/operations/getmetadataitemglobals.md @@ -0,0 +1,35 @@ +# GetMetadataItemGlobals + +## Example Usage + +```typescript +import { GetMetadataItemGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetMetadataItemGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmetadataitemrequest.md b/docs/sdk/models/operations/getmetadataitemrequest.md new file mode 100644 index 00000000..822393dd --- /dev/null +++ b/docs/sdk/models/operations/getmetadataitemrequest.md @@ -0,0 +1,44 @@ +# GetMetadataItemRequest + +## Example Usage + +```typescript +import { GetMetadataItemRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: GetMetadataItemRequest = { + ids: [], + asyncCheckFiles: BoolInt.One, + asyncRefreshLocalMediaAgent: BoolInt.One, + asyncRefreshAnalysis: BoolInt.One, + checkFiles: BoolInt.One, + skipRefresh: BoolInt.One, + checkFileAvailability: BoolInt.One, + asyncAugmentMetadata: BoolInt.One, + augmentCount: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string*[] | :heavy_check_mark: | N/A | | +| `asyncCheckFiles` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Determines if file check should be performed asynchronously. An activity is created to indicate progress. Default is false. | 1 | +| `asyncRefreshLocalMediaAgent` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Determines if local media agent refresh should be performed asynchronously. An activity is created to indicate progress. Default is false. | 1 | +| `asyncRefreshAnalysis` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Determines if analysis refresh should be performed asynchronously. An activity is created to indicate progress. Default is false. | 1 | +| `checkFiles` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Determines if file check should be performed synchronously. Specifying `asyncCheckFiles` will cause this option to be ignored. Default is false. | 1 | +| `skipRefresh` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Determines if synchronous local media agent and analysis refresh should be skipped. Specifying async versions will cause synchronous versions to be skipped. Default is false. | 1 | +| `checkFileAvailability` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Determines if file existence check should be performed synchronously. Specifying `checkFiles` will imply this option. Default is false. | 1 | +| `asyncAugmentMetadata` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Add metadata augmentations. An activity is created to indicate progress. Option will be ignored if specified by non-admin or if multiple metadata items are requested. Default is false. | 1 | +| `augmentCount` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Number of augmentations to add. Requires `asyncAugmentMetadata` to be specified. | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmetadataitemresponse.md b/docs/sdk/models/operations/getmetadataitemresponse.md new file mode 100644 index 00000000..9428b70a --- /dev/null +++ b/docs/sdk/models/operations/getmetadataitemresponse.md @@ -0,0 +1,31 @@ +# GetMetadataItemResponse + +## Example Usage + +```typescript +import { GetMetadataItemResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetMetadataItemResponse = { + contentType: "", + statusCode: 313821, + headers: { + "key": [ + "", + ], + "key1": [ + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmyplexaccountresponse.md b/docs/sdk/models/operations/getmyplexaccountresponse.md deleted file mode 100644 index 38aac9b7..00000000 --- a/docs/sdk/models/operations/getmyplexaccountresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetMyPlexAccountResponse - -## Example Usage - -```typescript -import { GetMyPlexAccountResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetMyPlexAccountResponse = { - contentType: "", - statusCode: 419547, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetMyPlexAccountResponseBody](../../../sdk/models/operations/getmyplexaccountresponsebody.md) | :heavy_minus_sign: | MyPlex Account | \ No newline at end of file diff --git a/docs/sdk/models/operations/getmyplexaccountresponsebody.md b/docs/sdk/models/operations/getmyplexaccountresponsebody.md deleted file mode 100644 index 1325e200..00000000 --- a/docs/sdk/models/operations/getmyplexaccountresponsebody.md +++ /dev/null @@ -1,31 +0,0 @@ -# GetMyPlexAccountResponseBody - -MyPlex Account - -## Example Usage - -```typescript -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", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `myPlex` | [operations.MyPlex](../../../sdk/models/operations/myplex.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getnotificationsglobals.md b/docs/sdk/models/operations/getnotificationsglobals.md new file mode 100644 index 00000000..a580cc5b --- /dev/null +++ b/docs/sdk/models/operations/getnotificationsglobals.md @@ -0,0 +1,35 @@ +# GetNotificationsGlobals + +## Example Usage + +```typescript +import { GetNotificationsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetNotificationsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getnotificationsrequest.md b/docs/sdk/models/operations/getnotificationsrequest.md new file mode 100644 index 00000000..6b36c4e5 --- /dev/null +++ b/docs/sdk/models/operations/getnotificationsrequest.md @@ -0,0 +1,25 @@ +# GetNotificationsRequest + +## Example Usage + +```typescript +import { GetNotificationsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetNotificationsRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `filter` | *string*[] | :heavy_minus_sign: | By default, all events except logs are sent. A rich filtering mechanism is provided to allow clients to opt into or out of each event type using the `filters` parameter. For example:

- `filters=-log`: All event types except logs (the default).
- `filters=foo,bar`: Only the foo and bar event types.
- `filters=`: All events types.
- `filters=-foo,bar`: All event types except foo and bar.
| | \ No newline at end of file diff --git a/docs/sdk/models/operations/getnotificationsresponse.md b/docs/sdk/models/operations/getnotificationsresponse.md new file mode 100644 index 00000000..52d769e3 --- /dev/null +++ b/docs/sdk/models/operations/getnotificationsresponse.md @@ -0,0 +1,18 @@ +# GetNotificationsResponse + +## Example Usage + +```typescript +import { GetNotificationsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | +| `responseStream` | *ReadableStream* | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpartindexglobals.md b/docs/sdk/models/operations/getpartindexglobals.md new file mode 100644 index 00000000..0032eedc --- /dev/null +++ b/docs/sdk/models/operations/getpartindexglobals.md @@ -0,0 +1,35 @@ +# GetPartIndexGlobals + +## Example Usage + +```typescript +import { GetPartIndexGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPartIndexGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpartindexindex.md b/docs/sdk/models/operations/getpartindexindex.md new file mode 100644 index 00000000..518e4cd0 --- /dev/null +++ b/docs/sdk/models/operations/getpartindexindex.md @@ -0,0 +1,17 @@ +# GetPartIndexIndex + +The type of index to grab. + +## Example Usage + +```typescript +import { GetPartIndexIndex } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPartIndexIndex = GetPartIndexIndex.Sd; +``` + +## Values + +| Name | Value | +| ----- | ----- | +| `Sd` | sd | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpartindexrequest.md b/docs/sdk/models/operations/getpartindexrequest.md new file mode 100644 index 00000000..f72f3c58 --- /dev/null +++ b/docs/sdk/models/operations/getpartindexrequest.md @@ -0,0 +1,30 @@ +# GetPartIndexRequest + +## Example Usage + +```typescript +import { GetPartIndexIndex, GetPartIndexRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPartIndexRequest = { + partId: 703932, + index: GetPartIndexIndex.Sd, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `partId` | *number* | :heavy_check_mark: | The part id who's index is to be fetched | | +| `index` | [operations.GetPartIndexIndex](../../../sdk/models/operations/getpartindexindex.md) | :heavy_check_mark: | The type of index to grab. | | +| `interval` | *number* | :heavy_minus_sign: | The interval between images to return in ms. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpartindexresponse.md b/docs/sdk/models/operations/getpartindexresponse.md new file mode 100644 index 00000000..9bd7cf01 --- /dev/null +++ b/docs/sdk/models/operations/getpartindexresponse.md @@ -0,0 +1,18 @@ +# GetPartIndexResponse + +## Example Usage + +```typescript +import { GetPartIndexResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | +| `responseStream` | *ReadableStream* | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpersonglobals.md b/docs/sdk/models/operations/getpersonglobals.md new file mode 100644 index 00000000..b19d90fa --- /dev/null +++ b/docs/sdk/models/operations/getpersonglobals.md @@ -0,0 +1,35 @@ +# GetPersonGlobals + +## Example Usage + +```typescript +import { GetPersonGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPersonGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpersonmediacontainer.md b/docs/sdk/models/operations/getpersonmediacontainer.md new file mode 100644 index 00000000..e16e93c7 --- /dev/null +++ b/docs/sdk/models/operations/getpersonmediacontainer.md @@ -0,0 +1,35 @@ +# GetPersonMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetPersonMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPersonMediaContainer = { + directory: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `directory` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpersonrequest.md b/docs/sdk/models/operations/getpersonrequest.md new file mode 100644 index 00000000..69dd7a2a --- /dev/null +++ b/docs/sdk/models/operations/getpersonrequest.md @@ -0,0 +1,27 @@ +# GetPersonRequest + +## Example Usage + +```typescript +import { GetPersonRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPersonRequest = { + personId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `personId` | *string* | :heavy_check_mark: | Either the PMS tag `id` of the person or `tagKey` of the actor. Note the `tagKey` is the hex portion of the plex guid for the actor | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpersonresponse.md b/docs/sdk/models/operations/getpersonresponse.md new file mode 100644 index 00000000..4d76a99e --- /dev/null +++ b/docs/sdk/models/operations/getpersonresponse.md @@ -0,0 +1,21 @@ +# GetPersonResponse + +## Example Usage + +```typescript +import { GetPersonResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPersonResponse = { + contentType: "", + statusCode: 631810, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetPersonResponseBody](../../../sdk/models/operations/getpersonresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpersonresponsebody.md b/docs/sdk/models/operations/getpersonresponsebody.md new file mode 100644 index 00000000..9bf15637 --- /dev/null +++ b/docs/sdk/models/operations/getpersonresponsebody.md @@ -0,0 +1,30 @@ +# GetPersonResponseBody + +OK + +## Example Usage + +```typescript +import { GetPersonResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPersonResponseBody = { + mediaContainer: { + directory: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetPersonMediaContainer](../../../sdk/models/operations/getpersonmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpinauthpincontainer.md b/docs/sdk/models/operations/getpinauthpincontainer.md deleted file mode 100644 index 1f6d51f6..00000000 --- a/docs/sdk/models/operations/getpinauthpincontainer.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetPinAuthPinContainer - -Requests a new pin id used in the authentication flow - -## Example Usage - -```typescript -import { GetPinAuthPinContainer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetPinAuthPinContainer = { - id: 308667304, - code: "7RQZ", - product: "0", - 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, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | N/A | 308667304 | -| `code` | *string* | :heavy_check_mark: | N/A | 7RQZ | -| `product` | *string* | :heavy_check_mark: | N/A | Tautulli | -| `trusted` | *boolean* | :heavy_minus_sign: | N/A | | -| `qr` | *string* | :heavy_check_mark: | N/A | https://plex.tv/api/v2/pins/qr/7RQZ | -| `clientIdentifier` | *string* | :heavy_check_mark: | The X-Client-Identifier used in the request | Tautulli | -| `location` | [operations.GeoData](../../../sdk/models/operations/geodata.md) | :heavy_check_mark: | Geo location data | {
"code": "VI",
"continent_code": "NA",
"country": "United States Virgin Islands",
"city": "Amsterdam",
"european_union_member": true,
"time_zone": "America/St_Thomas",
"postal_code": 802,
"in_privacy_restricted_country": true,
"in_privacy_restricted_region": true,
"subdivisions": "Saint Thomas",
"coordinates": "18.3381, -64.8941"
} | -| `expiresIn` | *number* | :heavy_minus_sign: | The number of seconds this pin expires, by default 900 seconds | 876 | -| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | N/A | 2024-07-16T17:03:05Z | -| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | N/A | 2024-07-16T17:18:05Z | -| `authToken` | *string* | :heavy_minus_sign: | N/A | gcgzw5rz2xovp84b4vha3a40 | -| `newRegistration` | *any* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpinrequest.md b/docs/sdk/models/operations/getpinrequest.md deleted file mode 100644 index 53c2f92f..00000000 --- a/docs/sdk/models/operations/getpinrequest.md +++ /dev/null @@ -1,26 +0,0 @@ -# GetPinRequest - -## Example Usage - -```typescript -import { GetPinRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetPinRequest = { - clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", - clientName: "Plex for Roku", - deviceNickname: "Roku 3", - clientVersion: "2.4.1", - platform: "Roku", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -| `strong` | *boolean* | :heavy_minus_sign: | Determines the kind of code returned by the API call
Strong codes are used for Pin authentication flows
Non-Strong codes are used for `Plex.tv/link`
| | -| `clientID` | *string* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | -| `clientName` | *string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku | -| `deviceNickname` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | -| `clientVersion` | *string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 | -| `platform` | *string* | :heavy_minus_sign: | The platform of the client application. | Roku | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpinresponse.md b/docs/sdk/models/operations/getpinresponse.md deleted file mode 100644 index 0344d16b..00000000 --- a/docs/sdk/models/operations/getpinresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetPinResponse - -## Example Usage - -```typescript -import { GetPinResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetPinResponse = { - contentType: "", - statusCode: 252396, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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 | | -| `authPinContainer` | [operations.GetPinAuthPinContainer](../../../sdk/models/operations/getpinauthpincontainer.md) | :heavy_minus_sign: | Requests a new pin id used in the authentication flow | {
"id": 308667304,
"code": "7RQZ",
"product": "0",
"trusted": false,
"qr": "https://plex.tv/api/v2/pins/qr/7RQZ",
"clientIdentifier": "string",
"location": {
"code": "VI",
"continent_code": "NA",
"country": "United States Virgin Islands",
"city": "Amsterdam",
"european_union_member": true,
"time_zone": "America/St_Thomas",
"postal_code": 802,
"in_privacy_restricted_country": true,
"in_privacy_restricted_region": true,
"subdivisions": "Saint Thomas",
"coordinates": "18.3381, -64.8941"
},
"expiresIn": 876,
"createdAt": "2024-07-16T17:03:05Z",
"expiresAt": "2024-07-16T17:18:05Z",
"authToken": null,
"newRegistration": null
} | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistcontentscountry.md b/docs/sdk/models/operations/getplaylistcontentscountry.md deleted file mode 100644 index 89897747..00000000 --- a/docs/sdk/models/operations/getplaylistcontentscountry.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetPlaylistContentsCountry - -## Example Usage - -```typescript -import { GetPlaylistContentsCountry } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetPlaylistContentsCountry = { - tag: "United States of America", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | -| `tag` | *string* | :heavy_minus_sign: | N/A | United States of America | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistcontentsdirector.md b/docs/sdk/models/operations/getplaylistcontentsdirector.md deleted file mode 100644 index f52c4bad..00000000 --- a/docs/sdk/models/operations/getplaylistcontentsdirector.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetPlaylistContentsDirector - -## Example Usage - -```typescript -import { GetPlaylistContentsDirector } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetPlaylistContentsDirector = { - tag: "Joss Whedon", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *string* | :heavy_minus_sign: | N/A | Joss Whedon | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistcontentsgenre.md b/docs/sdk/models/operations/getplaylistcontentsgenre.md deleted file mode 100644 index c7959ef7..00000000 --- a/docs/sdk/models/operations/getplaylistcontentsgenre.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetPlaylistContentsGenre - -## Example Usage - -```typescript -import { GetPlaylistContentsGenre } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetPlaylistContentsGenre = { - tag: "Action", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *string* | :heavy_minus_sign: | N/A | Action | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistcontentsmedia.md b/docs/sdk/models/operations/getplaylistcontentsmedia.md deleted file mode 100644 index 84f2bdad..00000000 --- a/docs/sdk/models/operations/getplaylistcontentsmedia.md +++ /dev/null @@ -1,62 +0,0 @@ -# GetPlaylistContentsMedia - -## Example Usage - -```typescript -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", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_minus_sign: | N/A | 15 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 141416 | -| `bitrate` | *number* | :heavy_minus_sign: | N/A | 2273 | -| `width` | *number* | :heavy_minus_sign: | N/A | 1920 | -| `height` | *number* | :heavy_minus_sign: | N/A | 814 | -| `aspectRatio` | *number* | :heavy_minus_sign: | N/A | 2.35 | -| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 2 | -| `audioCodec` | *string* | :heavy_minus_sign: | N/A | aac | -| `videoCodec` | *string* | :heavy_minus_sign: | N/A | h264 | -| `videoResolution` | *string* | :heavy_minus_sign: | N/A | 1080 | -| `container` | *string* | :heavy_minus_sign: | N/A | mp4 | -| `videoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p | -| `optimizedForStreaming` | *number* | :heavy_minus_sign: | N/A | 0 | -| `audioProfile` | *string* | :heavy_minus_sign: | N/A | lc | -| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | -| `videoProfile` | *string* | :heavy_minus_sign: | N/A | high | -| `part` | [operations.GetPlaylistContentsPart](../../../sdk/models/operations/getplaylistcontentspart.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistcontentsmediacontainer.md b/docs/sdk/models/operations/getplaylistcontentsmediacontainer.md deleted file mode 100644 index 533ef68c..00000000 --- a/docs/sdk/models/operations/getplaylistcontentsmediacontainer.md +++ /dev/null @@ -1,123 +0,0 @@ -# GetPlaylistContentsMediaContainer - -## Example Usage - -```typescript -import { GetPlaylistContentsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; -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: [ - { - 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", - }, - ], - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 2 | -| `composite` | *string* | :heavy_minus_sign: | N/A | /playlists/95/composite/1705717521 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 282 | -| `leafCount` | *number* | :heavy_minus_sign: | N/A | 2 | -| `playlistType` | *string* | :heavy_minus_sign: | N/A | video | -| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 95 | -| `smart` | *boolean* | :heavy_minus_sign: | N/A | true | -| `title` | *string* | :heavy_minus_sign: | N/A | Smart Movie Playlist | -| `metadata` | [operations.GetPlaylistContentsMetadata](../../../sdk/models/operations/getplaylistcontentsmetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistcontentsmetadata.md b/docs/sdk/models/operations/getplaylistcontentsmetadata.md deleted file mode 100644 index b6f1e3ac..00000000 --- a/docs/sdk/models/operations/getplaylistcontentsmetadata.md +++ /dev/null @@ -1,134 +0,0 @@ -# GetPlaylistContentsMetadata - -## Example Usage - -```typescript -import { GetPlaylistContentsMetadata } from "@lukehagar/plexjs/sdk/models/operations"; -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: [ - { - 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", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 17 | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17 | -| `guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d77683f6f4521001ea9dc53 | -| `studio` | *string* | :heavy_minus_sign: | N/A | Universal Pictures | -| `type` | *string* | :heavy_minus_sign: | N/A | movie | -| `title` | *string* | :heavy_minus_sign: | N/A | Serenity | -| `titleSort` | *string* | :heavy_minus_sign: | N/A | Amazing Spider-Man 2 | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | -| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | -| `librarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/1 | -| `contentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 | -| `summary` | *string* | :heavy_minus_sign: | N/A | 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` | *number* | :heavy_minus_sign: | N/A | 8.2 | -| `audienceRating` | *number* | :heavy_minus_sign: | N/A | 9.1 | -| `year` | *number* | :heavy_minus_sign: | N/A | 2005 | -| `tagline` | *string* | :heavy_minus_sign: | N/A | They aim to misbehave. | -| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/thumb/1705637165 | -| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/art/1705637165 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 141416 | -| `originallyAvailableAt` | [RFCDate](../../../types/rfcdate.md) | :heavy_minus_sign: | N/A | 2005-09-29 00:00:00 +0000 UTC | -| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1705637164 | -| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705637165 | -| `audienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | -| `hasPremiumExtras` | *string* | :heavy_minus_sign: | N/A | 1 | -| `hasPremiumPrimaryExtra` | *string* | :heavy_minus_sign: | N/A | 1 | -| `ratingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | -| `media` | [operations.GetPlaylistContentsMedia](../../../sdk/models/operations/getplaylistcontentsmedia.md)[] | :heavy_minus_sign: | N/A | | -| `genre` | [operations.GetPlaylistContentsGenre](../../../sdk/models/operations/getplaylistcontentsgenre.md)[] | :heavy_minus_sign: | N/A | | -| `country` | [operations.GetPlaylistContentsCountry](../../../sdk/models/operations/getplaylistcontentscountry.md)[] | :heavy_minus_sign: | N/A | | -| `director` | [operations.GetPlaylistContentsDirector](../../../sdk/models/operations/getplaylistcontentsdirector.md)[] | :heavy_minus_sign: | N/A | | -| `writer` | [operations.GetPlaylistContentsWriter](../../../sdk/models/operations/getplaylistcontentswriter.md)[] | :heavy_minus_sign: | N/A | | -| `role` | [operations.GetPlaylistContentsRole](../../../sdk/models/operations/getplaylistcontentsrole.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistcontentspart.md b/docs/sdk/models/operations/getplaylistcontentspart.md deleted file mode 100644 index ed7805c8..00000000 --- a/docs/sdk/models/operations/getplaylistcontentspart.md +++ /dev/null @@ -1,35 +0,0 @@ -# GetPlaylistContentsPart - -## Example Usage - -```typescript -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", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| `id` | *number* | :heavy_minus_sign: | N/A | 15 | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/parts/15/1705637151/file.mp4 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 141416 | -| `file` | *string* | :heavy_minus_sign: | N/A | /movies/Serenity (2005)/Serenity (2005).mp4 | -| `size` | *number* | :heavy_minus_sign: | N/A | 40271948 | -| `audioProfile` | *string* | :heavy_minus_sign: | N/A | lc | -| `container` | *string* | :heavy_minus_sign: | N/A | mp4 | -| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | -| `optimizedForStreaming` | *boolean* | :heavy_minus_sign: | N/A | false | -| `videoProfile` | *string* | :heavy_minus_sign: | N/A | high | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistcontentsqueryparamtype.md b/docs/sdk/models/operations/getplaylistcontentsqueryparamtype.md deleted file mode 100644 index 1f556d09..00000000 --- a/docs/sdk/models/operations/getplaylistcontentsqueryparamtype.md +++ /dev/null @@ -1,35 +0,0 @@ -# GetPlaylistContentsQueryParamType - -The type of media to retrieve or filter by. -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 - - -## Example Usage - -```typescript -import { GetPlaylistContentsQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetPlaylistContentsQueryParamType = - GetPlaylistContentsQueryParamType.TvShow; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Artist` | 5 | -| `Album` | 6 | -| `Track` | 7 | -| `PhotoAlbum` | 8 | -| `Photo` | 9 | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistcontentsrequest.md b/docs/sdk/models/operations/getplaylistcontentsrequest.md deleted file mode 100644 index ed54d808..00000000 --- a/docs/sdk/models/operations/getplaylistcontentsrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetPlaylistContentsRequest - -## Example Usage - -```typescript -import { GetPlaylistContentsQueryParamType, GetPlaylistContentsRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetPlaylistContentsRequest = { - playlistID: 4951.47, - type: GetPlaylistContentsQueryParamType.TvShow, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | | -| `type` | [operations.GetPlaylistContentsQueryParamType](../../../sdk/models/operations/getplaylistcontentsqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
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
| 2 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistcontentsresponse.md b/docs/sdk/models/operations/getplaylistcontentsresponse.md deleted file mode 100644 index 7be8ccda..00000000 --- a/docs/sdk/models/operations/getplaylistcontentsresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetPlaylistContentsResponse - -## Example Usage - -```typescript -import { GetPlaylistContentsResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetPlaylistContentsResponse = { - contentType: "", - statusCode: 861298, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetPlaylistContentsResponseBody](../../../sdk/models/operations/getplaylistcontentsresponsebody.md) | :heavy_minus_sign: | The playlist contents | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistcontentsresponsebody.md b/docs/sdk/models/operations/getplaylistcontentsresponsebody.md deleted file mode 100644 index 4ffaf4e4..00000000 --- a/docs/sdk/models/operations/getplaylistcontentsresponsebody.md +++ /dev/null @@ -1,119 +0,0 @@ -# GetPlaylistContentsResponseBody - -The playlist contents - -## Example Usage - -```typescript -import { GetPlaylistContentsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; -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", - 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", - }, - ], - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetPlaylistContentsMediaContainer](../../../sdk/models/operations/getplaylistcontentsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistcontentsrole.md b/docs/sdk/models/operations/getplaylistcontentsrole.md deleted file mode 100644 index fb2f6443..00000000 --- a/docs/sdk/models/operations/getplaylistcontentsrole.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetPlaylistContentsRole - -## Example Usage - -```typescript -import { GetPlaylistContentsRole } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetPlaylistContentsRole = { - tag: "Gina Torres", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *string* | :heavy_minus_sign: | N/A | Gina Torres | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistcontentswriter.md b/docs/sdk/models/operations/getplaylistcontentswriter.md deleted file mode 100644 index 6c9b660a..00000000 --- a/docs/sdk/models/operations/getplaylistcontentswriter.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetPlaylistContentsWriter - -## Example Usage - -```typescript -import { GetPlaylistContentsWriter } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetPlaylistContentsWriter = { - tag: "Joss Whedon", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *string* | :heavy_minus_sign: | N/A | Joss Whedon | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratordevice.md b/docs/sdk/models/operations/getplaylistgeneratordevice.md new file mode 100644 index 00000000..31e171e5 --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratordevice.md @@ -0,0 +1,15 @@ +# GetPlaylistGeneratorDevice + +## Example Usage + +```typescript +import { GetPlaylistGeneratorDevice } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorDevice = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `profile` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratorglobals.md b/docs/sdk/models/operations/getplaylistgeneratorglobals.md new file mode 100644 index 00000000..17e9f2d4 --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratorglobals.md @@ -0,0 +1,35 @@ +# GetPlaylistGeneratorGlobals + +## Example Usage + +```typescript +import { GetPlaylistGeneratorGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratoritem.md b/docs/sdk/models/operations/getplaylistgeneratoritem.md new file mode 100644 index 00000000..f3a17148 --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratoritem.md @@ -0,0 +1,25 @@ +# GetPlaylistGeneratorItem + +## Example Usage + +```typescript +import { GetPlaylistGeneratorItem } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorItem = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `composite` | *string* | :heavy_minus_sign: | The composite thumbnail image path | +| `device` | [operations.GetPlaylistGeneratorDevice](../../../sdk/models/operations/getplaylistgeneratordevice.md) | :heavy_minus_sign: | N/A | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `location` | [operations.GetPlaylistGeneratorLocation](../../../sdk/models/operations/getplaylistgeneratorlocation.md) | :heavy_minus_sign: | N/A | +| `mediaSettings` | [operations.MediaSettings](../../../sdk/models/operations/mediasettings.md) | :heavy_minus_sign: | N/A | +| `policy` | [operations.GetPlaylistGeneratorPolicy](../../../sdk/models/operations/getplaylistgeneratorpolicy.md) | :heavy_minus_sign: | N/A | +| `status` | [operations.GetPlaylistGeneratorStatus](../../../sdk/models/operations/getplaylistgeneratorstatus.md) | :heavy_minus_sign: | N/A | +| `target` | *string* | :heavy_minus_sign: | N/A | +| `targetTagID` | *number* | :heavy_minus_sign: | The tag of this generator's settings | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `type` | [operations.GetPlaylistGeneratorType](../../../sdk/models/operations/getplaylistgeneratortype.md) | :heavy_minus_sign: | The type of this generator | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratoritemsglobals.md b/docs/sdk/models/operations/getplaylistgeneratoritemsglobals.md new file mode 100644 index 00000000..4fe09ac9 --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratoritemsglobals.md @@ -0,0 +1,35 @@ +# GetPlaylistGeneratorItemsGlobals + +## Example Usage + +```typescript +import { GetPlaylistGeneratorItemsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorItemsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratoritemsmediacontainer.md b/docs/sdk/models/operations/getplaylistgeneratoritemsmediacontainer.md new file mode 100644 index 00000000..c005dda6 --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratoritemsmediacontainer.md @@ -0,0 +1,174 @@ +# GetPlaylistGeneratorItemsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetPlaylistGeneratorItemsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorItemsMediaContainer = { + metadata: { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `metadata` | [operations.Metadata](../../../sdk/models/operations/metadata.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratoritemsrequest.md b/docs/sdk/models/operations/getplaylistgeneratoritemsrequest.md new file mode 100644 index 00000000..cecd5018 --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratoritemsrequest.md @@ -0,0 +1,29 @@ +# GetPlaylistGeneratorItemsRequest + +## Example Usage + +```typescript +import { GetPlaylistGeneratorItemsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorItemsRequest = { + playlistId: 33913, + generatorId: 863128, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *number* | :heavy_check_mark: | The ID of the playlist | | +| `generatorId` | *number* | :heavy_check_mark: | The generator item ID to delete. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratoritemsresponse.md b/docs/sdk/models/operations/getplaylistgeneratoritemsresponse.md new file mode 100644 index 00000000..1ceda341 --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratoritemsresponse.md @@ -0,0 +1,21 @@ +# GetPlaylistGeneratorItemsResponse + +## Example Usage + +```typescript +import { GetPlaylistGeneratorItemsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorItemsResponse = { + contentType: "", + statusCode: 505757, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetPlaylistGeneratorItemsResponseBody](../../../sdk/models/operations/getplaylistgeneratoritemsresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratoritemsresponsebody.md b/docs/sdk/models/operations/getplaylistgeneratoritemsresponsebody.md new file mode 100644 index 00000000..5433d2bc --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratoritemsresponsebody.md @@ -0,0 +1,169 @@ +# GetPlaylistGeneratorItemsResponseBody + +OK + +## Example Usage + +```typescript +import { GetPlaylistGeneratorItemsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorItemsResponseBody = { + mediaContainer: { + metadata: { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetPlaylistGeneratorItemsMediaContainer](../../../sdk/models/operations/getplaylistgeneratoritemsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratorlocation.md b/docs/sdk/models/operations/getplaylistgeneratorlocation.md new file mode 100644 index 00000000..846da343 --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratorlocation.md @@ -0,0 +1,16 @@ +# GetPlaylistGeneratorLocation + +## Example Usage + +```typescript +import { GetPlaylistGeneratorLocation } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorLocation = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | +| `uri` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratormediacontainer.md b/docs/sdk/models/operations/getplaylistgeneratormediacontainer.md new file mode 100644 index 00000000..f1ec775d --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratormediacontainer.md @@ -0,0 +1,24 @@ +# GetPlaylistGeneratorMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetPlaylistGeneratorMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `item` | [operations.GetPlaylistGeneratorItem](../../../sdk/models/operations/getplaylistgeneratoritem.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratorpolicy.md b/docs/sdk/models/operations/getplaylistgeneratorpolicy.md new file mode 100644 index 00000000..9a20a1e6 --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratorpolicy.md @@ -0,0 +1,17 @@ +# GetPlaylistGeneratorPolicy + +## Example Usage + +```typescript +import { GetPlaylistGeneratorPolicy } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorPolicy = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `scope` | [operations.GetPlaylistGeneratorScope](../../../sdk/models/operations/getplaylistgeneratorscope.md) | :heavy_minus_sign: | N/A | +| `unwatched` | *boolean* | :heavy_minus_sign: | True if only unwatched items are optimized | +| `value` | *number* | :heavy_minus_sign: | If the scope is count, the number of items to optimize | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratorrequest.md b/docs/sdk/models/operations/getplaylistgeneratorrequest.md new file mode 100644 index 00000000..c11d1757 --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratorrequest.md @@ -0,0 +1,29 @@ +# GetPlaylistGeneratorRequest + +## Example Usage + +```typescript +import { GetPlaylistGeneratorRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorRequest = { + playlistId: 552001, + generatorId: 770333, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *number* | :heavy_check_mark: | The ID of the playlist | | +| `generatorId` | *number* | :heavy_check_mark: | The generator item ID to delete. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratorresponse.md b/docs/sdk/models/operations/getplaylistgeneratorresponse.md new file mode 100644 index 00000000..54908fc8 --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratorresponse.md @@ -0,0 +1,21 @@ +# GetPlaylistGeneratorResponse + +## Example Usage + +```typescript +import { GetPlaylistGeneratorResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorResponse = { + contentType: "", + statusCode: 237742, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetPlaylistGeneratorResponseBody](../../../sdk/models/operations/getplaylistgeneratorresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratorresponsebody.md b/docs/sdk/models/operations/getplaylistgeneratorresponsebody.md new file mode 100644 index 00000000..593dba16 --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratorresponsebody.md @@ -0,0 +1,17 @@ +# GetPlaylistGeneratorResponseBody + +OK + +## Example Usage + +```typescript +import { GetPlaylistGeneratorResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetPlaylistGeneratorMediaContainer](../../../sdk/models/operations/getplaylistgeneratormediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratorscope.md b/docs/sdk/models/operations/getplaylistgeneratorscope.md new file mode 100644 index 00000000..e2706ba3 --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratorscope.md @@ -0,0 +1,16 @@ +# GetPlaylistGeneratorScope + +## Example Usage + +```typescript +import { GetPlaylistGeneratorScope } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorScope = GetPlaylistGeneratorScope.Count; +``` + +## Values + +| Name | Value | +| ------- | ------- | +| `All` | all | +| `Count` | count | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratorsglobals.md b/docs/sdk/models/operations/getplaylistgeneratorsglobals.md new file mode 100644 index 00000000..a46f4083 --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratorsglobals.md @@ -0,0 +1,35 @@ +# GetPlaylistGeneratorsGlobals + +## Example Usage + +```typescript +import { GetPlaylistGeneratorsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratorsmediacontainer.md b/docs/sdk/models/operations/getplaylistgeneratorsmediacontainer.md new file mode 100644 index 00000000..4764f88f --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratorsmediacontainer.md @@ -0,0 +1,24 @@ +# GetPlaylistGeneratorsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetPlaylistGeneratorsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorsMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `playQueueGenerator` | [operations.PlayQueueGenerator](../../../sdk/models/operations/playqueuegenerator.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratorsrequest.md b/docs/sdk/models/operations/getplaylistgeneratorsrequest.md new file mode 100644 index 00000000..28ee433a --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratorsrequest.md @@ -0,0 +1,27 @@ +# GetPlaylistGeneratorsRequest + +## Example Usage + +```typescript +import { GetPlaylistGeneratorsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorsRequest = { + playlistId: 803889, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *number* | :heavy_check_mark: | The ID of the playlist | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratorsresponse.md b/docs/sdk/models/operations/getplaylistgeneratorsresponse.md new file mode 100644 index 00000000..58f4197d --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratorsresponse.md @@ -0,0 +1,21 @@ +# GetPlaylistGeneratorsResponse + +## Example Usage + +```typescript +import { GetPlaylistGeneratorsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorsResponse = { + contentType: "", + statusCode: 848206, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetPlaylistGeneratorsResponseBody](../../../sdk/models/operations/getplaylistgeneratorsresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratorsresponsebody.md b/docs/sdk/models/operations/getplaylistgeneratorsresponsebody.md new file mode 100644 index 00000000..40ee4ec4 --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratorsresponsebody.md @@ -0,0 +1,17 @@ +# GetPlaylistGeneratorsResponseBody + +OK + +## Example Usage + +```typescript +import { GetPlaylistGeneratorsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorsResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetPlaylistGeneratorsMediaContainer](../../../sdk/models/operations/getplaylistgeneratorsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratorstate.md b/docs/sdk/models/operations/getplaylistgeneratorstate.md new file mode 100644 index 00000000..b877a8cc --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratorstate.md @@ -0,0 +1,17 @@ +# GetPlaylistGeneratorState + +## Example Usage + +```typescript +import { GetPlaylistGeneratorState } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorState = GetPlaylistGeneratorState.Failed; +``` + +## Values + +| Name | Value | +| ---------- | ---------- | +| `Pending` | pending | +| `Complete` | complete | +| `Failed` | failed | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratorstatus.md b/docs/sdk/models/operations/getplaylistgeneratorstatus.md new file mode 100644 index 00000000..d0f85306 --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratorstatus.md @@ -0,0 +1,19 @@ +# GetPlaylistGeneratorStatus + +## Example Usage + +```typescript +import { GetPlaylistGeneratorStatus } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorStatus = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `itemsCompleteCount` | *number* | :heavy_minus_sign: | N/A | +| `itemsCount` | *number* | :heavy_minus_sign: | N/A | +| `itemsSuccessfulCount` | *number* | :heavy_minus_sign: | N/A | +| `state` | [operations.GetPlaylistGeneratorState](../../../sdk/models/operations/getplaylistgeneratorstate.md) | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratorstype.md b/docs/sdk/models/operations/getplaylistgeneratorstype.md new file mode 100644 index 00000000..8930655c --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratorstype.md @@ -0,0 +1,22 @@ +# GetPlaylistGeneratorsType + +The type of playlist generator. + + - -1: A smart playlist generator + - 42: A optimized version generator + + +## Example Usage + +```typescript +import { GetPlaylistGeneratorsType } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorsType = GetPlaylistGeneratorsType.FortyTwo; +``` + +## Values + +| Name | Value | +| ---------- | ---------- | +| `Minus1` | -1 | +| `FortyTwo` | 42 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratorsubtitles.md b/docs/sdk/models/operations/getplaylistgeneratorsubtitles.md new file mode 100644 index 00000000..34647db3 --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratorsubtitles.md @@ -0,0 +1,20 @@ +# GetPlaylistGeneratorSubtitles + +## Example Usage + +```typescript +import { GetPlaylistGeneratorSubtitles } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorSubtitles = GetPlaylistGeneratorSubtitles.Auto; +``` + +## Values + +| Name | Value | +| ----------- | ----------- | +| `Auto` | auto | +| `Burn` | burn | +| `None` | none | +| `Sidecar` | sidecar | +| `Embedded` | embedded | +| `Segmented` | segmented | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistgeneratortype.md b/docs/sdk/models/operations/getplaylistgeneratortype.md new file mode 100644 index 00000000..57cce622 --- /dev/null +++ b/docs/sdk/models/operations/getplaylistgeneratortype.md @@ -0,0 +1,18 @@ +# GetPlaylistGeneratorType + +The type of this generator + +## Example Usage + +```typescript +import { GetPlaylistGeneratorType } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGeneratorType = GetPlaylistGeneratorType.Minus1; +``` + +## Values + +| Name | Value | +| ---------- | ---------- | +| `Minus1` | -1 | +| `FortyTwo` | 42 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistglobals.md b/docs/sdk/models/operations/getplaylistglobals.md new file mode 100644 index 00000000..875ea03d --- /dev/null +++ b/docs/sdk/models/operations/getplaylistglobals.md @@ -0,0 +1,35 @@ +# GetPlaylistGlobals + +## Example Usage + +```typescript +import { GetPlaylistGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistitemsglobals.md b/docs/sdk/models/operations/getplaylistitemsglobals.md new file mode 100644 index 00000000..c019ecd6 --- /dev/null +++ b/docs/sdk/models/operations/getplaylistitemsglobals.md @@ -0,0 +1,35 @@ +# GetPlaylistItemsGlobals + +## Example Usage + +```typescript +import { GetPlaylistItemsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistItemsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistitemsrequest.md b/docs/sdk/models/operations/getplaylistitemsrequest.md new file mode 100644 index 00000000..ce57a842 --- /dev/null +++ b/docs/sdk/models/operations/getplaylistitemsrequest.md @@ -0,0 +1,28 @@ +# GetPlaylistItemsRequest + +## Example Usage + +```typescript +import { GetPlaylistItemsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistItemsRequest = { + playlistId: 73922, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *number* | :heavy_check_mark: | The ID of the playlist | | +| `type` | *number*[] | :heavy_minus_sign: | The metadata types of the item to return. Values past the first are only used in fetching items from the background processing playlist. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistitemsresponse.md b/docs/sdk/models/operations/getplaylistitemsresponse.md new file mode 100644 index 00000000..a6b6bf17 --- /dev/null +++ b/docs/sdk/models/operations/getplaylistitemsresponse.md @@ -0,0 +1,23 @@ +# GetPlaylistItemsResponse + +## Example Usage + +```typescript +import { GetPlaylistItemsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlaylistItemsResponse = { + contentType: "", + statusCode: 145201, + headers: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistmediacontainer.md b/docs/sdk/models/operations/getplaylistmediacontainer.md deleted file mode 100644 index 21fd79b4..00000000 --- a/docs/sdk/models/operations/getplaylistmediacontainer.md +++ /dev/null @@ -1,38 +0,0 @@ -# GetPlaylistMediaContainer - -## Example Usage - -```typescript -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, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 1 | -| `metadata` | [operations.GetPlaylistMetadata](../../../sdk/models/operations/getplaylistmetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistmetadata.md b/docs/sdk/models/operations/getplaylistmetadata.md deleted file mode 100644 index 903ed9a4..00000000 --- a/docs/sdk/models/operations/getplaylistmetadata.md +++ /dev/null @@ -1,46 +0,0 @@ -# GetPlaylistMetadata - -## Example Usage - -```typescript -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, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `content` | *string* | :heavy_minus_sign: | N/A | library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1 | -| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 95 | -| `key` | *string* | :heavy_minus_sign: | N/A | /playlists/95/items | -| `guid` | *string* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91 | -| `type` | *string* | :heavy_minus_sign: | N/A | playlist | -| `title` | *string* | :heavy_minus_sign: | N/A | Smart Movie Playlist | -| `summary` | *string* | :heavy_minus_sign: | N/A | | -| `smart` | *boolean* | :heavy_minus_sign: | N/A | true | -| `playlistType` | *string* | :heavy_minus_sign: | N/A | video | -| `composite` | *string* | :heavy_minus_sign: | N/A | /playlists/95/composite/1705717387 | -| `icon` | *string* | :heavy_minus_sign: | N/A | playlist://image.smart | -| `duration` | *number* | :heavy_minus_sign: | N/A | 282000 | -| `leafCount` | *number* | :heavy_minus_sign: | N/A | 2 | -| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1705716493 | -| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705717387 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistrequest.md b/docs/sdk/models/operations/getplaylistrequest.md index 48daa860..2f0e468f 100644 --- a/docs/sdk/models/operations/getplaylistrequest.md +++ b/docs/sdk/models/operations/getplaylistrequest.md @@ -6,12 +6,22 @@ import { GetPlaylistRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetPlaylistRequest = { - playlistID: 7763.65, + playlistId: 776365, }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *number* | :heavy_check_mark: | The ID of the playlist | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistresponse.md b/docs/sdk/models/operations/getplaylistresponse.md index 12918551..24ca8a0f 100644 --- a/docs/sdk/models/operations/getplaylistresponse.md +++ b/docs/sdk/models/operations/getplaylistresponse.md @@ -13,9 +13,9 @@ let value: GetPlaylistResponse = { ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetPlaylistResponseBody](../../../sdk/models/operations/getplaylistresponsebody.md) | :heavy_minus_sign: | The playlist | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithPlaylistMetadata` | [shared.MediaContainerWithPlaylistMetadata](../../../sdk/models/shared/mediacontainerwithplaylistmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistresponsebody.md b/docs/sdk/models/operations/getplaylistresponsebody.md deleted file mode 100644 index 14c74a16..00000000 --- a/docs/sdk/models/operations/getplaylistresponsebody.md +++ /dev/null @@ -1,41 +0,0 @@ -# GetPlaylistResponseBody - -The playlist - -## Example Usage - -```typescript -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, - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetPlaylistMediaContainer](../../../sdk/models/operations/getplaylistmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistsmediacontainer.md b/docs/sdk/models/operations/getplaylistsmediacontainer.md deleted file mode 100644 index dfa14a1e..00000000 --- a/docs/sdk/models/operations/getplaylistsmediacontainer.md +++ /dev/null @@ -1,38 +0,0 @@ -# GetPlaylistsMediaContainer - -## Example Usage - -```typescript -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, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 4 | -| `metadata` | [operations.GetPlaylistsMetadata](../../../sdk/models/operations/getplaylistsmetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistsmetadata.md b/docs/sdk/models/operations/getplaylistsmetadata.md deleted file mode 100644 index 226c8bb0..00000000 --- a/docs/sdk/models/operations/getplaylistsmetadata.md +++ /dev/null @@ -1,47 +0,0 @@ -# GetPlaylistsMetadata - -## Example Usage - -```typescript -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, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 92 | -| `key` | *string* | :heavy_minus_sign: | N/A | /playlists/92/items | -| `guid` | *string* | :heavy_minus_sign: | N/A | com.plexapp.agents.none://7ca5aaef-58e8-4828-9e21-c009c97f2903 | -| `type` | *string* | :heavy_minus_sign: | N/A | playlist | -| `title` | *string* | :heavy_minus_sign: | N/A | Static Playlist | -| `summary` | *string* | :heavy_minus_sign: | N/A | A Great Playlist | -| `smart` | *boolean* | :heavy_minus_sign: | N/A | false | -| `playlistType` | *string* | :heavy_minus_sign: | N/A | video | -| `composite` | *string* | :heavy_minus_sign: | N/A | /playlists/92/composite/1705716440 | -| `icon` | *string* | :heavy_minus_sign: | N/A | playlist://image.smart | -| `viewCount` | *number* | :heavy_minus_sign: | N/A | 1 | -| `lastViewedAt` | *number* | :heavy_minus_sign: | N/A | 1705716298 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 7328000 | -| `leafCount` | *number* | :heavy_minus_sign: | N/A | 32 | -| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1705716298 | -| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705716440 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistsrequest.md b/docs/sdk/models/operations/getplaylistsrequest.md deleted file mode 100644 index 450a6329..00000000 --- a/docs/sdk/models/operations/getplaylistsrequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# GetPlaylistsRequest - -## Example Usage - -```typescript -import { GetPlaylistsRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetPlaylistsRequest = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `playlistType` | [operations.PlaylistType](../../../sdk/models/operations/playlisttype.md) | :heavy_minus_sign: | limit to a type of playlist. | -| `smart` | [operations.QueryParamSmart](../../../sdk/models/operations/queryparamsmart.md) | :heavy_minus_sign: | type of playlists to return (default is all). | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistsresponse.md b/docs/sdk/models/operations/getplaylistsresponse.md deleted file mode 100644 index 6d26ab66..00000000 --- a/docs/sdk/models/operations/getplaylistsresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetPlaylistsResponse - -## Example Usage - -```typescript -import { GetPlaylistsResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetPlaylistsResponse = { - contentType: "", - statusCode: 738976, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetPlaylistsResponseBody](../../../sdk/models/operations/getplaylistsresponsebody.md) | :heavy_minus_sign: | returns all playlists | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplaylistsresponsebody.md b/docs/sdk/models/operations/getplaylistsresponsebody.md deleted file mode 100644 index 6f054fde..00000000 --- a/docs/sdk/models/operations/getplaylistsresponsebody.md +++ /dev/null @@ -1,41 +0,0 @@ -# GetPlaylistsResponseBody - -returns all playlists - -## Example Usage - -```typescript -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, - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetPlaylistsMediaContainer](../../../sdk/models/operations/getplaylistsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplayqueueglobals.md b/docs/sdk/models/operations/getplayqueueglobals.md new file mode 100644 index 00000000..210cb3b4 --- /dev/null +++ b/docs/sdk/models/operations/getplayqueueglobals.md @@ -0,0 +1,35 @@ +# GetPlayQueueGlobals + +## Example Usage + +```typescript +import { GetPlayQueueGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlayQueueGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplayqueuerequest.md b/docs/sdk/models/operations/getplayqueuerequest.md new file mode 100644 index 00000000..e01550a8 --- /dev/null +++ b/docs/sdk/models/operations/getplayqueuerequest.md @@ -0,0 +1,36 @@ +# GetPlayQueueRequest + +## Example Usage + +```typescript +import { GetPlayQueueRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: GetPlayQueueRequest = { + playQueueId: 868034, + own: BoolInt.One, + includeBefore: BoolInt.One, + includeAfter: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playQueueId` | *number* | :heavy_check_mark: | The ID of the play queue. | | +| `own` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | If the server should transfer ownership to the requesting client (used in remote control scenarios). | 1 | +| `center` | *string* | :heavy_minus_sign: | The play queue item ID for the center of the window - this doesn't change the current selected item. | | +| `window` | *number* | :heavy_minus_sign: | How many items on each side of the center of the window | | +| `includeBefore` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Whether to include the items before the center (if 0, center is not included either), defaults to 1. | 1 | +| `includeAfter` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Whether to include the items after the center (if 0, center is not included either), defaults to 1. | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getplayqueueresponse.md b/docs/sdk/models/operations/getplayqueueresponse.md new file mode 100644 index 00000000..5dcbe0fe --- /dev/null +++ b/docs/sdk/models/operations/getplayqueueresponse.md @@ -0,0 +1,21 @@ +# GetPlayQueueResponse + +## Example Usage + +```typescript +import { GetPlayQueueResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPlayQueueResponse = { + contentType: "", + statusCode: 932431, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithPlaylistMetadata` | [shared.MediaContainerWithPlaylistMetadata](../../../sdk/models/shared/mediacontainerwithplaylistmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpostplayhubsglobals.md b/docs/sdk/models/operations/getpostplayhubsglobals.md new file mode 100644 index 00000000..8c6137c8 --- /dev/null +++ b/docs/sdk/models/operations/getpostplayhubsglobals.md @@ -0,0 +1,35 @@ +# GetPostplayHubsGlobals + +## Example Usage + +```typescript +import { GetPostplayHubsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPostplayHubsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpostplayhubsrequest.md b/docs/sdk/models/operations/getpostplayhubsrequest.md new file mode 100644 index 00000000..3c983105 --- /dev/null +++ b/docs/sdk/models/operations/getpostplayhubsrequest.md @@ -0,0 +1,31 @@ +# GetPostplayHubsRequest + +## Example Usage + +```typescript +import { GetPostplayHubsRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: GetPostplayHubsRequest = { + metadataId: 202749, + onlyTransient: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `metadataId` | *number* | :heavy_check_mark: | The metadata ID for the hubs to fetch | | +| `count` | *number* | :heavy_minus_sign: | Limit results to count items | | +| `onlyTransient` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | 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) | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpostplayhubsresponse.md b/docs/sdk/models/operations/getpostplayhubsresponse.md new file mode 100644 index 00000000..f30049fe --- /dev/null +++ b/docs/sdk/models/operations/getpostplayhubsresponse.md @@ -0,0 +1,36 @@ +# GetPostplayHubsResponse + +## Example Usage + +```typescript +import { GetPostplayHubsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPostplayHubsResponse = { + contentType: "", + statusCode: 966813, + headers: { + "key": [ + "", + "", + ], + "key1": [ + "", + "", + "", + ], + "key2": [ + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithHubs` | [shared.MediaContainerWithHubs](../../../sdk/models/shared/mediacontainerwithhubs.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpreferenceglobals.md b/docs/sdk/models/operations/getpreferenceglobals.md new file mode 100644 index 00000000..76baa731 --- /dev/null +++ b/docs/sdk/models/operations/getpreferenceglobals.md @@ -0,0 +1,35 @@ +# GetPreferenceGlobals + +## Example Usage + +```typescript +import { GetPreferenceGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPreferenceGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpreferencerequest.md b/docs/sdk/models/operations/getpreferencerequest.md new file mode 100644 index 00000000..48ed3ed5 --- /dev/null +++ b/docs/sdk/models/operations/getpreferencerequest.md @@ -0,0 +1,25 @@ +# GetPreferenceRequest + +## Example Usage + +```typescript +import { GetPreferenceRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPreferenceRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `id` | *string* | :heavy_minus_sign: | The preference to fetch | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpreferenceresponse.md b/docs/sdk/models/operations/getpreferenceresponse.md new file mode 100644 index 00000000..8169fb16 --- /dev/null +++ b/docs/sdk/models/operations/getpreferenceresponse.md @@ -0,0 +1,21 @@ +# GetPreferenceResponse + +## Example Usage + +```typescript +import { GetPreferenceResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPreferenceResponse = { + contentType: "", + statusCode: 854360, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithSettings` | [shared.MediaContainerWithSettings](../../../sdk/models/shared/mediacontainerwithsettings.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpromotedhubsglobals.md b/docs/sdk/models/operations/getpromotedhubsglobals.md new file mode 100644 index 00000000..218d9ff8 --- /dev/null +++ b/docs/sdk/models/operations/getpromotedhubsglobals.md @@ -0,0 +1,35 @@ +# GetPromotedHubsGlobals + +## Example Usage + +```typescript +import { GetPromotedHubsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPromotedHubsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpromotedhubsmediacontainer.md b/docs/sdk/models/operations/getpromotedhubsmediacontainer.md new file mode 100644 index 00000000..d272b89b --- /dev/null +++ b/docs/sdk/models/operations/getpromotedhubsmediacontainer.md @@ -0,0 +1,187 @@ +# GetPromotedHubsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetPromotedHubsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPromotedHubsMediaContainer = { + hub: [ + { + type: "track", + context: "hub.home.onDeck", + hubIdentifier: "home.onDeck", + key: "/hubs/sections/home/onDeck", + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + size: 1, + subtype: "podcast", + totalSize: 8, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `hub` | [shared.Hub](../../../sdk/models/shared/hub.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpromotedhubsrequest.md b/docs/sdk/models/operations/getpromotedhubsrequest.md new file mode 100644 index 00000000..97ba7f1a --- /dev/null +++ b/docs/sdk/models/operations/getpromotedhubsrequest.md @@ -0,0 +1,25 @@ +# GetPromotedHubsRequest + +## Example Usage + +```typescript +import { GetPromotedHubsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPromotedHubsRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `count` | *number* | :heavy_minus_sign: | Limit results to count items | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpromotedhubsresponse.md b/docs/sdk/models/operations/getpromotedhubsresponse.md new file mode 100644 index 00000000..c17f843f --- /dev/null +++ b/docs/sdk/models/operations/getpromotedhubsresponse.md @@ -0,0 +1,32 @@ +# GetPromotedHubsResponse + +## Example Usage + +```typescript +import { GetPromotedHubsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPromotedHubsResponse = { + contentType: "", + statusCode: 477758, + headers: { + "key": [ + "", + ], + "key1": [ + "", + "", + ], + "key2": [], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetPromotedHubsResponseBody](../../../sdk/models/operations/getpromotedhubsresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getpromotedhubsresponsebody.md b/docs/sdk/models/operations/getpromotedhubsresponsebody.md new file mode 100644 index 00000000..6f87dddc --- /dev/null +++ b/docs/sdk/models/operations/getpromotedhubsresponsebody.md @@ -0,0 +1,183 @@ +# GetPromotedHubsResponseBody + +OK + +## Example Usage + +```typescript +import { GetPromotedHubsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetPromotedHubsResponseBody = { + mediaContainer: { + hub: [ + { + type: "track", + context: "hub.home.onDeck", + hubIdentifier: "home.onDeck", + key: "/hubs/sections/home/onDeck", + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: + "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + size: 1, + subtype: "podcast", + totalSize: 8, + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetPromotedHubsMediaContainer](../../../sdk/models/operations/getpromotedhubsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrandomartworkglobals.md b/docs/sdk/models/operations/getrandomartworkglobals.md new file mode 100644 index 00000000..ca62d686 --- /dev/null +++ b/docs/sdk/models/operations/getrandomartworkglobals.md @@ -0,0 +1,35 @@ +# GetRandomArtworkGlobals + +## Example Usage + +```typescript +import { GetRandomArtworkGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetRandomArtworkGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrandomartworkrequest.md b/docs/sdk/models/operations/getrandomartworkrequest.md new file mode 100644 index 00000000..a162341c --- /dev/null +++ b/docs/sdk/models/operations/getrandomartworkrequest.md @@ -0,0 +1,30 @@ +# GetRandomArtworkRequest + +## Example Usage + +```typescript +import { GetRandomArtworkRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetRandomArtworkRequest = { + sections: [ + 5, + 6, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sections` | *number*[] | :heavy_minus_sign: | The sections for which to fetch artwork. | [
5,
6
] | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrandomartworkresponse.md b/docs/sdk/models/operations/getrandomartworkresponse.md new file mode 100644 index 00000000..dacf1dce --- /dev/null +++ b/docs/sdk/models/operations/getrandomartworkresponse.md @@ -0,0 +1,21 @@ +# GetRandomArtworkResponse + +## Example Usage + +```typescript +import { GetRandomArtworkResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetRandomArtworkResponse = { + contentType: "", + statusCode: 185930, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithArtwork` | [shared.MediaContainerWithArtwork](../../../sdk/models/shared/mediacontainerwithartwork.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedactivedirection.md b/docs/sdk/models/operations/getrecentlyaddedactivedirection.md deleted file mode 100644 index 4f83ffc8..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedactivedirection.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetRecentlyAddedActiveDirection - -The direction of the sort. Can be either `asc` or `desc`. - - -## Example Usage - -```typescript -import { GetRecentlyAddedActiveDirection } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedActiveDirection = - GetRecentlyAddedActiveDirection.Ascending; -``` - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Ascending` | asc | -| `Descending` | desc | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddeddefaultdirection.md b/docs/sdk/models/operations/getrecentlyaddeddefaultdirection.md deleted file mode 100644 index 69809393..00000000 --- a/docs/sdk/models/operations/getrecentlyaddeddefaultdirection.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetRecentlyAddedDefaultDirection - -The direction of the sort. Can be either `asc` or `desc`. - - -## Example Usage - -```typescript -import { GetRecentlyAddedDefaultDirection } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedDefaultDirection = - GetRecentlyAddedDefaultDirection.Ascending; -``` - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Ascending` | asc | -| `Descending` | desc | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedfield.md b/docs/sdk/models/operations/getrecentlyaddedfield.md deleted file mode 100644 index a115a4b6..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedfield.md +++ /dev/null @@ -1,23 +0,0 @@ -# GetRecentlyAddedField - -## Example Usage - -```typescript -import { GetRecentlyAddedField } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedField = { - key: "show.title", - title: "Show Title", - type: "string", - subType: "rating", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `key` | *string* | :heavy_check_mark: | N/A | show.title | -| `title` | *string* | :heavy_check_mark: | N/A | Show Title | -| `type` | *string* | :heavy_check_mark: | N/A | string | -| `subType` | *string* | :heavy_minus_sign: | N/A | rating | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedfieldtype.md b/docs/sdk/models/operations/getrecentlyaddedfieldtype.md deleted file mode 100644 index c98dcee6..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedfieldtype.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetRecentlyAddedFieldType - -## Example Usage - -```typescript -import { GetRecentlyAddedFieldType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedFieldType = { - type: "tag", - operator: [ - { - key: "=", - title: "is", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `type` | *string* | :heavy_check_mark: | N/A | tag | -| `operator` | [operations.GetRecentlyAddedOperator](../../../sdk/models/operations/getrecentlyaddedoperator.md)[] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedfilter.md b/docs/sdk/models/operations/getrecentlyaddedfilter.md deleted file mode 100644 index e73d768d..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedfilter.md +++ /dev/null @@ -1,27 +0,0 @@ -# GetRecentlyAddedFilter - -## Example Usage - -```typescript -import { GetRecentlyAddedFilter } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedFilter = { - filter: "genre", - filterType: "string", - key: "/library/sections/2/genre?type=2", - title: "Genre", - type: "filter", - advanced: true, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `filter` | *string* | :heavy_check_mark: | N/A | genre | -| `filterType` | *string* | :heavy_check_mark: | N/A | string | -| `key` | *string* | :heavy_check_mark: | N/A | /library/sections/2/genre?type=2 | -| `title` | *string* | :heavy_check_mark: | N/A | Genre | -| `type` | *string* | :heavy_check_mark: | N/A | filter | -| `advanced` | *boolean* | :heavy_minus_sign: | N/A | true | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedhubsresponsetype.md b/docs/sdk/models/operations/getrecentlyaddedhubsresponsetype.md deleted file mode 100644 index f3aa6f1b..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedhubsresponsetype.md +++ /dev/null @@ -1,22 +0,0 @@ -# GetRecentlyAddedHubsResponseType - -## Example Usage - -```typescript -import { GetRecentlyAddedHubsResponseType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedHubsResponseType = - GetRecentlyAddedHubsResponseType.Background; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `CoverPoster` | coverPoster | -| `Background` | background | -| `Snapshot` | snapshot | -| `ClearLogo` | clearLogo | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedhubstype.md b/docs/sdk/models/operations/getrecentlyaddedhubstype.md deleted file mode 100644 index 6b9da5a4..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedhubstype.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetRecentlyAddedHubsType - -The type of media content in the Plex library. This can represent videos, music, or photos. - - -## Example Usage - -```typescript -import { GetRecentlyAddedHubsType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedHubsType = GetRecentlyAddedHubsType.Movie; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Movie` | movie | -| `TvShow` | show | -| `Season` | season | -| `Episode` | episode | -| `Artist` | artist | -| `Album` | album | -| `Track` | track | -| `PhotoAlbum` | photoalbum | -| `Photo` | photo | -| `Collection` | collection | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedimage.md b/docs/sdk/models/operations/getrecentlyaddedimage.md deleted file mode 100644 index f6c655f9..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedimage.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetRecentlyAddedImage - -## Example Usage - -```typescript -import { GetRecentlyAddedHubsResponseType, GetRecentlyAddedImage } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedImage = { - alt: "Episode 1", - type: GetRecentlyAddedHubsResponseType.Background, - url: "/library/metadata/45521/thumb/1644710589", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `alt` | *string* | :heavy_check_mark: | N/A | Episode 1 | -| `type` | [operations.GetRecentlyAddedHubsResponseType](../../../sdk/models/operations/getrecentlyaddedhubsresponsetype.md) | :heavy_check_mark: | N/A | background | -| `url` | *string* | :heavy_check_mark: | N/A | /library/metadata/45521/thumb/1644710589 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedlibrarycountry.md b/docs/sdk/models/operations/getrecentlyaddedlibrarycountry.md deleted file mode 100644 index b324790b..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedlibrarycountry.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetRecentlyAddedLibraryCountry - -## Example Usage - -```typescript -import { GetRecentlyAddedLibraryCountry } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedLibraryCountry = { - tag: "United States of America", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | -| `tag` | *string* | :heavy_minus_sign: | N/A | United States of America | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedlibrarydirector.md b/docs/sdk/models/operations/getrecentlyaddedlibrarydirector.md deleted file mode 100644 index d1aa15f4..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedlibrarydirector.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetRecentlyAddedLibraryDirector - -## Example Usage - -```typescript -import { GetRecentlyAddedLibraryDirector } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedLibraryDirector = { - tag: "Peyton Reed", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *string* | :heavy_minus_sign: | N/A | Peyton Reed | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedlibraryfilter.md b/docs/sdk/models/operations/getrecentlyaddedlibraryfilter.md deleted file mode 100644 index 264971dd..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedlibraryfilter.md +++ /dev/null @@ -1,27 +0,0 @@ -# GetRecentlyAddedLibraryFilter - -## Example Usage - -```typescript -import { GetRecentlyAddedLibraryFilter } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedLibraryFilter = { - filter: "genre", - filterType: "string", - key: "/library/sections/2/genre?type=2", - title: "Genre", - type: "filter", - advanced: true, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `filter` | *string* | :heavy_check_mark: | N/A | genre | -| `filterType` | *string* | :heavy_check_mark: | N/A | string | -| `key` | *string* | :heavy_check_mark: | N/A | /library/sections/2/genre?type=2 | -| `title` | *string* | :heavy_check_mark: | N/A | Genre | -| `type` | *string* | :heavy_check_mark: | N/A | filter | -| `advanced` | *boolean* | :heavy_minus_sign: | N/A | true | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedlibrarygenre.md b/docs/sdk/models/operations/getrecentlyaddedlibrarygenre.md deleted file mode 100644 index b88b0c44..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedlibrarygenre.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetRecentlyAddedLibraryGenre - -## Example Usage - -```typescript -import { GetRecentlyAddedLibraryGenre } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedLibraryGenre = { - tag: "Comedy", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *string* | :heavy_minus_sign: | N/A | Comedy | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedlibrarymedia.md b/docs/sdk/models/operations/getrecentlyaddedlibrarymedia.md deleted file mode 100644 index bfedc417..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedlibrarymedia.md +++ /dev/null @@ -1,58 +0,0 @@ -# GetRecentlyAddedLibraryMedia - -## Example Usage - -```typescript -import { GetRecentlyAddedLibraryMedia } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedLibraryMedia = { - 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", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_minus_sign: | N/A | 120345 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 7474422 | -| `bitrate` | *number* | :heavy_minus_sign: | N/A | 3623 | -| `width` | *number* | :heavy_minus_sign: | N/A | 1920 | -| `height` | *number* | :heavy_minus_sign: | N/A | 804 | -| `aspectRatio` | *number* | :heavy_minus_sign: | N/A | 2.35 | -| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 6 | -| `audioCodec` | *string* | :heavy_minus_sign: | N/A | ac3 | -| `videoCodec` | *string* | :heavy_minus_sign: | N/A | h264 | -| `videoResolution` | *number* | :heavy_minus_sign: | N/A | 1080 | -| `container` | *string* | :heavy_minus_sign: | N/A | mp4 | -| `videoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p | -| `optimizedForStreaming` | *number* | :heavy_minus_sign: | N/A | 0 | -| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | | -| `videoProfile` | *string* | :heavy_minus_sign: | N/A | high | -| `part` | [operations.GetRecentlyAddedLibraryPart](../../../sdk/models/operations/getrecentlyaddedlibrarypart.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedlibrarymediacontainer.md b/docs/sdk/models/operations/getrecentlyaddedlibrarymediacontainer.md deleted file mode 100644 index 044491a3..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedlibrarymediacontainer.md +++ /dev/null @@ -1,165 +0,0 @@ -# GetRecentlyAddedLibraryMediaContainer - -The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - - -## Example Usage - -```typescript -import { GetRecentlyAddedLibraryMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedLibraryMediaContainer = { - type: [ - { - key: "/library/sections/2/all?type=2", - type: "filter", - subtype: "clip", - title: "TV Shows", - active: false, - filter: [ - { - filter: "genre", - filterType: "string", - key: "/library/sections/2/genre?type=2", - title: "Genre", - type: "filter", - advanced: true, - }, - ], - sort: [ - { - default: "asc", - active: false, - descKey: "titleSort:desc", - firstCharacterKey: "/library/sections/2/firstCharacter", - key: "titleSort", - title: "Title", - }, - ], - field: [ - { - key: "show.title", - title: "Show Title", - type: "string", - subType: "rating", - }, - ], - }, - ], - fieldType: [ - { - type: "tag", - operator: [ - { - key: "=", - title: "is", - }, - ], - }, - ], - 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, - 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", - }, - ], - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `type` | [operations.GetRecentlyAddedLibraryType](../../../sdk/models/operations/getrecentlyaddedlibrarytype.md)[] | :heavy_minus_sign: | N/A | | -| `fieldType` | [operations.FieldType](../../../sdk/models/operations/fieldtype.md)[] | :heavy_minus_sign: | N/A | | -| `size` | *number* | :heavy_minus_sign: | N/A | 50 | -| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | | -| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `mediaTagVersion` | *number* | :heavy_minus_sign: | N/A | 1680021154 | -| `mixedParents` | *boolean* | :heavy_minus_sign: | N/A | | -| `metadata` | [operations.GetRecentlyAddedLibraryMetadata](../../../sdk/models/operations/getrecentlyaddedlibrarymetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedlibrarymetadata.md b/docs/sdk/models/operations/getrecentlyaddedlibrarymetadata.md deleted file mode 100644 index c0fb5b2e..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedlibrarymetadata.md +++ /dev/null @@ -1,129 +0,0 @@ -# GetRecentlyAddedLibraryMetadata - -## Example Usage - -```typescript -import { GetRecentlyAddedLibraryMetadata } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedLibraryMetadata = { - 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", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | | -| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | -| `librarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | -| `ratingKey` | *number* | :heavy_minus_sign: | N/A | 59398 | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/59398 | -| `guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5e161a83bea6ac004126e148 | -| `studio` | *string* | :heavy_minus_sign: | N/A | Marvel Studios | -| `type` | *string* | :heavy_minus_sign: | N/A | movie | -| `title` | *string* | :heavy_minus_sign: | N/A | Ant-Man and the Wasp: Quantumania | -| `contentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 | -| `summary` | *string* | :heavy_minus_sign: | N/A | 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` | *number* | :heavy_minus_sign: | N/A | 4.7 | -| `audienceRating` | *number* | :heavy_minus_sign: | N/A | 8.3 | -| `year` | *number* | :heavy_minus_sign: | N/A | 2023 | -| `tagline` | *string* | :heavy_minus_sign: | N/A | Witness the beginning of a new dynasty. | -| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/59398/thumb/1681888010 | -| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/59398/art/1681888010 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 7474422 | -| `originallyAvailableAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | 2023-02-15 00:00:00 +0000 UTC | -| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1681803215 | -| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1681888010 | -| `audienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | -| `chapterSource` | *string* | :heavy_minus_sign: | N/A | media | -| `primaryExtraKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/59399 | -| `ratingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.rotten | -| `media` | [operations.GetRecentlyAddedLibraryMedia](../../../sdk/models/operations/getrecentlyaddedlibrarymedia.md)[] | :heavy_minus_sign: | N/A | | -| `genre` | [operations.GetRecentlyAddedLibraryGenre](../../../sdk/models/operations/getrecentlyaddedlibrarygenre.md)[] | :heavy_minus_sign: | N/A | | -| `director` | [operations.GetRecentlyAddedLibraryDirector](../../../sdk/models/operations/getrecentlyaddedlibrarydirector.md)[] | :heavy_minus_sign: | N/A | | -| `writer` | [operations.GetRecentlyAddedLibraryWriter](../../../sdk/models/operations/getrecentlyaddedlibrarywriter.md)[] | :heavy_minus_sign: | N/A | | -| `country` | [operations.GetRecentlyAddedLibraryCountry](../../../sdk/models/operations/getrecentlyaddedlibrarycountry.md)[] | :heavy_minus_sign: | N/A | | -| `role` | [operations.GetRecentlyAddedLibraryRole](../../../sdk/models/operations/getrecentlyaddedlibraryrole.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedlibrarypart.md b/docs/sdk/models/operations/getrecentlyaddedlibrarypart.md deleted file mode 100644 index 8e24c9eb..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedlibrarypart.md +++ /dev/null @@ -1,34 +0,0 @@ -# GetRecentlyAddedLibraryPart - -## Example Usage - -```typescript -import { GetRecentlyAddedLibraryPart } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedLibraryPart = { - 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", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_minus_sign: | N/A | 120353 | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/parts/120353/1681803203/file.mp4 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 7474422 | -| `file` | *string* | :heavy_minus_sign: | N/A | /movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4 | -| `size` | *number* | :heavy_minus_sign: | N/A | 3395307162 | -| `container` | *string* | :heavy_minus_sign: | N/A | mp4 | -| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | | -| `hasThumbnail` | *number* | :heavy_minus_sign: | N/A | 1 | -| `optimizedForStreaming` | *boolean* | :heavy_minus_sign: | N/A | | -| `videoProfile` | *string* | :heavy_minus_sign: | N/A | high | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedlibraryrequest.md b/docs/sdk/models/operations/getrecentlyaddedlibraryrequest.md deleted file mode 100644 index ba9c35c8..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedlibraryrequest.md +++ /dev/null @@ -1,40 +0,0 @@ -# GetRecentlyAddedLibraryRequest - -## Example Usage - -```typescript -import { GetRecentlyAddedLibraryRequest, QueryParamIncludeMeta, QueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedLibraryRequest = { - contentDirectoryID: 2, - pinnedContentDirectoryID: [ - 3, - 5, - 7, - 13, - 12, - 1, - 6, - 14, - 2, - 10, - 16, - 17, - ], - sectionID: 2, - type: QueryParamType.TvShow, - includeMeta: QueryParamIncludeMeta.Enable, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `contentDirectoryID` | *number* | :heavy_minus_sign: | N/A | 2 | -| `pinnedContentDirectoryID` | *number*[] | :heavy_minus_sign: | N/A | [
3,
5,
7,
13,
12,
1,
6,
14,
2,
10,
16,
17
] | -| `sectionID` | *number* | :heavy_minus_sign: | The library section ID for filtering content. | 2 | -| `type` | [operations.QueryParamType](../../../sdk/models/operations/queryparamtype.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
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
| 2 | -| `includeMeta` | [operations.QueryParamIncludeMeta](../../../sdk/models/operations/queryparamincludemeta.md) | :heavy_minus_sign: | Adds the Meta object to the response
| 1 | -| `xPlexContainerStart` | *number* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 0
| 0 | -| `xPlexContainerSize` | *number* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 50
| 50 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedlibraryresponse.md b/docs/sdk/models/operations/getrecentlyaddedlibraryresponse.md deleted file mode 100644 index 131592eb..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedlibraryresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetRecentlyAddedLibraryResponse - -## Example Usage - -```typescript -import { GetRecentlyAddedLibraryResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedLibraryResponse = { - contentType: "", - statusCode: 838956, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetRecentlyAddedLibraryResponseBody](../../../sdk/models/operations/getrecentlyaddedlibraryresponsebody.md) | :heavy_minus_sign: | The recently added content | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedlibraryresponsebody.md b/docs/sdk/models/operations/getrecentlyaddedlibraryresponsebody.md deleted file mode 100644 index 7f5ccb8f..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedlibraryresponsebody.md +++ /dev/null @@ -1,158 +0,0 @@ -# GetRecentlyAddedLibraryResponseBody - -The recently added content - -## Example Usage - -```typescript -import { GetRecentlyAddedLibraryResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedLibraryResponseBody = { - mediaContainer: { - type: [ - { - key: "/library/sections/2/all?type=2", - type: "filter", - subtype: "clip", - title: "TV Shows", - active: false, - filter: [ - { - filter: "genre", - filterType: "string", - key: "/library/sections/2/genre?type=2", - title: "Genre", - type: "filter", - advanced: true, - }, - ], - sort: [ - { - default: "asc", - active: false, - descKey: "titleSort:desc", - firstCharacterKey: "/library/sections/2/firstCharacter", - key: "titleSort", - title: "Title", - }, - ], - field: [ - { - key: "show.title", - title: "Show Title", - type: "string", - subType: "rating", - }, - ], - }, - ], - fieldType: [ - { - type: "tag", - operator: [ - { - key: "=", - title: "is", - }, - ], - }, - ], - 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, - 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", - }, - ], - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetRecentlyAddedLibraryMediaContainer](../../../sdk/models/operations/getrecentlyaddedlibrarymediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedlibraryrole.md b/docs/sdk/models/operations/getrecentlyaddedlibraryrole.md deleted file mode 100644 index afb0f0ea..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedlibraryrole.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetRecentlyAddedLibraryRole - -## Example Usage - -```typescript -import { GetRecentlyAddedLibraryRole } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedLibraryRole = { - tag: "Paul Rudd", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *string* | :heavy_minus_sign: | N/A | Paul Rudd | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedlibrarytype.md b/docs/sdk/models/operations/getrecentlyaddedlibrarytype.md deleted file mode 100644 index 80e4d4c2..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedlibrarytype.md +++ /dev/null @@ -1,56 +0,0 @@ -# GetRecentlyAddedLibraryType - -## Example Usage - -```typescript -import { GetRecentlyAddedLibraryType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedLibraryType = { - key: "/library/sections/2/all?type=2", - type: "filter", - subtype: "clip", - title: "TV Shows", - active: false, - filter: [ - { - filter: "genre", - filterType: "string", - key: "/library/sections/2/genre?type=2", - title: "Genre", - type: "filter", - advanced: true, - }, - ], - sort: [ - { - default: "asc", - active: false, - descKey: "titleSort:desc", - firstCharacterKey: "/library/sections/2/firstCharacter", - key: "titleSort", - title: "Title", - }, - ], - field: [ - { - key: "show.title", - title: "Show Title", - type: "string", - subType: "rating", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `key` | *string* | :heavy_check_mark: | N/A | /library/sections/2/all?type=2 | -| `type` | *string* | :heavy_check_mark: | N/A | filter | -| `subtype` | *string* | :heavy_minus_sign: | N/A | clip | -| `title` | *string* | :heavy_check_mark: | N/A | TV Shows | -| `active` | *boolean* | :heavy_check_mark: | N/A | false | -| `filter` | [operations.GetRecentlyAddedLibraryFilter](../../../sdk/models/operations/getrecentlyaddedlibraryfilter.md)[] | :heavy_minus_sign: | N/A | | -| `sort` | [operations.Sort](../../../sdk/models/operations/sort.md)[] | :heavy_minus_sign: | N/A | | -| `field` | [operations.Field](../../../sdk/models/operations/field.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedlibrarywriter.md b/docs/sdk/models/operations/getrecentlyaddedlibrarywriter.md deleted file mode 100644 index 721890c1..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedlibrarywriter.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetRecentlyAddedLibraryWriter - -## Example Usage - -```typescript -import { GetRecentlyAddedLibraryWriter } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedLibraryWriter = { - tag: "Jeff Loveness", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *string* | :heavy_minus_sign: | N/A | Jeff Loveness | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedmediacontainer.md b/docs/sdk/models/operations/getrecentlyaddedmediacontainer.md deleted file mode 100644 index 9666ebb1..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedmediacontainer.md +++ /dev/null @@ -1,343 +0,0 @@ -# GetRecentlyAddedMediaContainer - -## Example Usage - -```typescript -import { - GetRecentlyAddedHubsResponseType, - GetRecentlyAddedHubsType, - GetRecentlyAddedMediaContainer, - HasThumbnail, -} from "@lukehagar/plexjs/sdk/models/operations"; -import { RFCDate } from "@lukehagar/plexjs/sdk/types"; - -let value: GetRecentlyAddedMediaContainer = { - size: 50, - totalSize: 50, - offset: 0, - allowSync: false, - identifier: "com.plexapp.plugins.library", - meta: { - type: [ - { - key: "/library/sections/2/all?type=2", - type: "filter", - subtype: "clip", - title: "TV Shows", - active: false, - filter: [ - { - filter: "genre", - filterType: "string", - key: "/library/sections/2/genre?type=2", - title: "Genre", - type: "filter", - advanced: true, - }, - ], - sort: [ - { - default: "asc", - active: false, - descKey: "titleSort:desc", - firstCharacterKey: "/library/sections/2/firstCharacter", - key: "titleSort", - title: "Title", - }, - ], - field: [ - { - key: "show.title", - title: "Show Title", - type: "string", - subType: "rating", - }, - ], - }, - ], - fieldType: [ - { - type: "tag", - operator: [ - { - key: "=", - title: "is", - }, - ], - }, - ], - }, - metadata: [ - { - addedAt: 1556281940, - art: "/library/metadata/58683/art/1703239236", - audienceRatingImage: "rottentomatoes://image.rating.upright", - audienceRating: 9.2, - chapterSource: "media", - childCount: 1, - contentRating: "PG-13", - createdAtAccuracy: "epoch,local", - createdAtTZOffset: "0", - duration: 11558112, - grandparentArt: "/library/metadata/66/art/1705716261", - grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentKey: "/library/metadata/66", - grandparentRatingKey: "66", - grandparentSlug: "alice-in-borderland-2020", - grandparentTheme: "/library/metadata/66/theme/1705716261", - grandparentThumb: "/library/metadata/66/thumb/1705716261", - grandparentTitle: "Caprica", - guid: "plex://movie/5d7768ba96b655001fdc0408", - index: 1, - key: "/library/metadata/58683", - lastRatedAt: 1721813113, - lastViewedAt: 1682752242, - leafCount: 14, - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - librarySectionTitle: "Movies", - originalTitle: "映画 ブラッククローバー 魔法帝の剣", - originallyAvailableAt: new RFCDate("2022-12-14"), - parentGuid: "plex://show/5d9c081b170e24001f2a7be4", - parentIndex: 1, - parentKey: "/library/metadata/66", - parentRatingKey: "66", - parentSlug: "alice-in-borderland-2020", - parentStudio: "UCP", - parentTheme: "/library/metadata/66/theme/1705716261", - parentThumb: "/library/metadata/66/thumb/1705716261", - parentTitle: "Caprica", - parentYear: 2010, - primaryExtraKey: "/library/metadata/58684", - ratingImage: "rottentomatoes://image.rating.ripe", - ratingKey: "58683", - rating: 7.6, - seasonCount: 2022, - skipCount: 1, - slug: "4-for-texas", - studio: "20th Century Studios", - subtype: "clip", - summary: - "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\n" - + "Once a familiar threat returns to finish what was previously started, Jake must\n" - + "work with Neytiri and the army of the Na'vi race to protect their home.\n" - + "", - tagline: "Return to Pandora.", - theme: "/library/metadata/1/theme/1705636920", - thumb: "/library/metadata/58683/thumb/1703239236", - titleSort: "Whale", - title: "Avatar: The Way of Water", - type: GetRecentlyAddedHubsType.Movie, - updatedAt: 1556281940, - userRating: 10, - viewCount: 1, - viewOffset: 5222500, - viewedLeafCount: 0, - year: 2022, - image: [ - { - alt: "Episode 1", - type: GetRecentlyAddedHubsResponseType.Background, - url: "/library/metadata/45521/thumb/1644710589", - }, - ], - ultraBlurColors: { - topLeft: "11333b", - topRight: "0a232d", - bottomRight: "73958", - bottomLeft: "1f5066", - }, - guids: [ - { - id: - "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}", - }, - ], - media: [ - { - id: 387322, - duration: 9610350, - bitrate: 25512, - width: 3840, - height: 1602, - aspectRatio: 2.35, - audioChannels: 6, - displayOffset: 50, - audioCodec: "eac3", - videoCodec: "hevc", - videoResolution: "4k", - container: "mkv", - videoFrameRate: "24p", - videoProfile: "main 10", - hasVoiceActivity: false, - audioProfile: "dts", - has64bitOffsets: false, - part: [ - { - accessible: true, - exists: true, - id: 418385, - key: "/library/parts/418385/1735864239/file.mkv", - indexes: "sd", - duration: 9610350, - file: "/mnt/Movies_1/W/Wicked (2024).mkv", - size: 30649952104, - packetLength: 188, - container: "mkv", - videoProfile: "main 10", - audioProfile: "dts", - has64bitOffsets: false, - hasThumbnail: HasThumbnail.True, - stream: [ - { - id: 1002625, - format: "srt", - default: true, - codec: "hevc", - index: 0, - bitrate: 24743, - language: "English", - languageTag: "en", - languageCode: "eng", - headerCompression: true, - doviblCompatID: 1, - doviblPresent: true, - dovielPresent: false, - doviLevel: 6, - doviPresent: true, - doviProfile: 8, - dovirpuPresent: true, - doviVersion: "1.0", - bitDepth: 10, - chromaLocation: "topleft", - chromaSubsampling: "4:2:0", - codedHeight: 1608, - codedWidth: 3840, - closedCaptions: true, - colorPrimaries: "bt2020", - colorRange: "tv", - colorSpace: "bt2020nc", - colorTrc: "smpte2084", - frameRate: 23.976, - key: "/library/streams/216389", - height: 1602, - level: 150, - original: true, - hasScalingMatrix: false, - profile: "main 10", - scanType: "progressive", - embeddedInVideo: "progressive", - refFrames: 1, - width: 3840, - displayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - extendedDisplayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - selected: true, - forced: true, - channels: 6, - audioChannelLayout: "5.1(side)", - samplingRate: 48000, - canAutoSync: false, - hearingImpaired: true, - dub: true, - title: "SDH", - }, - ], - }, - ], - }, - ], - genre: [ - { - id: 259, - filter: "genre=19", - tag: "Crime", - }, - ], - country: [ - { - id: 259, - tag: "United States of America", - filter: "country=19", - }, - ], - director: [ - { - id: 126522, - filter: "director=235876", - tag: "Danny Boyle", - tagKey: "5d776831151a60001f24d031", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", - }, - ], - writer: [ - { - id: 126522, - filter: "writer=126522", - tag: "Jamie P. Hanson", - tagKey: "5d77683d85719b001f3a535e", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", - }, - ], - role: [ - { - id: 126522, - filter: "actor=126522", - tag: "Teller", - tagKey: "5d77683d85719b001f3a535e", - role: "Self - Judge", - thumb: - "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg", - }, - ], - producer: [ - { - id: 126522, - filter: "producer=126522", - tag: "Amelia Knapp", - tagKey: "5d77683d85719b001f3a535e", - thumb: - "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg", - }, - ], - rating1: [ - { - image: "imdb://image.rating", - value: 5.1, - type: "audience", - }, - ], - similar: [ - { - id: 259, - filter: "similar=259", - tag: "Criss Angel Mindfreak", - }, - ], - location: [ - { - path: "/TV Shows/Clarkson's Farm", - }, - ], - collection: [ - { - tag: "My Awesome Collection", - }, - ], - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `totalSize` | *number* | :heavy_check_mark: | Total number of media items in the library. | 50 | -| `offset` | *number* | :heavy_check_mark: | Offset value for pagination. | 0 | -| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `identifier` | *string* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `meta` | [operations.Meta](../../../sdk/models/operations/meta.md) | :heavy_minus_sign: | The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
| | -| `metadata` | [operations.GetRecentlyAddedMetadata](../../../sdk/models/operations/getrecentlyaddedmetadata.md)[] | :heavy_minus_sign: | An array of metadata items. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedmetadata.md b/docs/sdk/models/operations/getrecentlyaddedmetadata.md deleted file mode 100644 index 785dff32..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedmetadata.md +++ /dev/null @@ -1,355 +0,0 @@ -# GetRecentlyAddedMetadata - -Unknown - - -## Example Usage - -```typescript -import { - GetRecentlyAddedHubsResponseType, - GetRecentlyAddedHubsType, - GetRecentlyAddedMetadata, - HasThumbnail, -} from "@lukehagar/plexjs/sdk/models/operations"; -import { RFCDate } from "@lukehagar/plexjs/sdk/types"; - -let value: GetRecentlyAddedMetadata = { - addedAt: 1556281940, - art: "/library/metadata/58683/art/1703239236", - audienceRatingImage: "rottentomatoes://image.rating.upright", - audienceRating: 9.2, - chapterSource: "media", - childCount: 1, - contentRating: "PG-13", - createdAtAccuracy: "epoch,local", - createdAtTZOffset: "0", - duration: 11558112, - grandparentArt: "/library/metadata/66/art/1705716261", - grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentKey: "/library/metadata/66", - grandparentRatingKey: "66", - grandparentSlug: "alice-in-borderland-2020", - grandparentTheme: "/library/metadata/66/theme/1705716261", - grandparentThumb: "/library/metadata/66/thumb/1705716261", - grandparentTitle: "Caprica", - guid: "plex://movie/5d7768ba96b655001fdc0408", - index: 1, - key: "/library/metadata/58683", - lastRatedAt: 1721813113, - lastViewedAt: 1682752242, - leafCount: 14, - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - librarySectionTitle: "Movies", - originalTitle: "映画 ブラッククローバー 魔法帝の剣", - originallyAvailableAt: new RFCDate("2022-12-14"), - parentGuid: "plex://show/5d9c081b170e24001f2a7be4", - parentIndex: 1, - parentKey: "/library/metadata/66", - parentRatingKey: "66", - parentSlug: "alice-in-borderland-2020", - parentStudio: "UCP", - parentTheme: "/library/metadata/66/theme/1705716261", - parentThumb: "/library/metadata/66/thumb/1705716261", - parentTitle: "Caprica", - parentYear: 2010, - primaryExtraKey: "/library/metadata/58684", - ratingImage: "rottentomatoes://image.rating.ripe", - ratingKey: "58683", - rating: 7.6, - seasonCount: 2022, - skipCount: 1, - slug: "4-for-texas", - studio: "20th Century Studios", - subtype: "clip", - summary: - "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\n" - + "Once a familiar threat returns to finish what was previously started, Jake must\n" - + "work with Neytiri and the army of the Na'vi race to protect their home.\n" - + "", - tagline: "Return to Pandora.", - theme: "/library/metadata/1/theme/1705636920", - thumb: "/library/metadata/58683/thumb/1703239236", - titleSort: "Whale", - title: "Avatar: The Way of Water", - type: GetRecentlyAddedHubsType.Movie, - updatedAt: 1556281940, - userRating: 10, - viewCount: 1, - viewOffset: 5222500, - viewedLeafCount: 0, - year: 2022, - image: [ - { - alt: "Episode 1", - type: GetRecentlyAddedHubsResponseType.Background, - url: "/library/metadata/45521/thumb/1644710589", - }, - ], - ultraBlurColors: { - topLeft: "11333b", - topRight: "0a232d", - bottomRight: "73958", - bottomLeft: "1f5066", - }, - guids: [ - { - id: - "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}", - }, - ], - media: [ - { - id: 387322, - duration: 9610350, - bitrate: 25512, - width: 3840, - height: 1602, - aspectRatio: 2.35, - audioChannels: 6, - displayOffset: 50, - audioCodec: "eac3", - videoCodec: "hevc", - videoResolution: "4k", - container: "mkv", - videoFrameRate: "24p", - videoProfile: "main 10", - hasVoiceActivity: false, - audioProfile: "dts", - has64bitOffsets: false, - part: [ - { - accessible: true, - exists: true, - id: 418385, - key: "/library/parts/418385/1735864239/file.mkv", - indexes: "sd", - duration: 9610350, - file: "/mnt/Movies_1/W/Wicked (2024).mkv", - size: 30649952104, - packetLength: 188, - container: "mkv", - videoProfile: "main 10", - audioProfile: "dts", - has64bitOffsets: false, - hasThumbnail: HasThumbnail.True, - stream: [ - { - id: 1002625, - format: "srt", - default: true, - codec: "hevc", - index: 0, - bitrate: 24743, - language: "English", - languageTag: "en", - languageCode: "eng", - headerCompression: true, - doviblCompatID: 1, - doviblPresent: true, - dovielPresent: false, - doviLevel: 6, - doviPresent: true, - doviProfile: 8, - dovirpuPresent: true, - doviVersion: "1.0", - bitDepth: 10, - chromaLocation: "topleft", - chromaSubsampling: "4:2:0", - codedHeight: 1608, - codedWidth: 3840, - closedCaptions: true, - colorPrimaries: "bt2020", - colorRange: "tv", - colorSpace: "bt2020nc", - colorTrc: "smpte2084", - frameRate: 23.976, - key: "/library/streams/216389", - height: 1602, - level: 150, - original: true, - hasScalingMatrix: false, - profile: "main 10", - scanType: "progressive", - embeddedInVideo: "progressive", - refFrames: 1, - width: 3840, - displayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - extendedDisplayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - selected: true, - forced: true, - channels: 6, - audioChannelLayout: "5.1(side)", - samplingRate: 48000, - canAutoSync: false, - hearingImpaired: true, - dub: true, - title: "SDH", - }, - ], - }, - ], - }, - ], - genre: [ - { - id: 259, - filter: "genre=19", - tag: "Crime", - }, - ], - country: [ - { - id: 259, - tag: "United States of America", - filter: "country=19", - }, - ], - director: [ - { - id: 126522, - filter: "director=235876", - tag: "Danny Boyle", - tagKey: "5d776831151a60001f24d031", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", - }, - ], - writer: [ - { - id: 126522, - filter: "writer=126522", - tag: "Jamie P. Hanson", - tagKey: "5d77683d85719b001f3a535e", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", - }, - ], - role: [ - { - id: 126522, - filter: "actor=126522", - tag: "Teller", - tagKey: "5d77683d85719b001f3a535e", - role: "Self - Judge", - thumb: - "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg", - }, - ], - producer: [ - { - id: 126522, - filter: "producer=126522", - tag: "Amelia Knapp", - tagKey: "5d77683d85719b001f3a535e", - thumb: - "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg", - }, - ], - rating1: [ - { - image: "imdb://image.rating", - value: 5.1, - type: "audience", - }, - ], - similar: [ - { - id: 259, - filter: "similar=259", - tag: "Criss Angel Mindfreak", - }, - ], - location: [ - { - path: "/TV Shows/Clarkson's Farm", - }, - ], - collection: [ - { - tag: "My Awesome Collection", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `addedAt` | *number* | :heavy_check_mark: | N/A | 1556281940 | -| `art` | *string* | :heavy_check_mark: | The art image URL for the media item. | /library/metadata/58683/art/1703239236 | -| `audienceRatingImage` | *string* | :heavy_minus_sign: | The URL for the audience rating image. | rottentomatoes://image.rating.upright | -| `audienceRating` | *number* | :heavy_check_mark: | The audience rating for the media item. | 9.2 | -| `chapterSource` | *string* | :heavy_minus_sign: | The source from which chapter data is derived. | media | -| `childCount` | *number* | :heavy_check_mark: | The number of child items associated with this media item. | 1 | -| `contentRating` | *string* | :heavy_minus_sign: | The content rating for the media item. | PG-13 | -| `createdAtAccuracy` | *string* | :heavy_minus_sign: | The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). | epoch,local | -| `createdAtTZOffset` | *string* | :heavy_minus_sign: | The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. | 0 | -| `duration` | *number* | :heavy_check_mark: | The duration of the media item in milliseconds. | 11558112 | -| `grandparentArt` | *string* | :heavy_minus_sign: | The art URL for the grandparent media item. | /library/metadata/66/art/1705716261 | -| `grandparentGuid` | *string* | :heavy_minus_sign: | The GUID of the grandparent media item. | plex://show/5d9c081b170e24001f2a7be4 | -| `grandparentKey` | *string* | :heavy_minus_sign: | The key of the grandparent media item. | /library/metadata/66 | -| `grandparentRatingKey` | *string* | :heavy_minus_sign: | The rating key of the grandparent media item. | 66 | -| `grandparentSlug` | *string* | :heavy_minus_sign: | The slug for the grandparent media item. | alice-in-borderland-2020 | -| `grandparentTheme` | *string* | :heavy_minus_sign: | The theme URL for the grandparent media item. | /library/metadata/66/theme/1705716261 | -| `grandparentThumb` | *string* | :heavy_minus_sign: | The thumbnail URL for the grandparent media item. | /library/metadata/66/thumb/1705716261 | -| `grandparentTitle` | *string* | :heavy_minus_sign: | The title of the grandparent media item. | Caprica | -| `guid` | *string* | :heavy_check_mark: | The globally unique identifier for the media item. | plex://movie/5d7768ba96b655001fdc0408 | -| `index` | *number* | :heavy_check_mark: | The index position of the media item. | 1 | -| `key` | *string* | :heavy_check_mark: | The unique key for the media item. | /library/metadata/58683 | -| `lastRatedAt` | *number* | :heavy_minus_sign: | The Unix timestamp representing the last time the item was rated. | 1721813113 | -| `lastViewedAt` | *number* | :heavy_minus_sign: | Unix timestamp for when the media item was last viewed. | 1682752242 | -| `leafCount` | *number* | :heavy_minus_sign: | The number of leaf items (end nodes) under this media item. | 14 | -| `librarySectionID` | *number* | :heavy_minus_sign: | The identifier for the library section. | 1 | -| `librarySectionKey` | *string* | :heavy_minus_sign: | The key corresponding to the library section. | /library/sections/1 | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | The title of the library section. | Movies | -| `originalTitle` | *string* | :heavy_minus_sign: | The original title of the media item (if different). | 映画 ブラッククローバー 魔法帝の剣 | -| `originallyAvailableAt` | [RFCDate](../../../types/rfcdate.md) | :heavy_minus_sign: | The original release date of the media item. | 2022-12-14 | -| `parentGuid` | *string* | :heavy_minus_sign: | The GUID of the parent media item. | plex://show/5d9c081b170e24001f2a7be4 | -| `parentIndex` | *number* | :heavy_minus_sign: | The index position of the parent media item. | 1 | -| `parentKey` | *string* | :heavy_minus_sign: | The key of the parent media item. | /library/metadata/66 | -| `parentRatingKey` | *string* | :heavy_minus_sign: | The rating key of the parent media item. | 66 | -| `parentSlug` | *string* | :heavy_minus_sign: | The slug for the parent media item. | alice-in-borderland-2020 | -| `parentStudio` | *string* | :heavy_check_mark: | The studio of the parent media item. | UCP | -| `parentTheme` | *string* | :heavy_check_mark: | The theme URL for the parent media item. | /library/metadata/66/theme/1705716261 | -| `parentThumb` | *string* | :heavy_minus_sign: | The thumbnail URL for the parent media item. | /library/metadata/66/thumb/1705716261 | -| `parentTitle` | *string* | :heavy_minus_sign: | The title of the parent media item. | Caprica | -| `parentYear` | *number* | :heavy_minus_sign: | The release year of the parent media item. | 2010 | -| `primaryExtraKey` | *string* | :heavy_minus_sign: | The primary extra key associated with this media item. | /library/metadata/58684 | -| `ratingImage` | *string* | :heavy_minus_sign: | The URL for the rating image. | rottentomatoes://image.rating.ripe | -| `ratingKey` | *string* | :heavy_check_mark: | The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. | 58683 | -| `rating` | *number* | :heavy_check_mark: | The critic rating for the media item. | 7.6 | -| `seasonCount` | *number* | :heavy_check_mark: | The total number of seasons (for TV shows). | 2022 | -| `skipCount` | *number* | :heavy_minus_sign: | The number of times this media item has been skipped. | 1 | -| `slug` | *string* | :heavy_check_mark: | A URL‐friendly version of the media title. | 4-for-texas | -| `studio` | *string* | :heavy_minus_sign: | The studio that produced the media item. | 20th Century Studios | -| `subtype` | *string* | :heavy_minus_sign: | A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. | clip | -| `summary` | *string* | :heavy_check_mark: | A synopsis of the media item. | 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.
| -| `tagline` | *string* | :heavy_check_mark: | A brief tagline for the media item. | Return to Pandora. | -| `theme` | *string* | :heavy_check_mark: | The theme URL for the media item. | /library/metadata/1/theme/1705636920 | -| `thumb` | *string* | :heavy_check_mark: | The thumbnail image URL for the media item. | /library/metadata/58683/thumb/1703239236 | -| `titleSort` | *string* | :heavy_check_mark: | The sort title used for ordering media items. | Whale | -| `title` | *string* | :heavy_check_mark: | The title of the media item. | Avatar: The Way of Water | -| `type` | [operations.GetRecentlyAddedHubsType](../../../sdk/models/operations/getrecentlyaddedhubstype.md) | :heavy_check_mark: | N/A | movie | -| `updatedAt` | *number* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 | -| `userRating` | *number* | :heavy_minus_sign: | The rating provided by a user for the item. This value is expressed as a decimal number. | 10 | -| `viewCount` | *number* | :heavy_minus_sign: | The number of times this media item has been viewed. | 1 | -| `viewOffset` | *number* | :heavy_minus_sign: | The current playback offset (in milliseconds). | 5222500 | -| `viewedLeafCount` | *number* | :heavy_minus_sign: | The number of leaf items that have been viewed. | 0 | -| `year` | *number* | :heavy_minus_sign: | The release year of the media item. | 2022 | -| `image` | [operations.GetRecentlyAddedImage](../../../sdk/models/operations/getrecentlyaddedimage.md)[] | :heavy_minus_sign: | N/A | | -| `ultraBlurColors` | [operations.UltraBlurColors](../../../sdk/models/operations/ultrablurcolors.md) | :heavy_minus_sign: | N/A | | -| `guids` | [operations.Guids](../../../sdk/models/operations/guids.md)[] | :heavy_minus_sign: | N/A | | -| `media` | [operations.Media](../../../sdk/models/operations/media.md)[] | :heavy_minus_sign: | N/A | | -| `genre` | [operations.Genre](../../../sdk/models/operations/genre.md)[] | :heavy_minus_sign: | N/A | | -| `country` | [operations.Country](../../../sdk/models/operations/country.md)[] | :heavy_minus_sign: | N/A | | -| `director` | [operations.Director](../../../sdk/models/operations/director.md)[] | :heavy_minus_sign: | N/A | | -| `writer` | [operations.Writer](../../../sdk/models/operations/writer.md)[] | :heavy_minus_sign: | N/A | | -| `role` | [operations.Role](../../../sdk/models/operations/role.md)[] | :heavy_minus_sign: | N/A | | -| `producer` | [operations.Producer](../../../sdk/models/operations/producer.md)[] | :heavy_minus_sign: | N/A | | -| `rating1` | [operations.Rating](../../../sdk/models/operations/rating.md)[] | :heavy_minus_sign: | N/A | | -| `similar` | [operations.Similar](../../../sdk/models/operations/similar.md)[] | :heavy_minus_sign: | N/A | | -| `location` | [operations.Location](../../../sdk/models/operations/location.md)[] | :heavy_minus_sign: | N/A | | -| `collection` | [operations.Collection](../../../sdk/models/operations/collection.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedoperator.md b/docs/sdk/models/operations/getrecentlyaddedoperator.md deleted file mode 100644 index 414fef26..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedoperator.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetRecentlyAddedOperator - -## Example Usage - -```typescript -import { GetRecentlyAddedOperator } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedOperator = { - key: "=", - title: "is", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `key` | *string* | :heavy_check_mark: | N/A | = | -| `title` | *string* | :heavy_check_mark: | N/A | is | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedoptimizedforstreaming.md b/docs/sdk/models/operations/getrecentlyaddedoptimizedforstreaming.md deleted file mode 100644 index 4247f134..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedoptimizedforstreaming.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetRecentlyAddedOptimizedForStreaming - -Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - - -## Supported Types - -### `operations.GetRecentlyAddedOptimizedForStreaming1` - -```typescript -const value: operations.GetRecentlyAddedOptimizedForStreaming1 = - GetRecentlyAddedOptimizedForStreaming1.Zero; -``` - -### `boolean` - -```typescript -const value: boolean = true; -``` - diff --git a/docs/sdk/models/operations/getrecentlyaddedoptimizedforstreaming1.md b/docs/sdk/models/operations/getrecentlyaddedoptimizedforstreaming1.md deleted file mode 100644 index 9eaaca0d..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedoptimizedforstreaming1.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetRecentlyAddedOptimizedForStreaming1 - -## Example Usage - -```typescript -import { GetRecentlyAddedOptimizedForStreaming1 } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedOptimizedForStreaming1 = - GetRecentlyAddedOptimizedForStreaming1.Zero; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedrequest.md b/docs/sdk/models/operations/getrecentlyaddedrequest.md deleted file mode 100644 index b745cd45..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedrequest.md +++ /dev/null @@ -1,26 +0,0 @@ -# GetRecentlyAddedRequest - -## Example Usage - -```typescript -import { GetRecentlyAddedRequest, IncludeMeta, Type } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedRequest = { - contentDirectoryID: 995290, - sectionID: 2, - type: Type.TvShow, - includeMeta: IncludeMeta.Enable, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `contentDirectoryID` | *number* | :heavy_check_mark: | The content directory ID. | | -| `pinnedContentDirectoryID` | *string* | :heavy_minus_sign: | Comma-separated list of pinned content directory IDs. | | -| `sectionID` | *number* | :heavy_minus_sign: | The library section ID for filtering content. | 2 | -| `type` | [operations.Type](../../../sdk/models/operations/type.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
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
| 2 | -| `includeMeta` | [operations.IncludeMeta](../../../sdk/models/operations/includemeta.md) | :heavy_minus_sign: | Adds the Meta object to the response
| 1 | -| `xPlexContainerStart` | *number* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 0
| 0 | -| `xPlexContainerSize` | *number* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 50
| 50 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedresponse.md b/docs/sdk/models/operations/getrecentlyaddedresponse.md deleted file mode 100644 index 89437d08..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetRecentlyAddedResponse - -## Example Usage - -```typescript -import { GetRecentlyAddedResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedResponse = { - contentType: "", - statusCode: 216712, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetRecentlyAddedResponseBody](../../../sdk/models/operations/getrecentlyaddedresponsebody.md) | :heavy_minus_sign: | A successful response with recently added content. | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedresponsebody.md b/docs/sdk/models/operations/getrecentlyaddedresponsebody.md deleted file mode 100644 index 597126c7..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedresponsebody.md +++ /dev/null @@ -1,341 +0,0 @@ -# GetRecentlyAddedResponseBody - -A successful response with recently added content. - -## Example Usage - -```typescript -import { - GetRecentlyAddedHubsResponseType, - GetRecentlyAddedHubsType, - GetRecentlyAddedResponseBody, - HasThumbnail, -} from "@lukehagar/plexjs/sdk/models/operations"; -import { RFCDate } from "@lukehagar/plexjs/sdk/types"; - -let value: GetRecentlyAddedResponseBody = { - mediaContainer: { - size: 50, - totalSize: 50, - offset: 0, - allowSync: false, - identifier: "com.plexapp.plugins.library", - meta: { - type: [ - { - key: "/library/sections/2/all?type=2", - type: "filter", - subtype: "clip", - title: "TV Shows", - active: false, - filter: [ - { - filter: "genre", - filterType: "string", - key: "/library/sections/2/genre?type=2", - title: "Genre", - type: "filter", - advanced: true, - }, - ], - sort: [ - { - default: "asc", - active: false, - descKey: "titleSort:desc", - firstCharacterKey: "/library/sections/2/firstCharacter", - key: "titleSort", - title: "Title", - }, - ], - field: [ - { - key: "show.title", - title: "Show Title", - type: "string", - subType: "rating", - }, - ], - }, - ], - fieldType: [ - { - type: "tag", - operator: [ - { - key: "=", - title: "is", - }, - ], - }, - ], - }, - metadata: [ - { - addedAt: 1556281940, - art: "/library/metadata/58683/art/1703239236", - audienceRatingImage: "rottentomatoes://image.rating.upright", - audienceRating: 9.2, - chapterSource: "media", - childCount: 1, - contentRating: "PG-13", - createdAtAccuracy: "epoch,local", - createdAtTZOffset: "0", - duration: 11558112, - grandparentArt: "/library/metadata/66/art/1705716261", - grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentKey: "/library/metadata/66", - grandparentRatingKey: "66", - grandparentSlug: "alice-in-borderland-2020", - grandparentTheme: "/library/metadata/66/theme/1705716261", - grandparentThumb: "/library/metadata/66/thumb/1705716261", - grandparentTitle: "Caprica", - guid: "plex://movie/5d7768ba96b655001fdc0408", - index: 1, - key: "/library/metadata/58683", - lastRatedAt: 1721813113, - lastViewedAt: 1682752242, - leafCount: 14, - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - librarySectionTitle: "Movies", - originalTitle: "映画 ブラッククローバー 魔法帝の剣", - originallyAvailableAt: new RFCDate("2022-12-14"), - parentGuid: "plex://show/5d9c081b170e24001f2a7be4", - parentIndex: 1, - parentKey: "/library/metadata/66", - parentRatingKey: "66", - parentSlug: "alice-in-borderland-2020", - parentStudio: "UCP", - parentTheme: "/library/metadata/66/theme/1705716261", - parentThumb: "/library/metadata/66/thumb/1705716261", - parentTitle: "Caprica", - parentYear: 2010, - primaryExtraKey: "/library/metadata/58684", - ratingImage: "rottentomatoes://image.rating.ripe", - ratingKey: "58683", - rating: 7.6, - seasonCount: 2022, - skipCount: 1, - slug: "4-for-texas", - studio: "20th Century Studios", - subtype: "clip", - summary: - "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\n" - + "Once a familiar threat returns to finish what was previously started, Jake must\n" - + "work with Neytiri and the army of the Na'vi race to protect their home.\n" - + "", - tagline: "Return to Pandora.", - theme: "/library/metadata/1/theme/1705636920", - thumb: "/library/metadata/58683/thumb/1703239236", - titleSort: "Whale", - title: "Avatar: The Way of Water", - type: GetRecentlyAddedHubsType.Movie, - updatedAt: 1556281940, - userRating: 10, - viewCount: 1, - viewOffset: 5222500, - viewedLeafCount: 0, - year: 2022, - image: [ - { - alt: "Episode 1", - type: GetRecentlyAddedHubsResponseType.Background, - url: "/library/metadata/45521/thumb/1644710589", - }, - ], - ultraBlurColors: { - topLeft: "11333b", - topRight: "0a232d", - bottomRight: "73958", - bottomLeft: "1f5066", - }, - guids: [ - { - id: - "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}", - }, - ], - media: [ - { - id: 387322, - duration: 9610350, - bitrate: 25512, - width: 3840, - height: 1602, - aspectRatio: 2.35, - audioChannels: 6, - displayOffset: 50, - audioCodec: "eac3", - videoCodec: "hevc", - videoResolution: "4k", - container: "mkv", - videoFrameRate: "24p", - videoProfile: "main 10", - hasVoiceActivity: false, - audioProfile: "dts", - has64bitOffsets: false, - part: [ - { - accessible: true, - exists: true, - id: 418385, - key: "/library/parts/418385/1735864239/file.mkv", - indexes: "sd", - duration: 9610350, - file: "/mnt/Movies_1/W/Wicked (2024).mkv", - size: 30649952104, - packetLength: 188, - container: "mkv", - videoProfile: "main 10", - audioProfile: "dts", - has64bitOffsets: false, - hasThumbnail: HasThumbnail.True, - stream: [ - { - id: 1002625, - format: "srt", - default: true, - codec: "hevc", - index: 0, - bitrate: 24743, - language: "English", - languageTag: "en", - languageCode: "eng", - headerCompression: true, - doviblCompatID: 1, - doviblPresent: true, - dovielPresent: false, - doviLevel: 6, - doviPresent: true, - doviProfile: 8, - dovirpuPresent: true, - doviVersion: "1.0", - bitDepth: 10, - chromaLocation: "topleft", - chromaSubsampling: "4:2:0", - codedHeight: 1608, - codedWidth: 3840, - closedCaptions: true, - colorPrimaries: "bt2020", - colorRange: "tv", - colorSpace: "bt2020nc", - colorTrc: "smpte2084", - frameRate: 23.976, - key: "/library/streams/216389", - height: 1602, - level: 150, - original: true, - hasScalingMatrix: false, - profile: "main 10", - scanType: "progressive", - embeddedInVideo: "progressive", - refFrames: 1, - width: 3840, - displayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - extendedDisplayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - selected: true, - forced: true, - channels: 6, - audioChannelLayout: "5.1(side)", - samplingRate: 48000, - canAutoSync: false, - hearingImpaired: true, - dub: true, - title: "SDH", - }, - ], - }, - ], - }, - ], - genre: [ - { - id: 259, - filter: "genre=19", - tag: "Crime", - }, - ], - country: [ - { - id: 259, - tag: "United States of America", - filter: "country=19", - }, - ], - director: [ - { - id: 126522, - filter: "director=235876", - tag: "Danny Boyle", - tagKey: "5d776831151a60001f24d031", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", - }, - ], - writer: [ - { - id: 126522, - filter: "writer=126522", - tag: "Jamie P. Hanson", - tagKey: "5d77683d85719b001f3a535e", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", - }, - ], - role: [ - { - id: 126522, - filter: "actor=126522", - tag: "Teller", - tagKey: "5d77683d85719b001f3a535e", - role: "Self - Judge", - thumb: - "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg", - }, - ], - producer: [ - { - id: 126522, - filter: "producer=126522", - tag: "Amelia Knapp", - tagKey: "5d77683d85719b001f3a535e", - thumb: - "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg", - }, - ], - rating1: [ - { - image: "imdb://image.rating", - value: 5.1, - type: "audience", - }, - ], - similar: [ - { - id: 259, - filter: "similar=259", - tag: "Criss Angel Mindfreak", - }, - ], - location: [ - { - path: "/TV Shows/Clarkson's Farm", - }, - ], - collection: [ - { - tag: "My Awesome Collection", - }, - ], - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetRecentlyAddedMediaContainer](../../../sdk/models/operations/getrecentlyaddedmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedsort.md b/docs/sdk/models/operations/getrecentlyaddedsort.md deleted file mode 100644 index 9b8faa61..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedsort.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetRecentlyAddedSort - -## Example Usage - -```typescript -import { GetRecentlyAddedSort } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedSort = { - default: "asc", - active: false, - descKey: "titleSort:desc", - firstCharacterKey: "/library/sections/2/firstCharacter", - key: "titleSort", - title: "Title", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `default` | *string* | :heavy_minus_sign: | N/A | asc | -| `active` | *boolean* | :heavy_minus_sign: | N/A | false | -| `activeDirection` | [operations.GetRecentlyAddedActiveDirection](../../../sdk/models/operations/getrecentlyaddedactivedirection.md) | :heavy_minus_sign: | The direction of the sort. Can be either `asc` or `desc`.
| asc | -| `defaultDirection` | [operations.GetRecentlyAddedDefaultDirection](../../../sdk/models/operations/getrecentlyaddeddefaultdirection.md) | :heavy_minus_sign: | The direction of the sort. Can be either `asc` or `desc`.
| asc | -| `descKey` | *string* | :heavy_minus_sign: | N/A | titleSort:desc | -| `firstCharacterKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/2/firstCharacter | -| `key` | *string* | :heavy_check_mark: | N/A | titleSort | -| `title` | *string* | :heavy_check_mark: | N/A | Title | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrecentlyaddedtype.md b/docs/sdk/models/operations/getrecentlyaddedtype.md deleted file mode 100644 index 62d84772..00000000 --- a/docs/sdk/models/operations/getrecentlyaddedtype.md +++ /dev/null @@ -1,56 +0,0 @@ -# GetRecentlyAddedType - -## Example Usage - -```typescript -import { GetRecentlyAddedType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRecentlyAddedType = { - key: "/library/sections/2/all?type=2", - type: "filter", - subtype: "clip", - title: "TV Shows", - active: false, - filter: [ - { - filter: "genre", - filterType: "string", - key: "/library/sections/2/genre?type=2", - title: "Genre", - type: "filter", - advanced: true, - }, - ], - sort: [ - { - default: "asc", - active: false, - descKey: "titleSort:desc", - firstCharacterKey: "/library/sections/2/firstCharacter", - key: "titleSort", - title: "Title", - }, - ], - field: [ - { - key: "show.title", - title: "Show Title", - type: "string", - subType: "rating", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `key` | *string* | :heavy_check_mark: | N/A | /library/sections/2/all?type=2 | -| `type` | *string* | :heavy_check_mark: | N/A | filter | -| `subtype` | *string* | :heavy_minus_sign: | N/A | clip | -| `title` | *string* | :heavy_check_mark: | N/A | TV Shows | -| `active` | *boolean* | :heavy_check_mark: | N/A | false | -| `filter` | [operations.GetRecentlyAddedFilter](../../../sdk/models/operations/getrecentlyaddedfilter.md)[] | :heavy_minus_sign: | N/A | | -| `sort` | [operations.GetRecentlyAddedSort](../../../sdk/models/operations/getrecentlyaddedsort.md)[] | :heavy_minus_sign: | N/A | | -| `field` | [operations.GetRecentlyAddedField](../../../sdk/models/operations/getrecentlyaddedfield.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrefreshlibrarymetadatarequest.md b/docs/sdk/models/operations/getrefreshlibrarymetadatarequest.md deleted file mode 100644 index 695f2fb0..00000000 --- a/docs/sdk/models/operations/getrefreshlibrarymetadatarequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetRefreshLibraryMetadataRequest - -## Example Usage - -```typescript -import { Force, GetRefreshLibraryMetadataRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRefreshLibraryMetadataRequest = { - force: Force.Zero, - sectionKey: 9518, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `force` | [operations.Force](../../../sdk/models/operations/force.md) | :heavy_minus_sign: | Force the refresh even if the library is already being refreshed. | 0 | -| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrefreshlibrarymetadataresponse.md b/docs/sdk/models/operations/getrefreshlibrarymetadataresponse.md deleted file mode 100644 index 8f8c6dec..00000000 --- a/docs/sdk/models/operations/getrefreshlibrarymetadataresponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetRefreshLibraryMetadataResponse - -## Example Usage - -```typescript -import { GetRefreshLibraryMetadataResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetRefreshLibraryMetadataResponse = { - contentType: "", - statusCode: 452576, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrelatedhubsglobals.md b/docs/sdk/models/operations/getrelatedhubsglobals.md new file mode 100644 index 00000000..cc9e3c72 --- /dev/null +++ b/docs/sdk/models/operations/getrelatedhubsglobals.md @@ -0,0 +1,35 @@ +# GetRelatedHubsGlobals + +## Example Usage + +```typescript +import { GetRelatedHubsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetRelatedHubsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrelatedhubsrequest.md b/docs/sdk/models/operations/getrelatedhubsrequest.md new file mode 100644 index 00000000..51fef1a9 --- /dev/null +++ b/docs/sdk/models/operations/getrelatedhubsrequest.md @@ -0,0 +1,31 @@ +# GetRelatedHubsRequest + +## Example Usage + +```typescript +import { GetRelatedHubsRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: GetRelatedHubsRequest = { + metadataId: 344420, + onlyTransient: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `metadataId` | *number* | :heavy_check_mark: | The metadata ID for the hubs to fetch | | +| `count` | *number* | :heavy_minus_sign: | Limit results to count items | | +| `onlyTransient` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | 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) | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrelatedhubsresponse.md b/docs/sdk/models/operations/getrelatedhubsresponse.md new file mode 100644 index 00000000..82628828 --- /dev/null +++ b/docs/sdk/models/operations/getrelatedhubsresponse.md @@ -0,0 +1,34 @@ +# GetRelatedHubsResponse + +## Example Usage + +```typescript +import { GetRelatedHubsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetRelatedHubsResponse = { + contentType: "", + statusCode: 956434, + headers: { + "key": [ + "", + "", + ], + "key1": [], + "key2": [ + "", + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithHubs` | [shared.MediaContainerWithHubs](../../../sdk/models/shared/mediacontainerwithhubs.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrelateditemsglobals.md b/docs/sdk/models/operations/getrelateditemsglobals.md new file mode 100644 index 00000000..59987179 --- /dev/null +++ b/docs/sdk/models/operations/getrelateditemsglobals.md @@ -0,0 +1,35 @@ +# GetRelatedItemsGlobals + +## Example Usage + +```typescript +import { GetRelatedItemsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetRelatedItemsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrelateditemsmediacontainer.md b/docs/sdk/models/operations/getrelateditemsmediacontainer.md new file mode 100644 index 00000000..c9a4b75e --- /dev/null +++ b/docs/sdk/models/operations/getrelateditemsmediacontainer.md @@ -0,0 +1,187 @@ +# GetRelatedItemsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetRelatedItemsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetRelatedItemsMediaContainer = { + hub: [ + { + type: "track", + context: "hub.home.onDeck", + hubIdentifier: "home.onDeck", + key: "/hubs/sections/home/onDeck", + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + size: 1, + subtype: "podcast", + totalSize: 8, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `hub` | [shared.Hub](../../../sdk/models/shared/hub.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrelateditemsrequest.md b/docs/sdk/models/operations/getrelateditemsrequest.md new file mode 100644 index 00000000..731e0fc8 --- /dev/null +++ b/docs/sdk/models/operations/getrelateditemsrequest.md @@ -0,0 +1,27 @@ +# GetRelatedItemsRequest + +## Example Usage + +```typescript +import { GetRelatedItemsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetRelatedItemsRequest = { + ids: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrelateditemsresponse.md b/docs/sdk/models/operations/getrelateditemsresponse.md new file mode 100644 index 00000000..3566fadb --- /dev/null +++ b/docs/sdk/models/operations/getrelateditemsresponse.md @@ -0,0 +1,21 @@ +# GetRelatedItemsResponse + +## Example Usage + +```typescript +import { GetRelatedItemsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetRelatedItemsResponse = { + contentType: "", + statusCode: 310088, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetRelatedItemsResponseBody](../../../sdk/models/operations/getrelateditemsresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getrelateditemsresponsebody.md b/docs/sdk/models/operations/getrelateditemsresponsebody.md new file mode 100644 index 00000000..97f29dc8 --- /dev/null +++ b/docs/sdk/models/operations/getrelateditemsresponsebody.md @@ -0,0 +1,183 @@ +# GetRelatedItemsResponseBody + +OK + +## Example Usage + +```typescript +import { GetRelatedItemsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetRelatedItemsResponseBody = { + mediaContainer: { + hub: [ + { + type: "track", + context: "hub.home.onDeck", + hubIdentifier: "home.onDeck", + key: "/hubs/sections/home/onDeck", + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: + "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + size: 1, + subtype: "podcast", + totalSize: 8, + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetRelatedItemsMediaContainer](../../../sdk/models/operations/getrelateditemsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getresizedphotorequest.md b/docs/sdk/models/operations/getresizedphotorequest.md deleted file mode 100644 index 385c0478..00000000 --- a/docs/sdk/models/operations/getresizedphotorequest.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetResizedPhotoRequest - -## Example Usage - -```typescript -import { GetResizedPhotoRequest, MinSize, Upscale } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetResizedPhotoRequest = { - width: 110, - height: 165, - blur: 0, - minSize: MinSize.One, - upscale: Upscale.Zero, - url: "/library/metadata/49564/thumb/1654258204", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| `width` | *number* | :heavy_check_mark: | The width for the resized photo | 110 | -| `height` | *number* | :heavy_check_mark: | The height for the resized photo | 165 | -| `opacity` | *number* | :heavy_check_mark: | The opacity for the resized photo | | -| `blur` | *number* | :heavy_check_mark: | The width for the resized photo | 0 | -| `minSize` | [operations.MinSize](../../../sdk/models/operations/minsize.md) | :heavy_check_mark: | images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. | | -| `upscale` | [operations.Upscale](../../../sdk/models/operations/upscale.md) | :heavy_check_mark: | allow images to be resized beyond native dimensions. | | -| `url` | *string* | :heavy_check_mark: | path to image within Plex | /library/metadata/49564/thumb/1654258204 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getresizedphotoresponse.md b/docs/sdk/models/operations/getresizedphotoresponse.md deleted file mode 100644 index 8b481b13..00000000 --- a/docs/sdk/models/operations/getresizedphotoresponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetResizedPhotoResponse - -## Example Usage - -```typescript -import { GetResizedPhotoResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetResizedPhotoResponse = { - contentType: "", - statusCode: 790843, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getresourcesstatisticsmediacontainer.md b/docs/sdk/models/operations/getresourcesstatisticsmediacontainer.md deleted file mode 100644 index aa1f4bc7..00000000 --- a/docs/sdk/models/operations/getresourcesstatisticsmediacontainer.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetResourcesStatisticsMediaContainer - -## Example Usage - -```typescript -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, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 5497 | -| `statisticsResources` | [operations.StatisticsResources](../../../sdk/models/operations/statisticsresources.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getresourcesstatisticsrequest.md b/docs/sdk/models/operations/getresourcesstatisticsrequest.md deleted file mode 100644 index 18adc7e3..00000000 --- a/docs/sdk/models/operations/getresourcesstatisticsrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetResourcesStatisticsRequest - -## Example Usage - -```typescript -import { GetResourcesStatisticsRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetResourcesStatisticsRequest = { - timespan: 4, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `timespan` | *number* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| 4 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getresourcesstatisticsresponse.md b/docs/sdk/models/operations/getresourcesstatisticsresponse.md deleted file mode 100644 index 249067c4..00000000 --- a/docs/sdk/models/operations/getresourcesstatisticsresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetResourcesStatisticsResponse - -## Example Usage - -```typescript -import { GetResourcesStatisticsResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetResourcesStatisticsResponse = { - contentType: "", - statusCode: 925394, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetResourcesStatisticsResponseBody](../../../sdk/models/operations/getresourcesstatisticsresponsebody.md) | :heavy_minus_sign: | Resource Statistics | \ No newline at end of file diff --git a/docs/sdk/models/operations/getresourcesstatisticsresponsebody.md b/docs/sdk/models/operations/getresourcesstatisticsresponsebody.md deleted file mode 100644 index 0719ca66..00000000 --- a/docs/sdk/models/operations/getresourcesstatisticsresponsebody.md +++ /dev/null @@ -1,31 +0,0 @@ -# GetResourcesStatisticsResponseBody - -Resource Statistics - -## Example Usage - -```typescript -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, - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetResourcesStatisticsMediaContainer](../../../sdk/models/operations/getresourcesstatisticsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getscheduledrecordingsmediacontainer.md b/docs/sdk/models/operations/getscheduledrecordingsmediacontainer.md new file mode 100644 index 00000000..50f8d42a --- /dev/null +++ b/docs/sdk/models/operations/getscheduledrecordingsmediacontainer.md @@ -0,0 +1,178 @@ +# GetScheduledRecordingsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetScheduledRecordingsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetScheduledRecordingsMediaContainer = { + mediaGrabOperation: [ + { + metadata: { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `mediaGrabOperation` | [shared.MediaGrabOperation](../../../sdk/models/shared/mediagraboperation.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getscheduledrecordingsresponse.md b/docs/sdk/models/operations/getscheduledrecordingsresponse.md new file mode 100644 index 00000000..f0c1f940 --- /dev/null +++ b/docs/sdk/models/operations/getscheduledrecordingsresponse.md @@ -0,0 +1,26 @@ +# GetScheduledRecordingsResponse + +## Example Usage + +```typescript +import { GetScheduledRecordingsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetScheduledRecordingsResponse = { + contentType: "", + statusCode: 442897, + headers: { + "key": [], + "key1": [], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetScheduledRecordingsResponseBody](../../../sdk/models/operations/getscheduledrecordingsresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getscheduledrecordingsresponsebody.md b/docs/sdk/models/operations/getscheduledrecordingsresponsebody.md new file mode 100644 index 00000000..69eff619 --- /dev/null +++ b/docs/sdk/models/operations/getscheduledrecordingsresponsebody.md @@ -0,0 +1,173 @@ +# GetScheduledRecordingsResponseBody + +OK + +## Example Usage + +```typescript +import { GetScheduledRecordingsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetScheduledRecordingsResponseBody = { + mediaContainer: { + mediaGrabOperation: [ + { + metadata: { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetScheduledRecordingsMediaContainer](../../../sdk/models/operations/getscheduledrecordingsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariescountry.md b/docs/sdk/models/operations/getsearchalllibrariescountry.md deleted file mode 100644 index 7824acb0..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariescountry.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetSearchAllLibrariesCountry - -## Example Usage - -```typescript -import { GetSearchAllLibrariesCountry } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesCountry = { - id: 259, - tag: "United States of America", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | The unique identifier for the country.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | -| `tag` | *string* | :heavy_check_mark: | The country of origin of this media item | United States of America | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesdirector.md b/docs/sdk/models/operations/getsearchalllibrariesdirector.md deleted file mode 100644 index 54c16fa2..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariesdirector.md +++ /dev/null @@ -1,22 +0,0 @@ -# GetSearchAllLibrariesDirector - -## Example Usage - -```typescript -import { GetSearchAllLibrariesDirector } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesDirector = { - id: 126522, - tag: "Danny Boyle", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | Unique identifier for the director. | 126522 | -| `tag` | *string* | :heavy_check_mark: | The role of Director | Danny Boyle | -| `thumb` | *string* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the director. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesdirectory.md b/docs/sdk/models/operations/getsearchalllibrariesdirectory.md deleted file mode 100644 index c52c6962..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariesdirectory.md +++ /dev/null @@ -1,40 +0,0 @@ -# GetSearchAllLibrariesDirectory - -## Example Usage - -```typescript -import { GetSearchAllLibrariesDirectory } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesDirectory = { - key: "/library/sections/3/all?actor=197429", - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - librarySectionTitle: "Movies", - type: "tag", - id: 197429, - filter: "actor=197429", - tag: "Ben Stiller", - tagKey: "5d776826999c64001ec2c606", - thumb: - "https://metadata-static.plex.tv/5/people/57bd7c7d6c5c9e2881251b30e5603d3d.jpg", - count: 10, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `key` | *string* | :heavy_check_mark: | The unique identifier path for the search result item. | /library/sections/3/all?actor=197429 | -| `librarySectionID` | *number* | :heavy_check_mark: | The identifier for the library section. | 1 | -| `librarySectionKey` | *string* | :heavy_check_mark: | The key corresponding to the library section. | /library/sections/1 | -| `librarySectionTitle` | *string* | :heavy_check_mark: | The title of the library section. | Movies | -| `librarySectionType` | *number* | :heavy_minus_sign: | N/A | | -| `type` | *string* | :heavy_check_mark: | The type of the directory. | tag | -| `id` | *number* | :heavy_check_mark: | N/A | 197429 | -| `filter` | *string* | :heavy_minus_sign: | The filter string used to query this specific item in the library. | actor=197429 | -| `tag` | *string* | :heavy_check_mark: | N/A | Ben Stiller | -| `tagType` | *number* | :heavy_minus_sign: | The type of tag associated with this search result (e.g., Director, Actor). | | -| `tagKey` | *string* | :heavy_minus_sign: | The unique identifier for the tag associated with this search result. | 5d776826999c64001ec2c606 | -| `thumb` | *string* | :heavy_minus_sign: | The URL to the thumbnail image associated with this search result. | https://metadata-static.plex.tv/5/people/57bd7c7d6c5c9e2881251b30e5603d3d.jpg | -| `count` | *number* | :heavy_minus_sign: | The number of items associated with this search result. | 10 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesflattenseasons.md b/docs/sdk/models/operations/getsearchalllibrariesflattenseasons.md deleted file mode 100644 index b43f702f..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariesflattenseasons.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetSearchAllLibrariesFlattenSeasons - -Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). - - -## Example Usage - -```typescript -import { GetSearchAllLibrariesFlattenSeasons } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesFlattenSeasons = - GetSearchAllLibrariesFlattenSeasons.Show; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `LibraryDefault` | -1 | -| `Hide` | 0 | -| `Show` | 1 | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesgenre.md b/docs/sdk/models/operations/getsearchalllibrariesgenre.md deleted file mode 100644 index a3a1254c..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariesgenre.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetSearchAllLibrariesGenre - -## Example Usage - -```typescript -import { GetSearchAllLibrariesGenre } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesGenre = { - id: 259, - tag: "Crime", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | The unique identifier for the genre.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | -| `tag` | *string* | :heavy_check_mark: | The genre name of this media-item
| Crime | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesguids.md b/docs/sdk/models/operations/getsearchalllibrariesguids.md deleted file mode 100644 index 77d206ba..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariesguids.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetSearchAllLibrariesGuids - -## Example Usage - -```typescript -import { GetSearchAllLibrariesGuids } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesGuids = { - id: - "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
| {
"imdbExample": {
"summary": "IMDB example",
"value": "imdb://tt13015952"
},
"tmdbExample": {
"summary": "TMDB example",
"value": "tmdb://2434012"
},
"tvdbExample": {
"summary": "TVDB example",
"value": "tvdb://7945991"
}
} | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrarieshasthumbnail.md b/docs/sdk/models/operations/getsearchalllibrarieshasthumbnail.md deleted file mode 100644 index 6d2d43c4..00000000 --- a/docs/sdk/models/operations/getsearchalllibrarieshasthumbnail.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetSearchAllLibrariesHasThumbnail - -Indicates if the part has a thumbnail. - - -## Example Usage - -```typescript -import { GetSearchAllLibrariesHasThumbnail } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesHasThumbnail = - GetSearchAllLibrariesHasThumbnail.True; -``` - -## Values - -| Name | Value | -| ------- | ------- | -| `False` | 0 | -| `True` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesimage.md b/docs/sdk/models/operations/getsearchalllibrariesimage.md deleted file mode 100644 index cce8be96..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariesimage.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetSearchAllLibrariesImage - -## Example Usage - -```typescript -import { GetSearchAllLibrariesImage, GetSearchAllLibrariesLibraryType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesImage = { - alt: "Episode 1", - type: GetSearchAllLibrariesLibraryType.Background, - url: "/library/metadata/45521/thumb/1644710589", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `alt` | *string* | :heavy_check_mark: | N/A | Episode 1 | -| `type` | [operations.GetSearchAllLibrariesLibraryType](../../../sdk/models/operations/getsearchalllibrarieslibrarytype.md) | :heavy_check_mark: | N/A | background | -| `url` | *string* | :heavy_check_mark: | N/A | /library/metadata/45521/thumb/1644710589 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrarieslibraryoptimizedforstreaming.md b/docs/sdk/models/operations/getsearchalllibrarieslibraryoptimizedforstreaming.md deleted file mode 100644 index 46d33d06..00000000 --- a/docs/sdk/models/operations/getsearchalllibrarieslibraryoptimizedforstreaming.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetSearchAllLibrariesLibraryOptimizedForStreaming - -Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - - - -## Supported Types - -### `operations.GetSearchAllLibrariesOptimizedForStreamingLibrary1` - -```typescript -const value: operations.GetSearchAllLibrariesOptimizedForStreamingLibrary1 = - GetSearchAllLibrariesOptimizedForStreamingLibrary1.Zero; -``` - -### `boolean` - -```typescript -const value: boolean = true; -``` - diff --git a/docs/sdk/models/operations/getsearchalllibrarieslibrarytype.md b/docs/sdk/models/operations/getsearchalllibrarieslibrarytype.md deleted file mode 100644 index 8683ea1a..00000000 --- a/docs/sdk/models/operations/getsearchalllibrarieslibrarytype.md +++ /dev/null @@ -1,22 +0,0 @@ -# GetSearchAllLibrariesLibraryType - -## Example Usage - -```typescript -import { GetSearchAllLibrariesLibraryType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesLibraryType = - GetSearchAllLibrariesLibraryType.Background; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `CoverPoster` | coverPoster | -| `Background` | background | -| `Snapshot` | snapshot | -| `ClearLogo` | clearLogo | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrarieslocation.md b/docs/sdk/models/operations/getsearchalllibrarieslocation.md deleted file mode 100644 index 2cc98a1a..00000000 --- a/docs/sdk/models/operations/getsearchalllibrarieslocation.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetSearchAllLibrariesLocation - -The folder path for the media item. - -## Example Usage - -```typescript -import { GetSearchAllLibrariesLocation } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesLocation = { - path: "/TV Shows/Clarkson's Farm", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `path` | *string* | :heavy_check_mark: | N/A | /TV Shows/Clarkson's Farm | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesmedia.md b/docs/sdk/models/operations/getsearchalllibrariesmedia.md deleted file mode 100644 index 54dbb3ca..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariesmedia.md +++ /dev/null @@ -1,69 +0,0 @@ -# GetSearchAllLibrariesMedia - -## Example Usage - -```typescript -import { GetSearchAllLibrariesHasThumbnail, GetSearchAllLibrariesMedia } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesMedia = { - id: 387322, - duration: 9610350, - bitrate: 25512, - width: 3840, - height: 1602, - aspectRatio: 2.35, - audioChannels: 6, - displayOffset: 50, - audioCodec: "aac", - videoCodec: "hevc", - videoResolution: "4k", - container: "mp4", - videoFrameRate: "24p", - videoProfile: "main 10", - hasVoiceActivity: false, - audioProfile: "dts", - has64bitOffsets: false, - part: [ - { - accessible: true, - exists: true, - id: 418385, - key: "/library/parts/418385/1735864239/file.mkv", - indexes: "sd", - duration: 9610350, - file: "/mnt/Movies_1/W/Wicked (2024).mkv", - size: 30649952104, - packetLength: 188, - container: "mkv", - videoProfile: "main 10", - audioProfile: "dts", - has64bitOffsets: false, - hasThumbnail: GetSearchAllLibrariesHasThumbnail.True, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | Unique media identifier. | 387322 | -| `duration` | *number* | :heavy_minus_sign: | Duration of the media in milliseconds. | 9610350 | -| `bitrate` | *number* | :heavy_minus_sign: | Bitrate in bits per second. | 25512 | -| `width` | *number* | :heavy_minus_sign: | Video width in pixels. | 3840 | -| `height` | *number* | :heavy_minus_sign: | Video height in pixels. | 1602 | -| `aspectRatio` | *number* | :heavy_minus_sign: | Aspect ratio of the video. | 2.35 | -| `audioChannels` | *number* | :heavy_minus_sign: | Number of audio channels. | 6 | -| `displayOffset` | *number* | :heavy_minus_sign: | N/A | 50 | -| `audioCodec` | *string* | :heavy_minus_sign: | Audio codec used. | aac | -| `videoCodec` | *string* | :heavy_minus_sign: | Video codec used. | hevc | -| `videoResolution` | *string* | :heavy_minus_sign: | Video resolution (e.g., 4k). | 4k | -| `container` | *string* | :heavy_minus_sign: | Container format of the media. | mp4 | -| `videoFrameRate` | *string* | :heavy_minus_sign: | Frame rate of the video. Values found include NTSC, PAL, 24p
| 24p | -| `videoProfile` | *string* | :heavy_minus_sign: | Video profile (e.g., main 10). | main 10 | -| `hasVoiceActivity` | *boolean* | :heavy_minus_sign: | Indicates whether voice activity is detected. | false | -| `audioProfile` | *string* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `optimizedForStreaming` | *operations.GetSearchAllLibrariesOptimizedForStreaming* | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | -| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | Indicates whether the media has 64-bit offsets.
This is relevant for media files that may require larger offsets than what 32-bit integers can provide.
| false | -| `part` | [operations.GetSearchAllLibrariesPart](../../../sdk/models/operations/getsearchalllibrariespart.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesmediacontainer.md b/docs/sdk/models/operations/getsearchalllibrariesmediacontainer.md deleted file mode 100644 index 375e1e5a..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariesmediacontainer.md +++ /dev/null @@ -1,33 +0,0 @@ -# GetSearchAllLibrariesMediaContainer - -## Example Usage - -```typescript -import { GetSearchAllLibrariesMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesMediaContainer = { - size: 50, - allowSync: false, - identifier: "com.plexapp.plugins.library", - librarySectionID: 2, - librarySectionTitle: "TV Series", - librarySectionUUID: "e69655a2-ef48-4aba-bb19-0cc34d1e7d36", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1734362201, - searchResult: [], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `size` | *number* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `identifier` | *string* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `librarySectionID` | *number* | :heavy_minus_sign: | The unique identifier for the library section. | 2 | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | The title of the library section. | TV Series | -| `librarySectionUUID` | *string* | :heavy_minus_sign: | The universally unique identifier for the library section. | e69655a2-ef48-4aba-bb19-0cc34d1e7d36 | -| `mediaTagPrefix` | *string* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | -| `mediaTagVersion` | *number* | :heavy_check_mark: | The version number for media tags. | 1734362201 | -| `searchResult` | [operations.SearchResult](../../../sdk/models/operations/searchresult.md)[] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesmetadata.md b/docs/sdk/models/operations/getsearchalllibrariesmetadata.md deleted file mode 100644 index 904494e0..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariesmetadata.md +++ /dev/null @@ -1,264 +0,0 @@ -# GetSearchAllLibrariesMetadata - -Unknown - - -## Example Usage - -```typescript -import { - GetSearchAllLibrariesFlattenSeasons, - GetSearchAllLibrariesHasThumbnail, - GetSearchAllLibrariesLibraryType, - GetSearchAllLibrariesMetadata, - GetSearchAllLibrariesShowOrdering, - GetSearchAllLibrariesType, -} from "@lukehagar/plexjs/sdk/models/operations"; -import { RFCDate } from "@lukehagar/plexjs/sdk/types"; - -let value: GetSearchAllLibrariesMetadata = { - ratingKey: "58683", - key: "/library/metadata/58683", - guid: "plex://movie/5d7768ba96b655001fdc0408", - slug: "4-for-texas", - studio: "20th Century Studios", - type: GetSearchAllLibrariesType.Movie, - title: "Avatar: The Way of Water", - banner: "/library/metadata/58683/banner/1703239236", - titleSort: "Whale", - contentRating: "PG-13", - summary: - "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\n" - + "Once a familiar threat returns to finish what was previously started, Jake must\n" - + "work with Neytiri and the army of the Na'vi race to protect their home.\n" - + "", - rating: 7.6, - audienceRating: 9.2, - year: 2022, - tagline: "Return to Pandora.", - thumb: "/library/metadata/58683/thumb/1703239236", - art: "/library/metadata/58683/art/1703239236", - theme: "/library/metadata/1/theme/1705636920", - index: 1, - leafCount: 14, - viewedLeafCount: 0, - childCount: 1, - seasonCount: 2022, - duration: 11558112, - originallyAvailableAt: new RFCDate("2022-12-14"), - addedAt: 1556281940, - updatedAt: 1556281940, - parentYear: 2010, - audienceRatingImage: "rottentomatoes://image.rating.upright", - chapterSource: "media", - primaryExtraKey: "/library/metadata/58684", - originalTitle: "映画 ブラッククローバー 魔法帝の剣", - parentRatingKey: "66", - grandparentRatingKey: "66", - parentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentSlug: "alice-in-borderland-2020", - grandparentKey: "/library/metadata/66", - parentKey: "/library/metadata/66", - grandparentTitle: "Caprica", - grandparentThumb: "/library/metadata/66/thumb/1705716261", - grandparentTheme: "/library/metadata/66/theme/1705716261", - grandparentArt: "/library/metadata/66/art/1705716261", - parentTitle: "Caprica", - parentIndex: 1, - parentThumb: "/library/metadata/66/thumb/1705716261", - ratingImage: "rottentomatoes://image.rating.ripe", - viewCount: 1, - viewOffset: 5222500, - skipCount: 1, - subtype: "clip", - lastRatedAt: 1721813113, - createdAtAccuracy: "epoch,local", - createdAtTZOffset: "0", - lastViewedAt: 1682752242, - userRating: 10, - image: [ - { - alt: "Episode 1", - type: GetSearchAllLibrariesLibraryType.Background, - url: "/library/metadata/45521/thumb/1644710589", - }, - ], - ultraBlurColors: { - topLeft: "11333b", - topRight: "0a232d", - bottomRight: "73958", - bottomLeft: "1f5066", - }, - guids: [ - { - id: - "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}", - }, - ], - librarySectionID: 1, - librarySectionTitle: "Movies", - librarySectionKey: "/library/sections/1", - showOrdering: GetSearchAllLibrariesShowOrdering.TvdbAbsolute, - flattenSeasons: GetSearchAllLibrariesFlattenSeasons.Show, - skipChildren: false, - media: [ - { - id: 387322, - duration: 9610350, - bitrate: 25512, - width: 3840, - height: 1602, - aspectRatio: 2.35, - audioChannels: 6, - displayOffset: 50, - audioCodec: "aac", - videoCodec: "hevc", - videoResolution: "4k", - container: "mp4", - videoFrameRate: "24p", - videoProfile: "main 10", - hasVoiceActivity: false, - audioProfile: "dts", - has64bitOffsets: false, - part: [ - { - accessible: true, - exists: true, - id: 418385, - key: "/library/parts/418385/1735864239/file.mkv", - indexes: "sd", - duration: 9610350, - file: "/mnt/Movies_1/W/Wicked (2024).mkv", - size: 30649952104, - packetLength: 188, - container: "mkv", - videoProfile: "main 10", - audioProfile: "dts", - has64bitOffsets: false, - hasThumbnail: GetSearchAllLibrariesHasThumbnail.True, - }, - ], - }, - ], - genre: [ - { - id: 259, - tag: "Crime", - }, - ], - country: [ - { - id: 259, - tag: "United States of America", - }, - ], - director: [ - { - id: 126522, - tag: "Danny Boyle", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", - }, - ], - writer: [ - { - id: 126522, - tag: "Jamie P. Hanson", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", - }, - ], - role: [ - { - id: 126522, - tag: "Teller", - role: "Self - Judge", - thumb: - "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg", - }, - ], - location: [ - { - path: "/TV Shows/Clarkson's Farm", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *string* | :heavy_check_mark: | The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. | 58683 | -| `key` | *string* | :heavy_check_mark: | The unique key for the media item. | /library/metadata/58683 | -| `guid` | *string* | :heavy_check_mark: | The globally unique identifier for the media item. | plex://movie/5d7768ba96b655001fdc0408 | -| `slug` | *string* | :heavy_check_mark: | A URL‐friendly version of the media title. | 4-for-texas | -| `studio` | *string* | :heavy_minus_sign: | The studio that produced the media item. | 20th Century Studios | -| `type` | [operations.GetSearchAllLibrariesType](../../../sdk/models/operations/getsearchalllibrariestype.md) | :heavy_check_mark: | N/A | movie | -| `title` | *string* | :heavy_check_mark: | The title of the media item. | Avatar: The Way of Water | -| `banner` | *string* | :heavy_check_mark: | The banner image URL for the media item. | /library/metadata/58683/banner/1703239236 | -| `titleSort` | *string* | :heavy_check_mark: | The sort title used for ordering media items. | Whale | -| `contentRating` | *string* | :heavy_minus_sign: | The content rating for the media item. | PG-13 | -| `summary` | *string* | :heavy_check_mark: | A synopsis of the media item. | 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` | *number* | :heavy_check_mark: | The critic rating for the media item. | 7.6 | -| `audienceRating` | *number* | :heavy_check_mark: | The audience rating for the media item. | 9.2 | -| `year` | *number* | :heavy_minus_sign: | The release year of the media item. | 2022 | -| `tagline` | *string* | :heavy_check_mark: | A brief tagline for the media item. | Return to Pandora. | -| `thumb` | *string* | :heavy_check_mark: | The thumbnail image URL for the media item. | /library/metadata/58683/thumb/1703239236 | -| `art` | *string* | :heavy_check_mark: | The art image URL for the media item. | /library/metadata/58683/art/1703239236 | -| `theme` | *string* | :heavy_check_mark: | The theme URL for the media item. | /library/metadata/1/theme/1705636920 | -| `index` | *number* | :heavy_check_mark: | The index position of the media item. | 1 | -| `leafCount` | *number* | :heavy_minus_sign: | The number of leaf items (end nodes) under this media item. | 14 | -| `viewedLeafCount` | *number* | :heavy_minus_sign: | The number of leaf items that have been viewed. | 0 | -| `childCount` | *number* | :heavy_check_mark: | The number of child items associated with this media item. | 1 | -| `seasonCount` | *number* | :heavy_check_mark: | The total number of seasons (for TV shows). | 2022 | -| `duration` | *number* | :heavy_check_mark: | The duration of the media item in milliseconds. | 11558112 | -| `originallyAvailableAt` | [RFCDate](../../../types/rfcdate.md) | :heavy_minus_sign: | The original release date of the media item. | 2022-12-14 | -| `addedAt` | *number* | :heavy_check_mark: | N/A | 1556281940 | -| `updatedAt` | *number* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 | -| `parentYear` | *number* | :heavy_minus_sign: | The release year of the parent media item. | 2010 | -| `audienceRatingImage` | *string* | :heavy_minus_sign: | The URL for the audience rating image. | rottentomatoes://image.rating.upright | -| `chapterSource` | *string* | :heavy_minus_sign: | The source from which chapter data is derived. | media | -| `primaryExtraKey` | *string* | :heavy_minus_sign: | The primary extra key associated with this media item. | /library/metadata/58684 | -| `originalTitle` | *string* | :heavy_minus_sign: | The original title of the media item (if different). | 映画 ブラッククローバー 魔法帝の剣 | -| `parentRatingKey` | *string* | :heavy_minus_sign: | The rating key of the parent media item. | 66 | -| `grandparentRatingKey` | *string* | :heavy_minus_sign: | The rating key of the grandparent media item. | 66 | -| `parentGuid` | *string* | :heavy_minus_sign: | The GUID of the parent media item. | plex://show/5d9c081b170e24001f2a7be4 | -| `grandparentGuid` | *string* | :heavy_minus_sign: | The GUID of the grandparent media item. | plex://show/5d9c081b170e24001f2a7be4 | -| `grandparentSlug` | *string* | :heavy_minus_sign: | The slug for the grandparent media item. | alice-in-borderland-2020 | -| `grandparentKey` | *string* | :heavy_minus_sign: | The key of the grandparent media item. | /library/metadata/66 | -| `parentKey` | *string* | :heavy_minus_sign: | The key of the parent media item. | /library/metadata/66 | -| `grandparentTitle` | *string* | :heavy_minus_sign: | The title of the grandparent media item. | Caprica | -| `grandparentThumb` | *string* | :heavy_minus_sign: | The thumbnail URL for the grandparent media item. | /library/metadata/66/thumb/1705716261 | -| `grandparentTheme` | *string* | :heavy_minus_sign: | The theme URL for the grandparent media item. | /library/metadata/66/theme/1705716261 | -| `grandparentArt` | *string* | :heavy_minus_sign: | The art URL for the grandparent media item. | /library/metadata/66/art/1705716261 | -| `parentTitle` | *string* | :heavy_minus_sign: | The title of the parent media item. | Caprica | -| `parentIndex` | *number* | :heavy_minus_sign: | The index position of the parent media item. | 1 | -| `parentThumb` | *string* | :heavy_minus_sign: | The thumbnail URL for the parent media item. | /library/metadata/66/thumb/1705716261 | -| `ratingImage` | *string* | :heavy_minus_sign: | The URL for the rating image. | rottentomatoes://image.rating.ripe | -| `viewCount` | *number* | :heavy_minus_sign: | The number of times this media item has been viewed. | 1 | -| `viewOffset` | *number* | :heavy_minus_sign: | The current playback offset (in milliseconds). | 5222500 | -| `skipCount` | *number* | :heavy_minus_sign: | The number of times this media item has been skipped. | 1 | -| `subtype` | *string* | :heavy_minus_sign: | A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. | clip | -| `lastRatedAt` | *number* | :heavy_minus_sign: | The Unix timestamp representing the last time the item was rated. | 1721813113 | -| `createdAtAccuracy` | *string* | :heavy_minus_sign: | The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). | epoch,local | -| `createdAtTZOffset` | *string* | :heavy_minus_sign: | The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. | 0 | -| `lastViewedAt` | *number* | :heavy_minus_sign: | Unix timestamp for when the media item was last viewed. | 1682752242 | -| `userRating` | *number* | :heavy_minus_sign: | The rating provided by a user for the item. This value is expressed as a decimal number. | 10 | -| `image` | [operations.GetSearchAllLibrariesImage](../../../sdk/models/operations/getsearchalllibrariesimage.md)[] | :heavy_minus_sign: | N/A | | -| `ultraBlurColors` | [operations.GetSearchAllLibrariesUltraBlurColors](../../../sdk/models/operations/getsearchalllibrariesultrablurcolors.md) | :heavy_minus_sign: | N/A | | -| `guids` | [operations.GetSearchAllLibrariesGuids](../../../sdk/models/operations/getsearchalllibrariesguids.md)[] | :heavy_minus_sign: | N/A | | -| `librarySectionID` | *number* | :heavy_minus_sign: | The identifier for the library section. | 1 | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | The title of the library section. | Movies | -| `librarySectionKey` | *string* | :heavy_minus_sign: | The key corresponding to the library section. | /library/sections/1 | -| `showOrdering` | [operations.GetSearchAllLibrariesShowOrdering](../../../sdk/models/operations/getsearchalllibrariesshowordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show.
Options:
- None = Library default
- tmdbAiring = The Movie Database (Aired)
- aired = TheTVDB (Aired)
- dvd = TheTVDB (DVD)
- absolute = TheTVDB (Absolute)
| absolute | -| `flattenSeasons` | [operations.GetSearchAllLibrariesFlattenSeasons](../../../sdk/models/operations/getsearchalllibrariesflattenseasons.md) | :heavy_minus_sign: | Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
| 1 | -| `skipChildren` | *boolean* | :heavy_minus_sign: | Indicates whether child items should be skipped. | false | -| `media` | [operations.GetSearchAllLibrariesMedia](../../../sdk/models/operations/getsearchalllibrariesmedia.md)[] | :heavy_minus_sign: | N/A | | -| `genre` | [operations.GetSearchAllLibrariesGenre](../../../sdk/models/operations/getsearchalllibrariesgenre.md)[] | :heavy_minus_sign: | N/A | | -| `country` | [operations.GetSearchAllLibrariesCountry](../../../sdk/models/operations/getsearchalllibrariescountry.md)[] | :heavy_minus_sign: | N/A | | -| `director` | [operations.GetSearchAllLibrariesDirector](../../../sdk/models/operations/getsearchalllibrariesdirector.md)[] | :heavy_minus_sign: | N/A | | -| `writer` | [operations.GetSearchAllLibrariesWriter](../../../sdk/models/operations/getsearchalllibrarieswriter.md)[] | :heavy_minus_sign: | N/A | | -| `role` | [operations.GetSearchAllLibrariesRole](../../../sdk/models/operations/getsearchalllibrariesrole.md)[] | :heavy_minus_sign: | N/A | | -| `location` | [operations.GetSearchAllLibrariesLocation](../../../sdk/models/operations/getsearchalllibrarieslocation.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesoptimizedforstreaming.md b/docs/sdk/models/operations/getsearchalllibrariesoptimizedforstreaming.md deleted file mode 100644 index ff3ac76a..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariesoptimizedforstreaming.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetSearchAllLibrariesOptimizedForStreaming - -Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - - -## Supported Types - -### `operations.GetSearchAllLibrariesOptimizedForStreaming1` - -```typescript -const value: operations.GetSearchAllLibrariesOptimizedForStreaming1 = - GetSearchAllLibrariesOptimizedForStreaming1.One; -``` - -### `boolean` - -```typescript -const value: boolean = true; -``` - diff --git a/docs/sdk/models/operations/getsearchalllibrariesoptimizedforstreaming1.md b/docs/sdk/models/operations/getsearchalllibrariesoptimizedforstreaming1.md deleted file mode 100644 index 0b86a3e8..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariesoptimizedforstreaming1.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetSearchAllLibrariesOptimizedForStreaming1 - -## Example Usage - -```typescript -import { GetSearchAllLibrariesOptimizedForStreaming1 } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesOptimizedForStreaming1 = - GetSearchAllLibrariesOptimizedForStreaming1.Zero; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesoptimizedforstreaminglibrary1.md b/docs/sdk/models/operations/getsearchalllibrariesoptimizedforstreaminglibrary1.md deleted file mode 100644 index e145beaa..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariesoptimizedforstreaminglibrary1.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetSearchAllLibrariesOptimizedForStreamingLibrary1 - -## Example Usage - -```typescript -import { GetSearchAllLibrariesOptimizedForStreamingLibrary1 } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesOptimizedForStreamingLibrary1 = - GetSearchAllLibrariesOptimizedForStreamingLibrary1.One; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariespart.md b/docs/sdk/models/operations/getsearchalllibrariespart.md deleted file mode 100644 index 03ab656a..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariespart.md +++ /dev/null @@ -1,44 +0,0 @@ -# GetSearchAllLibrariesPart - -## Example Usage - -```typescript -import { GetSearchAllLibrariesHasThumbnail, GetSearchAllLibrariesPart } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesPart = { - accessible: true, - exists: true, - id: 418385, - key: "/library/parts/418385/1735864239/file.mkv", - indexes: "sd", - duration: 9610350, - file: "/mnt/Movies_1/W/Wicked (2024).mkv", - size: 30649952104, - packetLength: 188, - container: "mkv", - videoProfile: "main 10", - audioProfile: "dts", - has64bitOffsets: false, - hasThumbnail: GetSearchAllLibrariesHasThumbnail.True, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `accessible` | *boolean* | :heavy_minus_sign: | Indicates if the part is accessible. | true | -| `exists` | *boolean* | :heavy_minus_sign: | Indicates if the part exists. | true | -| `id` | *number* | :heavy_check_mark: | Unique part identifier. | 418385 | -| `key` | *string* | :heavy_minus_sign: | Key to access this part. | /library/parts/418385/1735864239/file.mkv | -| `indexes` | *string* | :heavy_minus_sign: | N/A | sd | -| `duration` | *number* | :heavy_minus_sign: | Duration of the part in milliseconds. | 9610350 | -| `file` | *string* | :heavy_minus_sign: | File path for the part. | /mnt/Movies_1/W/Wicked (2024).mkv | -| `size` | *number* | :heavy_minus_sign: | File size in bytes. | 30649952104 | -| `packetLength` | *number* | :heavy_minus_sign: | N/A | 188 | -| `container` | *string* | :heavy_minus_sign: | Container format of the part. | mkv | -| `videoProfile` | *string* | :heavy_minus_sign: | Video profile for the part. | main 10 | -| `audioProfile` | *string* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | -| `optimizedForStreaming` | *operations.GetSearchAllLibrariesLibraryOptimizedForStreaming* | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
| | -| `hasThumbnail` | [operations.GetSearchAllLibrariesHasThumbnail](../../../sdk/models/operations/getsearchalllibrarieshasthumbnail.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesqueryparamincludecollections.md b/docs/sdk/models/operations/getsearchalllibrariesqueryparamincludecollections.md deleted file mode 100644 index 4346490d..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariesqueryparamincludecollections.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetSearchAllLibrariesQueryParamIncludeCollections - -Whether to include collections in the search results. - -## Example Usage - -```typescript -import { GetSearchAllLibrariesQueryParamIncludeCollections } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesQueryParamIncludeCollections = - GetSearchAllLibrariesQueryParamIncludeCollections.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesqueryparamincludeexternalmedia.md b/docs/sdk/models/operations/getsearchalllibrariesqueryparamincludeexternalmedia.md deleted file mode 100644 index e1ea075f..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariesqueryparamincludeexternalmedia.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetSearchAllLibrariesQueryParamIncludeExternalMedia - -Whether to include external media in the search results. - -## Example Usage - -```typescript -import { GetSearchAllLibrariesQueryParamIncludeExternalMedia } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesQueryParamIncludeExternalMedia = - GetSearchAllLibrariesQueryParamIncludeExternalMedia.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesrequest.md b/docs/sdk/models/operations/getsearchalllibrariesrequest.md deleted file mode 100644 index 1a8fc1f0..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariesrequest.md +++ /dev/null @@ -1,34 +0,0 @@ -# GetSearchAllLibrariesRequest - -## Example Usage - -```typescript -import { - GetSearchAllLibrariesQueryParamIncludeCollections, - GetSearchAllLibrariesQueryParamIncludeExternalMedia, - GetSearchAllLibrariesRequest, - SearchTypes, -} from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesRequest = { - query: "", - clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", - searchTypes: [ - SearchTypes.People, - ], - includeCollections: GetSearchAllLibrariesQueryParamIncludeCollections.Enable, - includeExternalMedia: - GetSearchAllLibrariesQueryParamIncludeExternalMedia.Enable, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `query` | *string* | :heavy_check_mark: | The search query term. | | -| `clientID` | *string* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | -| `limit` | *number* | :heavy_minus_sign: | Limit the number of results returned. | | -| `searchTypes` | [operations.SearchTypes](../../../sdk/models/operations/searchtypes.md)[] | :heavy_minus_sign: | A comma-separated list of search types to include. Valid values are: movies, music, otherVideos, people, tv.
| movies,music,otherVideos,people,tv | -| `includeCollections` | [operations.GetSearchAllLibrariesQueryParamIncludeCollections](../../../sdk/models/operations/getsearchalllibrariesqueryparamincludecollections.md) | :heavy_minus_sign: | Whether to include collections in the search results. | 1 | -| `includeExternalMedia` | [operations.GetSearchAllLibrariesQueryParamIncludeExternalMedia](../../../sdk/models/operations/getsearchalllibrariesqueryparamincludeexternalmedia.md) | :heavy_minus_sign: | Whether to include external media in the search results. | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesresponse.md b/docs/sdk/models/operations/getsearchalllibrariesresponse.md deleted file mode 100644 index 6b881233..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariesresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetSearchAllLibrariesResponse - -## Example Usage - -```typescript -import { GetSearchAllLibrariesResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesResponse = { - contentType: "", - statusCode: 264874, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetSearchAllLibrariesResponseBody](../../../sdk/models/operations/getsearchalllibrariesresponsebody.md) | :heavy_minus_sign: | The libraries available on the Server | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesresponsebody.md b/docs/sdk/models/operations/getsearchalllibrariesresponsebody.md deleted file mode 100644 index fe171e98..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariesresponsebody.md +++ /dev/null @@ -1,223 +0,0 @@ -# GetSearchAllLibrariesResponseBody - -The libraries available on the Server - -## Example Usage - -```typescript -import { - GetSearchAllLibrariesFlattenSeasons, - GetSearchAllLibrariesHasThumbnail, - GetSearchAllLibrariesLibraryType, - GetSearchAllLibrariesResponseBody, - GetSearchAllLibrariesShowOrdering, - GetSearchAllLibrariesType, -} from "@lukehagar/plexjs/sdk/models/operations"; -import { RFCDate } from "@lukehagar/plexjs/sdk/types"; - -let value: GetSearchAllLibrariesResponseBody = { - mediaContainer: { - size: 50, - allowSync: false, - identifier: "com.plexapp.plugins.library", - librarySectionID: 2, - librarySectionTitle: "TV Series", - librarySectionUUID: "e69655a2-ef48-4aba-bb19-0cc34d1e7d36", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1734362201, - searchResult: [ - { - score: 0.92, - directory: { - key: "/library/sections/3/all?actor=197429", - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - librarySectionTitle: "Movies", - type: "tag", - id: 197429, - filter: "actor=197429", - tag: "Ben Stiller", - tagKey: "5d776826999c64001ec2c606", - thumb: - "https://metadata-static.plex.tv/5/people/57bd7c7d6c5c9e2881251b30e5603d3d.jpg", - count: 10, - }, - metadata: { - ratingKey: "58683", - key: "/library/metadata/58683", - guid: "plex://movie/5d7768ba96b655001fdc0408", - slug: "4-for-texas", - studio: "20th Century Studios", - type: GetSearchAllLibrariesType.Movie, - title: "Avatar: The Way of Water", - banner: "/library/metadata/58683/banner/1703239236", - titleSort: "Whale", - contentRating: "PG-13", - summary: - "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\n" - + "Once a familiar threat returns to finish what was previously started, Jake must\n" - + "work with Neytiri and the army of the Na'vi race to protect their home.\n" - + "", - rating: 7.6, - audienceRating: 9.2, - year: 2022, - tagline: "Return to Pandora.", - thumb: "/library/metadata/58683/thumb/1703239236", - art: "/library/metadata/58683/art/1703239236", - theme: "/library/metadata/1/theme/1705636920", - index: 1, - leafCount: 14, - viewedLeafCount: 0, - childCount: 1, - seasonCount: 2022, - duration: 11558112, - originallyAvailableAt: new RFCDate("2022-12-14"), - addedAt: 1556281940, - updatedAt: 1556281940, - parentYear: 2010, - audienceRatingImage: "rottentomatoes://image.rating.upright", - chapterSource: "media", - primaryExtraKey: "/library/metadata/58684", - originalTitle: "映画 ブラッククローバー 魔法帝の剣", - parentRatingKey: "66", - grandparentRatingKey: "66", - parentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentSlug: "alice-in-borderland-2020", - grandparentKey: "/library/metadata/66", - parentKey: "/library/metadata/66", - grandparentTitle: "Caprica", - grandparentThumb: "/library/metadata/66/thumb/1705716261", - grandparentTheme: "/library/metadata/66/theme/1705716261", - grandparentArt: "/library/metadata/66/art/1705716261", - parentTitle: "Caprica", - parentIndex: 1, - parentThumb: "/library/metadata/66/thumb/1705716261", - ratingImage: "rottentomatoes://image.rating.ripe", - viewCount: 1, - viewOffset: 5222500, - skipCount: 1, - subtype: "clip", - lastRatedAt: 1721813113, - createdAtAccuracy: "epoch,local", - createdAtTZOffset: "0", - lastViewedAt: 1682752242, - userRating: 10, - image: [ - { - alt: "Episode 1", - type: GetSearchAllLibrariesLibraryType.Background, - url: "/library/metadata/45521/thumb/1644710589", - }, - ], - ultraBlurColors: { - topLeft: "11333b", - topRight: "0a232d", - bottomRight: "73958", - bottomLeft: "1f5066", - }, - guids: [ - { - id: - "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}", - }, - ], - librarySectionID: 1, - librarySectionTitle: "Movies", - librarySectionKey: "/library/sections/1", - showOrdering: GetSearchAllLibrariesShowOrdering.TvdbAbsolute, - flattenSeasons: GetSearchAllLibrariesFlattenSeasons.Show, - skipChildren: false, - media: [ - { - id: 387322, - duration: 9610350, - bitrate: 25512, - width: 3840, - height: 1602, - aspectRatio: 2.35, - audioChannels: 6, - displayOffset: 50, - audioCodec: "aac", - videoCodec: "hevc", - videoResolution: "4k", - container: "mp4", - videoFrameRate: "24p", - videoProfile: "main 10", - hasVoiceActivity: false, - audioProfile: "dts", - has64bitOffsets: false, - part: [ - { - accessible: true, - exists: true, - id: 418385, - key: "/library/parts/418385/1735864239/file.mkv", - indexes: "sd", - duration: 9610350, - file: "/mnt/Movies_1/W/Wicked (2024).mkv", - size: 30649952104, - packetLength: 188, - container: "mkv", - videoProfile: "main 10", - audioProfile: "dts", - has64bitOffsets: false, - hasThumbnail: GetSearchAllLibrariesHasThumbnail.True, - }, - ], - }, - ], - genre: [ - { - id: 259, - tag: "Crime", - }, - ], - country: [ - { - id: 259, - tag: "United States of America", - }, - ], - director: [ - { - id: 126522, - tag: "Danny Boyle", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", - }, - ], - writer: [ - { - id: 126522, - tag: "Jamie P. Hanson", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", - }, - ], - role: [ - { - id: 126522, - tag: "Teller", - role: "Self - Judge", - thumb: - "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg", - }, - ], - location: [ - { - path: "/TV Shows/Clarkson's Farm", - }, - ], - }, - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetSearchAllLibrariesMediaContainer](../../../sdk/models/operations/getsearchalllibrariesmediacontainer.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesrole.md b/docs/sdk/models/operations/getsearchalllibrariesrole.md deleted file mode 100644 index 6691149f..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariesrole.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetSearchAllLibrariesRole - -## Example Usage - -```typescript -import { GetSearchAllLibrariesRole } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesRole = { - id: 126522, - tag: "Teller", - role: "Self - Judge", - thumb: - "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | The unique identifier for the role.
NOTE: This is different for each Plex server and is not globally unique.
| 126522 | -| `tag` | *string* | :heavy_check_mark: | The display tag for the actor (typically the actor's name). | Teller | -| `role` | *string* | :heavy_minus_sign: | The role played by the actor in the media item. | Self - Judge | -| `thumb` | *string* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the actor. | https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesshowordering.md b/docs/sdk/models/operations/getsearchalllibrariesshowordering.md deleted file mode 100644 index 39b1d624..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariesshowordering.md +++ /dev/null @@ -1,32 +0,0 @@ -# GetSearchAllLibrariesShowOrdering - -Setting that indicates the episode ordering for the show. -Options: - - None = Library default - - tmdbAiring = The Movie Database (Aired) - - aired = TheTVDB (Aired) - - dvd = TheTVDB (DVD) - - absolute = TheTVDB (Absolute) - - -## Example Usage - -```typescript -import { GetSearchAllLibrariesShowOrdering } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesShowOrdering = - GetSearchAllLibrariesShowOrdering.TvdbAbsolute; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `None` | None | -| `TmdbAiring` | tmdbAiring | -| `TvdbAired` | aired | -| `TvdbDvd` | dvd | -| `TvdbAbsolute` | absolute | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariestype.md b/docs/sdk/models/operations/getsearchalllibrariestype.md deleted file mode 100644 index 2a70e133..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariestype.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetSearchAllLibrariesType - -The type of media content in the Plex library. This can represent videos, music, or photos. - - -## Example Usage - -```typescript -import { GetSearchAllLibrariesType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesType = GetSearchAllLibrariesType.Movie; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Movie` | movie | -| `TvShow` | show | -| `Season` | season | -| `Episode` | episode | -| `Artist` | artist | -| `Album` | album | -| `Track` | track | -| `PhotoAlbum` | photoalbum | -| `Photo` | photo | -| `Collection` | collection | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrariesultrablurcolors.md b/docs/sdk/models/operations/getsearchalllibrariesultrablurcolors.md deleted file mode 100644 index c5b3871c..00000000 --- a/docs/sdk/models/operations/getsearchalllibrariesultrablurcolors.md +++ /dev/null @@ -1,23 +0,0 @@ -# GetSearchAllLibrariesUltraBlurColors - -## Example Usage - -```typescript -import { GetSearchAllLibrariesUltraBlurColors } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesUltraBlurColors = { - topLeft: "11333b", - topRight: "0a232d", - bottomRight: "73958", - bottomLeft: "1f5066", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `topLeft` | *string* | :heavy_check_mark: | N/A | 11333b | -| `topRight` | *string* | :heavy_check_mark: | N/A | 0a232d | -| `bottomRight` | *string* | :heavy_check_mark: | N/A | 73958 | -| `bottomLeft` | *string* | :heavy_check_mark: | N/A | 1f5066 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchalllibrarieswriter.md b/docs/sdk/models/operations/getsearchalllibrarieswriter.md deleted file mode 100644 index d02d1136..00000000 --- a/docs/sdk/models/operations/getsearchalllibrarieswriter.md +++ /dev/null @@ -1,22 +0,0 @@ -# GetSearchAllLibrariesWriter - -## Example Usage - -```typescript -import { GetSearchAllLibrariesWriter } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchAllLibrariesWriter = { - id: 126522, - tag: "Jamie P. Hanson", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | Unique identifier for the writer. | 126522 | -| `tag` | *string* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson | -| `thumb` | *string* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the writer. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchlibrarymediacontainer.md b/docs/sdk/models/operations/getsearchlibrarymediacontainer.md deleted file mode 100644 index 94f88183..00000000 --- a/docs/sdk/models/operations/getsearchlibrarymediacontainer.md +++ /dev/null @@ -1,65 +0,0 @@ -# GetSearchLibraryMediaContainer - -## Example Usage - -```typescript -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, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 2 | -| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | false | -| `art` | *string* | :heavy_minus_sign: | N/A | /:/resources/show-fanart.jpg | -| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `mediaTagVersion` | *number* | :heavy_minus_sign: | N/A | 1698860922 | -| `nocache` | *boolean* | :heavy_minus_sign: | N/A | true | -| `thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/show.png | -| `title1` | *string* | :heavy_minus_sign: | N/A | TV Shows | -| `title2` | *string* | :heavy_minus_sign: | N/A | Search for '' | -| `viewGroup` | *string* | :heavy_minus_sign: | N/A | season | -| `viewMode` | *number* | :heavy_minus_sign: | N/A | 65593 | -| `metadata` | [operations.GetSearchLibraryMetadata](../../../sdk/models/operations/getsearchlibrarymetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchlibrarymetadata.md b/docs/sdk/models/operations/getsearchlibrarymetadata.md deleted file mode 100644 index 47d091e2..00000000 --- a/docs/sdk/models/operations/getsearchlibrarymetadata.md +++ /dev/null @@ -1,56 +0,0 @@ -# GetSearchLibraryMetadata - -## Example Usage - -```typescript -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, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 2 | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/2/children | -| `parentRatingKey` | *string* | :heavy_minus_sign: | N/A | 1 | -| `guid` | *string* | :heavy_minus_sign: | N/A | plex://season/602e67e766dfdb002c0a1b5b | -| `parentGuid` | *string* | :heavy_minus_sign: | N/A | plex://show/5d9c086c7d06d9001ffd27aa | -| `parentStudio` | *string* | :heavy_minus_sign: | N/A | Mutant Enemy Productions | -| `type` | *string* | :heavy_minus_sign: | N/A | season | -| `title` | *string* | :heavy_minus_sign: | N/A | Season 1 | -| `parentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/1 | -| `parentTitle` | *string* | :heavy_minus_sign: | N/A | Firefly | -| `summary` | *string* | :heavy_minus_sign: | N/A | 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` | *number* | :heavy_minus_sign: | N/A | 1 | -| `parentIndex` | *number* | :heavy_minus_sign: | N/A | 1 | -| `parentYear` | *number* | :heavy_minus_sign: | N/A | 2002 | -| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/2/thumb/1705636920 | -| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/1/art/1705636920 | -| `parentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/1/thumb/1705636920 | -| `parentTheme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/1/theme/1705636920 | -| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1705636916 | -| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705636920 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchlibraryqueryparamtype.md b/docs/sdk/models/operations/getsearchlibraryqueryparamtype.md deleted file mode 100644 index 6cbd69bd..00000000 --- a/docs/sdk/models/operations/getsearchlibraryqueryparamtype.md +++ /dev/null @@ -1,35 +0,0 @@ -# GetSearchLibraryQueryParamType - -The type of media to retrieve or filter by. -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 - - -## Example Usage - -```typescript -import { GetSearchLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchLibraryQueryParamType = - GetSearchLibraryQueryParamType.TvShow; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Artist` | 5 | -| `Album` | 6 | -| `Track` | 7 | -| `PhotoAlbum` | 8 | -| `Photo` | 9 | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchlibraryrequest.md b/docs/sdk/models/operations/getsearchlibraryrequest.md deleted file mode 100644 index 4e3a1fe9..00000000 --- a/docs/sdk/models/operations/getsearchlibraryrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetSearchLibraryRequest - -## Example Usage - -```typescript -import { GetSearchLibraryQueryParamType, GetSearchLibraryRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchLibraryRequest = { - sectionKey: 9518, - type: GetSearchLibraryQueryParamType.TvShow, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | -| `type` | [operations.GetSearchLibraryQueryParamType](../../../sdk/models/operations/getsearchlibraryqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
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
| 2 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchlibraryresponse.md b/docs/sdk/models/operations/getsearchlibraryresponse.md deleted file mode 100644 index c0895bf4..00000000 --- a/docs/sdk/models/operations/getsearchlibraryresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetSearchLibraryResponse - -## Example Usage - -```typescript -import { GetSearchLibraryResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchLibraryResponse = { - contentType: "", - statusCode: 39973, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetSearchLibraryResponseBody](../../../sdk/models/operations/getsearchlibraryresponsebody.md) | :heavy_minus_sign: | The contents of the library by section and type | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchlibraryresponsebody.md b/docs/sdk/models/operations/getsearchlibraryresponsebody.md deleted file mode 100644 index e08143f7..00000000 --- a/docs/sdk/models/operations/getsearchlibraryresponsebody.md +++ /dev/null @@ -1,57 +0,0 @@ -# GetSearchLibraryResponseBody - -The contents of the library by section and type - -## Example Usage - -```typescript -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, - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetSearchLibraryMediaContainer](../../../sdk/models/operations/getsearchlibrarymediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchresultscountry.md b/docs/sdk/models/operations/getsearchresultscountry.md deleted file mode 100644 index 6517f92d..00000000 --- a/docs/sdk/models/operations/getsearchresultscountry.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetSearchResultsCountry - -## Example Usage - -```typescript -import { GetSearchResultsCountry } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchResultsCountry = { - tag: "United States of America", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | -| `tag` | *string* | :heavy_minus_sign: | N/A | United States of America | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchresultsdirector.md b/docs/sdk/models/operations/getsearchresultsdirector.md deleted file mode 100644 index de699901..00000000 --- a/docs/sdk/models/operations/getsearchresultsdirector.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetSearchResultsDirector - -## Example Usage - -```typescript -import { GetSearchResultsDirector } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchResultsDirector = { - tag: "Brian De Palma", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *string* | :heavy_minus_sign: | N/A | Brian De Palma | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchresultsgenre.md b/docs/sdk/models/operations/getsearchresultsgenre.md deleted file mode 100644 index bb8b479e..00000000 --- a/docs/sdk/models/operations/getsearchresultsgenre.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetSearchResultsGenre - -## Example Usage - -```typescript -import { GetSearchResultsGenre } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchResultsGenre = { - tag: "Action", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *string* | :heavy_minus_sign: | N/A | Action | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchresultsmedia.md b/docs/sdk/models/operations/getsearchresultsmedia.md deleted file mode 100644 index 1eaf347a..00000000 --- a/docs/sdk/models/operations/getsearchresultsmedia.md +++ /dev/null @@ -1,57 +0,0 @@ -# GetSearchResultsMedia - -## Example Usage - -```typescript -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", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_minus_sign: | N/A | 26610 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 6612628 | -| `bitrate` | *number* | :heavy_minus_sign: | N/A | 4751 | -| `width` | *number* | :heavy_minus_sign: | N/A | 1916 | -| `height` | *number* | :heavy_minus_sign: | N/A | 796 | -| `aspectRatio` | *number* | :heavy_minus_sign: | N/A | 2.35 | -| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 6 | -| `audioCodec` | *string* | :heavy_minus_sign: | N/A | aac | -| `videoCodec` | *string* | :heavy_minus_sign: | N/A | hevc | -| `videoResolution` | *number* | :heavy_minus_sign: | N/A | 1080 | -| `container` | *string* | :heavy_minus_sign: | N/A | mkv | -| `videoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p | -| `audioProfile` | *string* | :heavy_minus_sign: | N/A | lc | -| `videoProfile` | *string* | :heavy_minus_sign: | N/A | main 10 | -| `part` | [operations.GetSearchResultsPart](../../../sdk/models/operations/getsearchresultspart.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchresultsmediacontainer.md b/docs/sdk/models/operations/getsearchresultsmediacontainer.md deleted file mode 100644 index 4d8e98b0..00000000 --- a/docs/sdk/models/operations/getsearchresultsmediacontainer.md +++ /dev/null @@ -1,119 +0,0 @@ -# GetSearchResultsMediaContainer - -## Example Usage - -```typescript -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: [ - { - 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", - }, - ], - }, - ], - provider: [ - { - key: "/system/search", - title: "Local Network", - type: "mixed", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 26 | -| `identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `mediaTagVersion` | *number* | :heavy_minus_sign: | N/A | 1680021154 | -| `metadata` | [operations.GetSearchResultsMetadata](../../../sdk/models/operations/getsearchresultsmetadata.md)[] | :heavy_minus_sign: | N/A | | -| `provider` | [operations.Provider](../../../sdk/models/operations/provider.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchresultsmetadata.md b/docs/sdk/models/operations/getsearchresultsmetadata.md deleted file mode 100644 index 83cd8ead..00000000 --- a/docs/sdk/models/operations/getsearchresultsmetadata.md +++ /dev/null @@ -1,132 +0,0 @@ -# GetSearchResultsMetadata - -## Example Usage - -```typescript -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: [ - { - 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", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | | -| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | -| `librarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | -| `personal` | *boolean* | :heavy_minus_sign: | N/A | | -| `sourceTitle` | *string* | :heavy_minus_sign: | N/A | Hera | -| `ratingKey` | *number* | :heavy_minus_sign: | N/A | 10398 | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/10398 | -| `guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d7768284de0ee001fcc8f52 | -| `studio` | *string* | :heavy_minus_sign: | N/A | Paramount | -| `type` | *string* | :heavy_minus_sign: | N/A | movie | -| `title` | *string* | :heavy_minus_sign: | N/A | Mission: Impossible | -| `contentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 | -| `summary` | *string* | :heavy_minus_sign: | N/A | 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` | *number* | :heavy_minus_sign: | N/A | 6.6 | -| `audienceRating` | *number* | :heavy_minus_sign: | N/A | 7.1 | -| `year` | *number* | :heavy_minus_sign: | N/A | 1996 | -| `tagline` | *string* | :heavy_minus_sign: | N/A | Expect the impossible. | -| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/10398/thumb/1679505055 | -| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/10398/art/1679505055 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 6612628 | -| `originallyAvailableAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | 1996-05-22 00:00:00 +0000 UTC | -| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1589234571 | -| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1679505055 | -| `audienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | -| `chapterSource` | *string* | :heavy_minus_sign: | N/A | media | -| `primaryExtraKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/10501 | -| `ratingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | -| `media` | [operations.GetSearchResultsMedia](../../../sdk/models/operations/getsearchresultsmedia.md)[] | :heavy_minus_sign: | N/A | | -| `genre` | [operations.GetSearchResultsGenre](../../../sdk/models/operations/getsearchresultsgenre.md)[] | :heavy_minus_sign: | N/A | | -| `director` | [operations.GetSearchResultsDirector](../../../sdk/models/operations/getsearchresultsdirector.md)[] | :heavy_minus_sign: | N/A | | -| `writer` | [operations.GetSearchResultsWriter](../../../sdk/models/operations/getsearchresultswriter.md)[] | :heavy_minus_sign: | N/A | | -| `country` | [operations.GetSearchResultsCountry](../../../sdk/models/operations/getsearchresultscountry.md)[] | :heavy_minus_sign: | N/A | | -| `role` | [operations.GetSearchResultsRole](../../../sdk/models/operations/getsearchresultsrole.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchresultspart.md b/docs/sdk/models/operations/getsearchresultspart.md deleted file mode 100644 index 52a2293b..00000000 --- a/docs/sdk/models/operations/getsearchresultspart.md +++ /dev/null @@ -1,32 +0,0 @@ -# GetSearchResultsPart - -## Example Usage - -```typescript -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", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `id` | *number* | :heavy_minus_sign: | N/A | 26610 | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/parts/26610/1589234571/file.mkv | -| `duration` | *number* | :heavy_minus_sign: | N/A | 6612628 | -| `file` | *string* | :heavy_minus_sign: | N/A | /movies/Mission Impossible (1996)/Mission Impossible (1996) Bluray-1080p.mkv | -| `size` | *number* | :heavy_minus_sign: | N/A | 3926903851 | -| `audioProfile` | *string* | :heavy_minus_sign: | N/A | lc | -| `container` | *string* | :heavy_minus_sign: | N/A | mkv | -| `videoProfile` | *string* | :heavy_minus_sign: | N/A | main 10 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchresultsrequest.md b/docs/sdk/models/operations/getsearchresultsrequest.md deleted file mode 100644 index cbfffe3a..00000000 --- a/docs/sdk/models/operations/getsearchresultsrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetSearchResultsRequest - -## Example Usage - -```typescript -import { GetSearchResultsRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchResultsRequest = { - query: "110", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | -| `query` | *string* | :heavy_check_mark: | The search query string to use | 110 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchresultsresponse.md b/docs/sdk/models/operations/getsearchresultsresponse.md deleted file mode 100644 index d49acf0e..00000000 --- a/docs/sdk/models/operations/getsearchresultsresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetSearchResultsResponse - -## Example Usage - -```typescript -import { GetSearchResultsResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchResultsResponse = { - contentType: "", - statusCode: 197131, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetSearchResultsResponseBody](../../../sdk/models/operations/getsearchresultsresponsebody.md) | :heavy_minus_sign: | Search Results | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchresultsresponsebody.md b/docs/sdk/models/operations/getsearchresultsresponsebody.md deleted file mode 100644 index 65df7b56..00000000 --- a/docs/sdk/models/operations/getsearchresultsresponsebody.md +++ /dev/null @@ -1,118 +0,0 @@ -# GetSearchResultsResponseBody - -Search Results - -## Example Usage - -```typescript -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", - 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", - }, - ], - }, - ], - provider: [ - { - key: "/system/search", - title: "Local Network", - type: "mixed", - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetSearchResultsMediaContainer](../../../sdk/models/operations/getsearchresultsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchresultsrole.md b/docs/sdk/models/operations/getsearchresultsrole.md deleted file mode 100644 index a02a9756..00000000 --- a/docs/sdk/models/operations/getsearchresultsrole.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetSearchResultsRole - -## Example Usage - -```typescript -import { GetSearchResultsRole } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchResultsRole = { - tag: "Tom Cruise", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *string* | :heavy_minus_sign: | N/A | Tom Cruise | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsearchresultswriter.md b/docs/sdk/models/operations/getsearchresultswriter.md deleted file mode 100644 index a7326529..00000000 --- a/docs/sdk/models/operations/getsearchresultswriter.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetSearchResultsWriter - -## Example Usage - -```typescript -import { GetSearchResultsWriter } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSearchResultsWriter = { - tag: "David Koepp", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *string* | :heavy_minus_sign: | N/A | David Koepp | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsectionfiltersglobals.md b/docs/sdk/models/operations/getsectionfiltersglobals.md new file mode 100644 index 00000000..7284ebb2 --- /dev/null +++ b/docs/sdk/models/operations/getsectionfiltersglobals.md @@ -0,0 +1,35 @@ +# GetSectionFiltersGlobals + +## Example Usage + +```typescript +import { GetSectionFiltersGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSectionFiltersGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsectionfiltersmediacontainer.md b/docs/sdk/models/operations/getsectionfiltersmediacontainer.md new file mode 100644 index 00000000..831a45d3 --- /dev/null +++ b/docs/sdk/models/operations/getsectionfiltersmediacontainer.md @@ -0,0 +1,24 @@ +# GetSectionFiltersMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetSectionFiltersMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSectionFiltersMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `directory` | [shared.Directory](../../../sdk/models/shared/directory.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsectionfiltersrequest.md b/docs/sdk/models/operations/getsectionfiltersrequest.md new file mode 100644 index 00000000..e8ccbbad --- /dev/null +++ b/docs/sdk/models/operations/getsectionfiltersrequest.md @@ -0,0 +1,27 @@ +# GetSectionFiltersRequest + +## Example Usage + +```typescript +import { GetSectionFiltersRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSectionFiltersRequest = { + sectionId: 949072, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsectionfiltersresponse.md b/docs/sdk/models/operations/getsectionfiltersresponse.md new file mode 100644 index 00000000..7d6ad7dc --- /dev/null +++ b/docs/sdk/models/operations/getsectionfiltersresponse.md @@ -0,0 +1,21 @@ +# GetSectionFiltersResponse + +## Example Usage + +```typescript +import { GetSectionFiltersResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSectionFiltersResponse = { + contentType: "", + statusCode: 180316, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetSectionFiltersResponseBody](../../../sdk/models/operations/getsectionfiltersresponsebody.md) | :heavy_minus_sign: | The filters on the section | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsectionfiltersresponsebody.md b/docs/sdk/models/operations/getsectionfiltersresponsebody.md new file mode 100644 index 00000000..7933e5bb --- /dev/null +++ b/docs/sdk/models/operations/getsectionfiltersresponsebody.md @@ -0,0 +1,17 @@ +# GetSectionFiltersResponseBody + +The filters on the section + +## Example Usage + +```typescript +import { GetSectionFiltersResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSectionFiltersResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetSectionFiltersMediaContainer](../../../sdk/models/operations/getsectionfiltersmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsectionhubsglobals.md b/docs/sdk/models/operations/getsectionhubsglobals.md new file mode 100644 index 00000000..4211b670 --- /dev/null +++ b/docs/sdk/models/operations/getsectionhubsglobals.md @@ -0,0 +1,35 @@ +# GetSectionHubsGlobals + +## Example Usage + +```typescript +import { GetSectionHubsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSectionHubsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsectionhubsmediacontainer.md b/docs/sdk/models/operations/getsectionhubsmediacontainer.md new file mode 100644 index 00000000..b6c694ad --- /dev/null +++ b/docs/sdk/models/operations/getsectionhubsmediacontainer.md @@ -0,0 +1,187 @@ +# GetSectionHubsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetSectionHubsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSectionHubsMediaContainer = { + hub: [ + { + type: "track", + context: "hub.home.onDeck", + hubIdentifier: "home.onDeck", + key: "/hubs/sections/home/onDeck", + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + size: 1, + subtype: "podcast", + totalSize: 8, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `hub` | [shared.Hub](../../../sdk/models/shared/hub.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsectionhubsrequest.md b/docs/sdk/models/operations/getsectionhubsrequest.md new file mode 100644 index 00000000..f803de3b --- /dev/null +++ b/docs/sdk/models/operations/getsectionhubsrequest.md @@ -0,0 +1,31 @@ +# GetSectionHubsRequest + +## Example Usage + +```typescript +import { GetSectionHubsRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: GetSectionHubsRequest = { + sectionId: 905423, + onlyTransient: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | The section ID for the hubs to fetch | | +| `count` | *number* | :heavy_minus_sign: | Limit results to count items | | +| `onlyTransient` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | 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) | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsectionhubsresponse.md b/docs/sdk/models/operations/getsectionhubsresponse.md new file mode 100644 index 00000000..36d8cb23 --- /dev/null +++ b/docs/sdk/models/operations/getsectionhubsresponse.md @@ -0,0 +1,31 @@ +# GetSectionHubsResponse + +## Example Usage + +```typescript +import { GetSectionHubsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSectionHubsResponse = { + contentType: "", + statusCode: 627596, + headers: { + "key": [ + "", + ], + "key1": [ + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetSectionHubsResponseBody](../../../sdk/models/operations/getsectionhubsresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsectionhubsresponsebody.md b/docs/sdk/models/operations/getsectionhubsresponsebody.md new file mode 100644 index 00000000..531e0235 --- /dev/null +++ b/docs/sdk/models/operations/getsectionhubsresponsebody.md @@ -0,0 +1,183 @@ +# GetSectionHubsResponseBody + +OK + +## Example Usage + +```typescript +import { GetSectionHubsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSectionHubsResponseBody = { + mediaContainer: { + hub: [ + { + type: "track", + context: "hub.home.onDeck", + hubIdentifier: "home.onDeck", + key: "/hubs/sections/home/onDeck", + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: + "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + size: 1, + subtype: "podcast", + totalSize: 8, + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetSectionHubsMediaContainer](../../../sdk/models/operations/getsectionhubsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsectionimageglobals.md b/docs/sdk/models/operations/getsectionimageglobals.md new file mode 100644 index 00000000..121588cc --- /dev/null +++ b/docs/sdk/models/operations/getsectionimageglobals.md @@ -0,0 +1,35 @@ +# GetSectionImageGlobals + +## Example Usage + +```typescript +import { GetSectionImageGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSectionImageGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsectionimagerequest.md b/docs/sdk/models/operations/getsectionimagerequest.md new file mode 100644 index 00000000..242488f7 --- /dev/null +++ b/docs/sdk/models/operations/getsectionimagerequest.md @@ -0,0 +1,31 @@ +# GetSectionImageRequest + +## Example Usage + +```typescript +import { GetSectionImageRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSectionImageRequest = { + sectionId: 16951, + updatedAt: 311971, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | +| `updatedAt` | *number* | :heavy_check_mark: | The update time of the image. Used for busting cache. | | +| `mediaQuery` | [shared.MediaQuery](../../../sdk/models/shared/mediaquery.md) | :heavy_minus_sign: | This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries | | +| `composite` | [shared.Composite](../../../sdk/models/shared/composite.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsectionimageresponse.md b/docs/sdk/models/operations/getsectionimageresponse.md new file mode 100644 index 00000000..7bf00658 --- /dev/null +++ b/docs/sdk/models/operations/getsectionimageresponse.md @@ -0,0 +1,20 @@ +# GetSectionImageResponse + +## Example Usage + +```typescript +import { GetSectionImageResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSectionImageResponse = { + contentType: "", + statusCode: 556610, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsectionpreferencesglobals.md b/docs/sdk/models/operations/getsectionpreferencesglobals.md new file mode 100644 index 00000000..4caba77d --- /dev/null +++ b/docs/sdk/models/operations/getsectionpreferencesglobals.md @@ -0,0 +1,35 @@ +# GetSectionPreferencesGlobals + +## Example Usage + +```typescript +import { GetSectionPreferencesGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSectionPreferencesGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsectionpreferencesrequest.md b/docs/sdk/models/operations/getsectionpreferencesrequest.md new file mode 100644 index 00000000..ca85374f --- /dev/null +++ b/docs/sdk/models/operations/getsectionpreferencesrequest.md @@ -0,0 +1,28 @@ +# GetSectionPreferencesRequest + +## Example Usage + +```typescript +import { GetSectionPreferencesRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSectionPreferencesRequest = { + sectionId: 949128, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | +| `agent` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsectionpreferencesresponse.md b/docs/sdk/models/operations/getsectionpreferencesresponse.md new file mode 100644 index 00000000..a361f904 --- /dev/null +++ b/docs/sdk/models/operations/getsectionpreferencesresponse.md @@ -0,0 +1,21 @@ +# GetSectionPreferencesResponse + +## Example Usage + +```typescript +import { GetSectionPreferencesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSectionPreferencesResponse = { + contentType: "", + statusCode: 878121, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithSettings` | [shared.MediaContainerWithSettings](../../../sdk/models/shared/mediacontainerwithsettings.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsectionsmediacontainer.md b/docs/sdk/models/operations/getsectionsmediacontainer.md new file mode 100644 index 00000000..42aeed00 --- /dev/null +++ b/docs/sdk/models/operations/getsectionsmediacontainer.md @@ -0,0 +1,26 @@ +# GetSectionsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetSectionsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSectionsMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | +| `directory` | [shared.LibrarySection](../../../sdk/models/shared/librarysection.md)[] | :heavy_minus_sign: | N/A | +| `title1` | *string* | :heavy_minus_sign: | Typically just "Plex Library" | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsectionsprefsglobals.md b/docs/sdk/models/operations/getsectionsprefsglobals.md new file mode 100644 index 00000000..5aee4c41 --- /dev/null +++ b/docs/sdk/models/operations/getsectionsprefsglobals.md @@ -0,0 +1,35 @@ +# GetSectionsPrefsGlobals + +## Example Usage + +```typescript +import { GetSectionsPrefsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSectionsPrefsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsectionsprefsrequest.md b/docs/sdk/models/operations/getsectionsprefsrequest.md new file mode 100644 index 00000000..63e8742d --- /dev/null +++ b/docs/sdk/models/operations/getsectionsprefsrequest.md @@ -0,0 +1,28 @@ +# GetSectionsPrefsRequest + +## Example Usage + +```typescript +import { GetSectionsPrefsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSectionsPrefsRequest = { + type: 934408, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `type` | *number* | :heavy_check_mark: | The metadata type | | +| `agent` | *string* | :heavy_minus_sign: | The metadata agent in use | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsectionsprefsresponse.md b/docs/sdk/models/operations/getsectionsprefsresponse.md new file mode 100644 index 00000000..2a103272 --- /dev/null +++ b/docs/sdk/models/operations/getsectionsprefsresponse.md @@ -0,0 +1,21 @@ +# GetSectionsPrefsResponse + +## Example Usage + +```typescript +import { GetSectionsPrefsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSectionsPrefsResponse = { + contentType: "", + statusCode: 698432, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `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 | +| `requestHandlerSlashGetResponses200` | [shared.RequestHandlerSlashGetResponses200](../../../sdk/models/shared/requesthandlerslashgetresponses200.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsectionsresponse.md b/docs/sdk/models/operations/getsectionsresponse.md new file mode 100644 index 00000000..e7a2aaad --- /dev/null +++ b/docs/sdk/models/operations/getsectionsresponse.md @@ -0,0 +1,23 @@ +# GetSectionsResponse + +## Example Usage + +```typescript +import { GetSectionsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSectionsResponse = { + contentType: "", + statusCode: 42544, + headers: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetSectionsResponseBody](../../../sdk/models/operations/getsectionsresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsectionsresponsebody.md b/docs/sdk/models/operations/getsectionsresponsebody.md new file mode 100644 index 00000000..3fa58f46 --- /dev/null +++ b/docs/sdk/models/operations/getsectionsresponsebody.md @@ -0,0 +1,17 @@ +# GetSectionsResponseBody + +OK + +## Example Usage + +```typescript +import { GetSectionsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSectionsResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetSectionsMediaContainer](../../../sdk/models/operations/getsectionsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getserveractivitiesmediacontainer.md b/docs/sdk/models/operations/getserveractivitiesmediacontainer.md deleted file mode 100644 index ab641525..00000000 --- a/docs/sdk/models/operations/getserveractivitiesmediacontainer.md +++ /dev/null @@ -1,16 +0,0 @@ -# GetServerActivitiesMediaContainer - -## Example Usage - -```typescript -import { GetServerActivitiesMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetServerActivitiesMediaContainer = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | -| `activity` | [operations.Activity](../../../sdk/models/operations/activity.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getserveractivitiesresponse.md b/docs/sdk/models/operations/getserveractivitiesresponse.md deleted file mode 100644 index 229c2d18..00000000 --- a/docs/sdk/models/operations/getserveractivitiesresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetServerActivitiesResponse - -## Example Usage - -```typescript -import { GetServerActivitiesResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetServerActivitiesResponse = { - contentType: "", - statusCode: 863303, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetServerActivitiesResponseBody](../../../sdk/models/operations/getserveractivitiesresponsebody.md) | :heavy_minus_sign: | The Server Activities | \ No newline at end of file diff --git a/docs/sdk/models/operations/getserveractivitiesresponsebody.md b/docs/sdk/models/operations/getserveractivitiesresponsebody.md deleted file mode 100644 index 2faf4db9..00000000 --- a/docs/sdk/models/operations/getserveractivitiesresponsebody.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetServerActivitiesResponseBody - -The Server Activities - -## Example Usage - -```typescript -import { GetServerActivitiesResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetServerActivitiesResponseBody = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetServerActivitiesMediaContainer](../../../sdk/models/operations/getserveractivitiesmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getservercapabilitiesresponse.md b/docs/sdk/models/operations/getservercapabilitiesresponse.md deleted file mode 100644 index 3fb63fd2..00000000 --- a/docs/sdk/models/operations/getservercapabilitiesresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetServerCapabilitiesResponse - -## Example Usage - -```typescript -import { GetServerCapabilitiesResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetServerCapabilitiesResponse = { - contentType: "", - statusCode: 281810, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetServerCapabilitiesResponseBody](../../../sdk/models/operations/getservercapabilitiesresponsebody.md) | :heavy_minus_sign: | The Server Capabilities | \ No newline at end of file diff --git a/docs/sdk/models/operations/getservercapabilitiesresponsebody.md b/docs/sdk/models/operations/getservercapabilitiesresponsebody.md deleted file mode 100644 index 37896cfb..00000000 --- a/docs/sdk/models/operations/getservercapabilitiesresponsebody.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetServerCapabilitiesResponseBody - -The Server Capabilities - -## Example Usage - -```typescript -import { GetServerCapabilitiesResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetServerCapabilitiesResponseBody = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `mediaContainer` | [operations.MediaContainer](../../../sdk/models/operations/mediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getserveridentitymediacontainer.md b/docs/sdk/models/operations/getserveridentitymediacontainer.md deleted file mode 100644 index ebd3d3c0..00000000 --- a/docs/sdk/models/operations/getserveridentitymediacontainer.md +++ /dev/null @@ -1,22 +0,0 @@ -# GetServerIdentityMediaContainer - -## Example Usage - -```typescript -import { GetServerIdentityMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetServerIdentityMediaContainer = { - size: 0, - machineIdentifier: "96f2fe7a78c9dc1f16a16bedbe90f98149be16b4", - version: "1.31.3.6868-28fc46b27", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 0 | -| `claimed` | *boolean* | :heavy_minus_sign: | N/A | | -| `machineIdentifier` | *string* | :heavy_minus_sign: | N/A | 96f2fe7a78c9dc1f16a16bedbe90f98149be16b4 | -| `version` | *string* | :heavy_minus_sign: | N/A | 1.31.3.6868-28fc46b27 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getserveridentityresponse.md b/docs/sdk/models/operations/getserveridentityresponse.md deleted file mode 100644 index cff5fdc6..00000000 --- a/docs/sdk/models/operations/getserveridentityresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetServerIdentityResponse - -## Example Usage - -```typescript -import { GetServerIdentityResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetServerIdentityResponse = { - contentType: "", - statusCode: 828949, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetServerIdentityResponseBody](../../../sdk/models/operations/getserveridentityresponsebody.md) | :heavy_minus_sign: | The Server Identity information | \ No newline at end of file diff --git a/docs/sdk/models/operations/getserveridentityresponsebody.md b/docs/sdk/models/operations/getserveridentityresponsebody.md deleted file mode 100644 index 1857bca7..00000000 --- a/docs/sdk/models/operations/getserveridentityresponsebody.md +++ /dev/null @@ -1,23 +0,0 @@ -# GetServerIdentityResponseBody - -The Server Identity information - -## Example Usage - -```typescript -import { GetServerIdentityResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetServerIdentityResponseBody = { - mediaContainer: { - size: 0, - machineIdentifier: "96f2fe7a78c9dc1f16a16bedbe90f98149be16b4", - version: "1.31.3.6868-28fc46b27", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetServerIdentityMediaContainer](../../../sdk/models/operations/getserveridentitymediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getserverinfoglobals.md b/docs/sdk/models/operations/getserverinfoglobals.md new file mode 100644 index 00000000..9c77f6df --- /dev/null +++ b/docs/sdk/models/operations/getserverinfoglobals.md @@ -0,0 +1,35 @@ +# GetServerInfoGlobals + +## Example Usage + +```typescript +import { GetServerInfoGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetServerInfoGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getserverinforequest.md b/docs/sdk/models/operations/getserverinforequest.md new file mode 100644 index 00000000..68b7213b --- /dev/null +++ b/docs/sdk/models/operations/getserverinforequest.md @@ -0,0 +1,24 @@ +# GetServerInfoRequest + +## Example Usage + +```typescript +import { GetServerInfoRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetServerInfoRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getserverinforesponse.md b/docs/sdk/models/operations/getserverinforesponse.md new file mode 100644 index 00000000..e417e7de --- /dev/null +++ b/docs/sdk/models/operations/getserverinforesponse.md @@ -0,0 +1,21 @@ +# GetServerInfoResponse + +## Example Usage + +```typescript +import { GetServerInfoResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetServerInfoResponse = { + contentType: "", + statusCode: 196247, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithDirectory` | [shared.MediaContainerWithDirectory](../../../sdk/models/shared/mediacontainerwithdirectory.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getserverlistmediacontainer.md b/docs/sdk/models/operations/getserverlistmediacontainer.md deleted file mode 100644 index bbe139ce..00000000 --- a/docs/sdk/models/operations/getserverlistmediacontainer.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetServerListMediaContainer - -## Example Usage - -```typescript -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", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 1 | -| `server` | [operations.GetServerListServer](../../../sdk/models/operations/getserverlistserver.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getserverlistresponse.md b/docs/sdk/models/operations/getserverlistresponse.md deleted file mode 100644 index 29a4b4c0..00000000 --- a/docs/sdk/models/operations/getserverlistresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetServerListResponse - -## Example Usage - -```typescript -import { GetServerListResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetServerListResponse = { - contentType: "", - statusCode: 981734, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetServerListResponseBody](../../../sdk/models/operations/getserverlistresponsebody.md) | :heavy_minus_sign: | List of Servers | \ No newline at end of file diff --git a/docs/sdk/models/operations/getserverlistresponsebody.md b/docs/sdk/models/operations/getserverlistresponsebody.md deleted file mode 100644 index 3638cf42..00000000 --- a/docs/sdk/models/operations/getserverlistresponsebody.md +++ /dev/null @@ -1,31 +0,0 @@ -# GetServerListResponseBody - -List of Servers - -## Example Usage - -```typescript -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", - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetServerListMediaContainer](../../../sdk/models/operations/getserverlistmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getserverlistserver.md b/docs/sdk/models/operations/getserverlistserver.md deleted file mode 100644 index 8eb7a41d..00000000 --- a/docs/sdk/models/operations/getserverlistserver.md +++ /dev/null @@ -1,27 +0,0 @@ -# GetServerListServer - -## Example Usage - -```typescript -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", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | N/A | Hera | -| `host` | *string* | :heavy_minus_sign: | N/A | 10.10.10.47 | -| `address` | *string* | :heavy_minus_sign: | N/A | 10.10.10.47 | -| `port` | *number* | :heavy_minus_sign: | N/A | 32400 | -| `machineIdentifier` | *string* | :heavy_minus_sign: | N/A | 96f2fe7a78c9dc1f16a16bedbe90f98149be16b4 | -| `version` | *string* | :heavy_minus_sign: | N/A | 1.31.3.6868-28fc46b27 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getserverpreferencesmediacontainer.md b/docs/sdk/models/operations/getserverpreferencesmediacontainer.md deleted file mode 100644 index cceca5ff..00000000 --- a/docs/sdk/models/operations/getserverpreferencesmediacontainer.md +++ /dev/null @@ -1,32 +0,0 @@ -# GetServerPreferencesMediaContainer - -## Example Usage - -```typescript -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", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 161 | -| `setting` | [operations.Setting](../../../sdk/models/operations/setting.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getserverpreferencesresponse.md b/docs/sdk/models/operations/getserverpreferencesresponse.md deleted file mode 100644 index 92b2a551..00000000 --- a/docs/sdk/models/operations/getserverpreferencesresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetServerPreferencesResponse - -## Example Usage - -```typescript -import { GetServerPreferencesResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetServerPreferencesResponse = { - contentType: "", - statusCode: 480617, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetServerPreferencesResponseBody](../../../sdk/models/operations/getserverpreferencesresponsebody.md) | :heavy_minus_sign: | Server Preferences | \ No newline at end of file diff --git a/docs/sdk/models/operations/getserverpreferencesresponsebody.md b/docs/sdk/models/operations/getserverpreferencesresponsebody.md deleted file mode 100644 index befcfbc0..00000000 --- a/docs/sdk/models/operations/getserverpreferencesresponsebody.md +++ /dev/null @@ -1,35 +0,0 @@ -# GetServerPreferencesResponseBody - -Server Preferences - -## Example Usage - -```typescript -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", - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetServerPreferencesMediaContainer](../../../sdk/models/operations/getserverpreferencesmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getserverresourcesrequest.md b/docs/sdk/models/operations/getserverresourcesrequest.md deleted file mode 100644 index c4555b8d..00000000 --- a/docs/sdk/models/operations/getserverresourcesrequest.md +++ /dev/null @@ -1,23 +0,0 @@ -# GetServerResourcesRequest - -## Example Usage - -```typescript -import { GetServerResourcesRequest, IncludeHttps, IncludeIPv6, IncludeRelay } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetServerResourcesRequest = { - includeHttps: IncludeHttps.Enable, - includeRelay: IncludeRelay.Enable, - includeIPv6: IncludeIPv6.Enable, - clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `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 | -| `clientID` | *string* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getserverresourcesresponse.md b/docs/sdk/models/operations/getserverresourcesresponse.md deleted file mode 100644 index 93eb30a0..00000000 --- a/docs/sdk/models/operations/getserverresourcesresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetServerResourcesResponse - -## Example Usage - -```typescript -import { GetServerResourcesResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetServerResourcesResponse = { - contentType: "", - statusCode: 384468, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `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 | -| `plexDevices` | [operations.PlexDevice](../../../sdk/models/operations/plexdevice.md)[] | :heavy_minus_sign: | List of Plex Devices. This includes Plex hosted servers and clients | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsessionhistorymediacontainer.md b/docs/sdk/models/operations/getsessionhistorymediacontainer.md deleted file mode 100644 index 80919bc3..00000000 --- a/docs/sdk/models/operations/getsessionhistorymediacontainer.md +++ /dev/null @@ -1,42 +0,0 @@ -# GetSessionHistoryMediaContainer - -## Example Usage - -```typescript -import { GetSessionHistoryMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; -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, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 10855 | -| `metadata` | [operations.GetSessionHistoryMetadata](../../../sdk/models/operations/getsessionhistorymetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsessionhistorymetadata.md b/docs/sdk/models/operations/getsessionhistorymetadata.md deleted file mode 100644 index b0fac6f0..00000000 --- a/docs/sdk/models/operations/getsessionhistorymetadata.md +++ /dev/null @@ -1,54 +0,0 @@ -# GetSessionHistoryMetadata - -## Example Usage - -```typescript -import { GetSessionHistoryMetadata } from "@lukehagar/plexjs/sdk/models/operations"; -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, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `historyKey` | *string* | :heavy_minus_sign: | N/A | /status/sessions/history/1 | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/32171 | -| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 32171 | -| `librarySectionID` | *string* | :heavy_minus_sign: | N/A | 2 | -| `parentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/32170 | -| `grandparentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/32132 | -| `title` | *string* | :heavy_minus_sign: | N/A | The Noise That Blue Makes | -| `grandparentTitle` | *string* | :heavy_minus_sign: | N/A | Taskmaster | -| `type` | *string* | :heavy_minus_sign: | N/A | episode | -| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/32171/thumb/-1 | -| `parentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/32170/thumb/1654134301 | -| `grandparentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/32132/thumb/1703933346 | -| `grandparentArt` | *string* | :heavy_minus_sign: | N/A | /library/metadata/32132/art/1703933346 | -| `index` | *number* | :heavy_minus_sign: | N/A | 1 | -| `parentIndex` | *number* | :heavy_minus_sign: | N/A | 13 | -| `originallyAvailableAt` | [RFCDate](../../../types/rfcdate.md) | :heavy_minus_sign: | N/A | 2022-04-14 00:00:00 +0000 UTC | -| `viewedAt` | *number* | :heavy_minus_sign: | N/A | 1654139223 | -| `accountID` | *number* | :heavy_minus_sign: | N/A | 1 | -| `deviceID` | *number* | :heavy_minus_sign: | N/A | 5 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsessionhistoryrequest.md b/docs/sdk/models/operations/getsessionhistoryrequest.md deleted file mode 100644 index 83ac0497..00000000 --- a/docs/sdk/models/operations/getsessionhistoryrequest.md +++ /dev/null @@ -1,22 +0,0 @@ -# GetSessionHistoryRequest - -## Example Usage - -```typescript -import { GetSessionHistoryRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSessionHistoryRequest = { - accountId: 1, - filter: {}, - librarySectionID: 12, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sort` | *string* | :heavy_minus_sign: | Sorts the results by the specified field followed by the direction (asc, desc)
| | -| `accountId` | *number* | :heavy_minus_sign: | Filter results by those that are related to a specific users id
| 1 | -| `filter` | [operations.QueryParamFilter](../../../sdk/models/operations/queryparamfilter.md) | :heavy_minus_sign: | Filters content by field and direction/equality
(Unknown if viewedAt is the only supported column)
| {
"viewed-at-greater-than": {
"value": "viewedAt\u003e"
},
"viewed-at-greater-than-or-equal-to": {
"value": "viewedAt\u003e=\u003e"
},
"viewed-at-less-than": {
"value": "viewedAt\u003c"
}
} | -| `librarySectionID` | *number* | :heavy_minus_sign: | Filters the results based on the id of a valid library section
| 12 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsessionhistoryresponse.md b/docs/sdk/models/operations/getsessionhistoryresponse.md deleted file mode 100644 index 300aa80d..00000000 --- a/docs/sdk/models/operations/getsessionhistoryresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetSessionHistoryResponse - -## Example Usage - -```typescript -import { GetSessionHistoryResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSessionHistoryResponse = { - contentType: "", - statusCode: 824457, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetSessionHistoryResponseBody](../../../sdk/models/operations/getsessionhistoryresponsebody.md) | :heavy_minus_sign: | List of Plex Sessions | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsessionhistoryresponsebody.md b/docs/sdk/models/operations/getsessionhistoryresponsebody.md deleted file mode 100644 index 83cd0a39..00000000 --- a/docs/sdk/models/operations/getsessionhistoryresponsebody.md +++ /dev/null @@ -1,45 +0,0 @@ -# GetSessionHistoryResponseBody - -List of Plex Sessions - -## Example Usage - -```typescript -import { GetSessionHistoryResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; -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, - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetSessionHistoryMediaContainer](../../../sdk/models/operations/getsessionhistorymediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsessionplaylistindexglobals.md b/docs/sdk/models/operations/getsessionplaylistindexglobals.md new file mode 100644 index 00000000..1ed2fdaa --- /dev/null +++ b/docs/sdk/models/operations/getsessionplaylistindexglobals.md @@ -0,0 +1,35 @@ +# GetSessionPlaylistIndexGlobals + +## Example Usage + +```typescript +import { GetSessionPlaylistIndexGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSessionPlaylistIndexGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsessionplaylistindexrequest.md b/docs/sdk/models/operations/getsessionplaylistindexrequest.md new file mode 100644 index 00000000..70319e15 --- /dev/null +++ b/docs/sdk/models/operations/getsessionplaylistindexrequest.md @@ -0,0 +1,29 @@ +# GetSessionPlaylistIndexRequest + +## Example Usage + +```typescript +import { GetSessionPlaylistIndexRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSessionPlaylistIndexRequest = { + sessionId: "", + consumerId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sessionId` | *string* | :heavy_check_mark: | The session id | | +| `consumerId` | *string* | :heavy_check_mark: | The consumer id | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsessionplaylistindexresponse.md b/docs/sdk/models/operations/getsessionplaylistindexresponse.md new file mode 100644 index 00000000..6d9b4a72 --- /dev/null +++ b/docs/sdk/models/operations/getsessionplaylistindexresponse.md @@ -0,0 +1,20 @@ +# GetSessionPlaylistIndexResponse + +## Example Usage + +```typescript +import { GetSessionPlaylistIndexResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSessionPlaylistIndexResponse = { + contentType: "", + statusCode: 931770, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsessionsegmentglobals.md b/docs/sdk/models/operations/getsessionsegmentglobals.md new file mode 100644 index 00000000..8608e8a8 --- /dev/null +++ b/docs/sdk/models/operations/getsessionsegmentglobals.md @@ -0,0 +1,35 @@ +# GetSessionSegmentGlobals + +## Example Usage + +```typescript +import { GetSessionSegmentGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSessionSegmentGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsessionsegmentrequest.md b/docs/sdk/models/operations/getsessionsegmentrequest.md new file mode 100644 index 00000000..93752f67 --- /dev/null +++ b/docs/sdk/models/operations/getsessionsegmentrequest.md @@ -0,0 +1,31 @@ +# GetSessionSegmentRequest + +## Example Usage + +```typescript +import { GetSessionSegmentRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSessionSegmentRequest = { + sessionId: "", + consumerId: "", + segmentId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sessionId` | *string* | :heavy_check_mark: | The session id | | +| `consumerId` | *string* | :heavy_check_mark: | The consumer id | | +| `segmentId` | *string* | :heavy_check_mark: | The segment id | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsessionsegmentresponse.md b/docs/sdk/models/operations/getsessionsegmentresponse.md new file mode 100644 index 00000000..cb48f82d --- /dev/null +++ b/docs/sdk/models/operations/getsessionsegmentresponse.md @@ -0,0 +1,20 @@ +# GetSessionSegmentResponse + +## Example Usage + +```typescript +import { GetSessionSegmentResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSessionSegmentResponse = { + contentType: "", + statusCode: 717876, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsessionsmedia.md b/docs/sdk/models/operations/getsessionsmedia.md deleted file mode 100644 index f58f68b9..00000000 --- a/docs/sdk/models/operations/getsessionsmedia.md +++ /dev/null @@ -1,68 +0,0 @@ -# GetSessionsMedia - -## Example Usage - -```typescript -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: [ - { - 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", - }, - ], - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 2 | -| `audioCodec` | *string* | :heavy_minus_sign: | N/A | flac | -| `bitrate` | *number* | :heavy_minus_sign: | N/A | 1014 | -| `container` | *string* | :heavy_minus_sign: | N/A | flac | -| `duration` | *number* | :heavy_minus_sign: | N/A | 186240 | -| `id` | *string* | :heavy_minus_sign: | N/A | 130355 | -| `selected` | *boolean* | :heavy_minus_sign: | N/A | true | -| `part` | [operations.GetSessionsPart](../../../sdk/models/operations/getsessionspart.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsessionsmediacontainer.md b/docs/sdk/models/operations/getsessionsmediacontainer.md deleted file mode 100644 index 475a1248..00000000 --- a/docs/sdk/models/operations/getsessionsmediacontainer.md +++ /dev/null @@ -1,132 +0,0 @@ -# GetSessionsMediaContainer - -## Example Usage - -```typescript -import { GetSessionsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSessionsMediaContainer = { - 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", - originalTitle: "The American Dream Is Killing Me", - 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", - }, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 1 | -| `metadata` | [operations.GetSessionsMetadata](../../../sdk/models/operations/getsessionsmetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsessionsmetadata.md b/docs/sdk/models/operations/getsessionsmetadata.md deleted file mode 100644 index c6f76193..00000000 --- a/docs/sdk/models/operations/getsessionsmetadata.md +++ /dev/null @@ -1,163 +0,0 @@ -# GetSessionsMetadata - -## Example Usage - -```typescript -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", - originalTitle: "The American Dream Is Killing Me", - 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", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1705543312 | -| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 186240 | -| `grandparentArt` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 | -| `grandparentGuid` | *string* | :heavy_minus_sign: | N/A | plex://artist/5d07bbfd403c6402904a6480 | -| `grandparentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904 | -| `grandparentRatingKey` | *string* | :heavy_minus_sign: | N/A | 39904 | -| `grandparentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904/thumb/1705310687 | -| `grandparentTitle` | *string* | :heavy_minus_sign: | N/A | Green Day | -| `guid` | *string* | :heavy_minus_sign: | N/A | plex://track/6535834f71f22f36f71a8e8f | -| `index` | *number* | :heavy_minus_sign: | N/A | 1 | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67085 | -| `librarySectionID` | *string* | :heavy_minus_sign: | N/A | 3 | -| `librarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/3 | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Music | -| `musicAnalysisVersion` | *string* | :heavy_minus_sign: | N/A | 1 | -| `originalTitle` | *string* | :heavy_minus_sign: | The original untranslated name of the media item when non-english, or the track artist if an audio Item has an album artist | The American Dream Is Killing Me | -| `parentGuid` | *string* | :heavy_minus_sign: | N/A | plex://album/65394d6d472b8ab03ef47f12 | -| `parentIndex` | *number* | :heavy_minus_sign: | N/A | 1 | -| `parentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67084 | -| `parentRatingKey` | *string* | :heavy_minus_sign: | N/A | 67084 | -| `parentStudio` | *string* | :heavy_minus_sign: | N/A | Reprise Records | -| `parentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 | -| `parentTitle` | *string* | :heavy_minus_sign: | N/A | Saviors | -| `parentYear` | *number* | :heavy_minus_sign: | N/A | 2024 | -| `ratingCount` | *number* | :heavy_minus_sign: | N/A | 45885 | -| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 67085 | -| `sessionKey` | *string* | :heavy_minus_sign: | N/A | 203 | -| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 | -| `title` | *string* | :heavy_minus_sign: | N/A | The American Dream Is Killing Me | -| `titleSort` | *string* | :heavy_minus_sign: | N/A | American Dream Is Killing Me | -| `type` | *string* | :heavy_minus_sign: | N/A | track | -| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705543314 | -| `viewOffset` | *number* | :heavy_minus_sign: | N/A | 1000 | -| `media` | [operations.GetSessionsMedia](../../../sdk/models/operations/getsessionsmedia.md)[] | :heavy_minus_sign: | N/A | | -| `user` | [operations.GetSessionsUser](../../../sdk/models/operations/getsessionsuser.md) | :heavy_minus_sign: | N/A | | -| `player` | [operations.Player](../../../sdk/models/operations/player.md) | :heavy_minus_sign: | N/A | | -| `session` | [operations.Session](../../../sdk/models/operations/session.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsessionspart.md b/docs/sdk/models/operations/getsessionspart.md deleted file mode 100644 index d8f97e1a..00000000 --- a/docs/sdk/models/operations/getsessionspart.md +++ /dev/null @@ -1,59 +0,0 @@ -# GetSessionsPart - -## Example Usage - -```typescript -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", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `container` | *string* | :heavy_minus_sign: | N/A | flac | -| `duration` | *number* | :heavy_minus_sign: | N/A | 186240 | -| `file` | *string* | :heavy_minus_sign: | N/A | /music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac | -| `hasThumbnail` | *string* | :heavy_minus_sign: | N/A | 1 | -| `id` | *string* | :heavy_minus_sign: | N/A | 130625 | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/parts/130625/1705543268/file.flac | -| `size` | *number* | :heavy_minus_sign: | N/A | 23644000 | -| `decision` | *string* | :heavy_minus_sign: | N/A | directplay | -| `selected` | *boolean* | :heavy_minus_sign: | N/A | true | -| `stream` | [operations.GetSessionsStream](../../../sdk/models/operations/getsessionsstream.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsessionsresponse.md b/docs/sdk/models/operations/getsessionsresponse.md index f7d96d9f..7f186d1f 100644 --- a/docs/sdk/models/operations/getsessionsresponse.md +++ b/docs/sdk/models/operations/getsessionsresponse.md @@ -7,15 +7,24 @@ import { GetSessionsResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSessionsResponse = { contentType: "", - statusCode: 740937, + statusCode: 269270, + headers: { + "key": [ + "", + ], + "key1": [ + "", + ], + }, }; ``` ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetSessionsResponseBody](../../../sdk/models/operations/getsessionsresponsebody.md) | :heavy_minus_sign: | List of Active Plex Sessions | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsessionsresponsebody.md b/docs/sdk/models/operations/getsessionsresponsebody.md deleted file mode 100644 index a6f6bb4e..00000000 --- a/docs/sdk/models/operations/getsessionsresponsebody.md +++ /dev/null @@ -1,135 +0,0 @@ -# GetSessionsResponseBody - -List of Active Plex Sessions - -## Example Usage - -```typescript -import { GetSessionsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSessionsResponseBody = { - 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", - originalTitle: "The American Dream Is Killing Me", - 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", - }, - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetSessionsMediaContainer](../../../sdk/models/operations/getsessionsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsessionsstream.md b/docs/sdk/models/operations/getsessionsstream.md deleted file mode 100644 index 4157585d..00000000 --- a/docs/sdk/models/operations/getsessionsstream.md +++ /dev/null @@ -1,55 +0,0 @@ -# GetSessionsStream - -## Example Usage - -```typescript -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", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `albumGain` | *string* | :heavy_minus_sign: | N/A | -12.94 | -| `albumPeak` | *string* | :heavy_minus_sign: | N/A | 1.000000 | -| `albumRange` | *string* | :heavy_minus_sign: | N/A | 4.751014 | -| `audioChannelLayout` | *string* | :heavy_minus_sign: | N/A | stereo | -| `bitDepth` | *number* | :heavy_minus_sign: | N/A | 16 | -| `bitrate` | *number* | :heavy_minus_sign: | N/A | 1014 | -| `channels` | *number* | :heavy_minus_sign: | N/A | 2 | -| `codec` | *string* | :heavy_minus_sign: | N/A | flac | -| `displayTitle` | *string* | :heavy_minus_sign: | N/A | FLAC (Stereo) | -| `extendedDisplayTitle` | *string* | :heavy_minus_sign: | N/A | FLAC (Stereo) | -| `gain` | *string* | :heavy_minus_sign: | N/A | -12.94 | -| `id` | *string* | :heavy_minus_sign: | N/A | 352487 | -| `index` | *number* | :heavy_minus_sign: | N/A | 0 | -| `loudness` | *string* | :heavy_minus_sign: | N/A | -5.94 | -| `lra` | *string* | :heavy_minus_sign: | N/A | 1.74 | -| `peak` | *string* | :heavy_minus_sign: | N/A | 1.000000 | -| `samplingRate` | *number* | :heavy_minus_sign: | N/A | 44100 | -| `selected` | *boolean* | :heavy_minus_sign: | N/A | true | -| `streamType` | *number* | :heavy_minus_sign: | N/A | 2 | -| `location` | *string* | :heavy_minus_sign: | N/A | direct | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsessionsuser.md b/docs/sdk/models/operations/getsessionsuser.md deleted file mode 100644 index 36cc80aa..00000000 --- a/docs/sdk/models/operations/getsessionsuser.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetSessionsUser - -## Example Usage - -```typescript -import { GetSessionsUser } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetSessionsUser = { - id: "1", - thumb: "https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661", - title: "Blindkitty38", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | 1 | -| `thumb` | *string* | :heavy_minus_sign: | N/A | https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661 | -| `title` | *string* | :heavy_minus_sign: | N/A | Blindkitty38 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsonicallysimilarglobals.md b/docs/sdk/models/operations/getsonicallysimilarglobals.md new file mode 100644 index 00000000..7ab82d65 --- /dev/null +++ b/docs/sdk/models/operations/getsonicallysimilarglobals.md @@ -0,0 +1,35 @@ +# GetSonicallySimilarGlobals + +## Example Usage + +```typescript +import { GetSonicallySimilarGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSonicallySimilarGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsonicallysimilarrequest.md b/docs/sdk/models/operations/getsonicallysimilarrequest.md new file mode 100644 index 00000000..68aee474 --- /dev/null +++ b/docs/sdk/models/operations/getsonicallysimilarrequest.md @@ -0,0 +1,34 @@ +# GetSonicallySimilarRequest + +## Example Usage + +```typescript +import { GetSonicallySimilarRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSonicallySimilarRequest = { + sectionId: 363501, + values: [ + 962457, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | +| `type` | *number* | :heavy_minus_sign: | The metadata type to fetch (should be 10 for audio track) | | +| `values` | *number*[] | :heavy_check_mark: | The music analysis to center the search. Typically obtained from the `musicAnalysis` of a track | | +| `limit` | *number* | :heavy_minus_sign: | The limit of the number of items to fetch; defaults to 50 | | +| `maxDistance` | *number* | :heavy_minus_sign: | The maximum distance to search, defaults to 0.25 | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsonicallysimilarresponse.md b/docs/sdk/models/operations/getsonicallysimilarresponse.md new file mode 100644 index 00000000..73af5767 --- /dev/null +++ b/docs/sdk/models/operations/getsonicallysimilarresponse.md @@ -0,0 +1,21 @@ +# GetSonicallySimilarResponse + +## Example Usage + +```typescript +import { GetSonicallySimilarResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSonicallySimilarResponse = { + contentType: "", + statusCode: 389945, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsonicpathglobals.md b/docs/sdk/models/operations/getsonicpathglobals.md new file mode 100644 index 00000000..a1c842c3 --- /dev/null +++ b/docs/sdk/models/operations/getsonicpathglobals.md @@ -0,0 +1,35 @@ +# GetSonicPathGlobals + +## Example Usage + +```typescript +import { GetSonicPathGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSonicPathGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsonicpathrequest.md b/docs/sdk/models/operations/getsonicpathrequest.md new file mode 100644 index 00000000..9ccc68d2 --- /dev/null +++ b/docs/sdk/models/operations/getsonicpathrequest.md @@ -0,0 +1,33 @@ +# GetSonicPathRequest + +## Example Usage + +```typescript +import { GetSonicPathRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSonicPathRequest = { + sectionId: 683613, + startID: 872661, + endID: 863631, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | +| `startID` | *number* | :heavy_check_mark: | The starting metadata item id | | +| `endID` | *number* | :heavy_check_mark: | The ending metadata item id | | +| `count` | *number* | :heavy_minus_sign: | Limit results to count items | | +| `maxDistance` | *number* | :heavy_minus_sign: | The maximum distance allowed along the path; defaults to 0.25 | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsonicpathresponse.md b/docs/sdk/models/operations/getsonicpathresponse.md new file mode 100644 index 00000000..b4f3cbf0 --- /dev/null +++ b/docs/sdk/models/operations/getsonicpathresponse.md @@ -0,0 +1,21 @@ +# GetSonicPathResponse + +## Example Usage + +```typescript +import { GetSonicPathResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSonicPathResponse = { + contentType: "", + statusCode: 489991, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsourceconnectioninformationdevice.md b/docs/sdk/models/operations/getsourceconnectioninformationdevice.md new file mode 100644 index 00000000..c4d66aec --- /dev/null +++ b/docs/sdk/models/operations/getsourceconnectioninformationdevice.md @@ -0,0 +1,18 @@ +# GetSourceConnectionInformationDevice + +## Example Usage + +```typescript +import { GetSourceConnectionInformationDevice } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSourceConnectionInformationDevice = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `accessToken` | *string* | :heavy_minus_sign: | N/A | +| `clientIdentifier` | *string* | :heavy_minus_sign: | N/A | +| `connection` | [operations.Connection](../../../sdk/models/operations/connection.md)[] | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsourceconnectioninformationglobals.md b/docs/sdk/models/operations/getsourceconnectioninformationglobals.md new file mode 100644 index 00000000..c9e41b8c --- /dev/null +++ b/docs/sdk/models/operations/getsourceconnectioninformationglobals.md @@ -0,0 +1,35 @@ +# GetSourceConnectionInformationGlobals + +## Example Usage + +```typescript +import { GetSourceConnectionInformationGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSourceConnectionInformationGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsourceconnectioninformationmediacontainer.md b/docs/sdk/models/operations/getsourceconnectioninformationmediacontainer.md new file mode 100644 index 00000000..0057f411 --- /dev/null +++ b/docs/sdk/models/operations/getsourceconnectioninformationmediacontainer.md @@ -0,0 +1,24 @@ +# GetSourceConnectionInformationMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetSourceConnectionInformationMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSourceConnectionInformationMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `device` | [operations.GetSourceConnectionInformationDevice](../../../sdk/models/operations/getsourceconnectioninformationdevice.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsourceconnectioninformationrequest.md b/docs/sdk/models/operations/getsourceconnectioninformationrequest.md index 40f1e44f..b67ff90f 100644 --- a/docs/sdk/models/operations/getsourceconnectioninformationrequest.md +++ b/docs/sdk/models/operations/getsourceconnectioninformationrequest.md @@ -4,14 +4,27 @@ ```typescript import { GetSourceConnectionInformationRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; let value: GetSourceConnectionInformationRequest = { - source: "server://client-identifier", + source: "", + refresh: BoolInt.One, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `source` | *string* | :heavy_check_mark: | The source identifier with an included prefix. | server://client-identifier | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `source` | *string* | :heavy_check_mark: | The source identifier with an included prefix. | | +| `refresh` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Force refresh | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsourceconnectioninformationresponse.md b/docs/sdk/models/operations/getsourceconnectioninformationresponse.md index e400cca2..5b793a00 100644 --- a/docs/sdk/models/operations/getsourceconnectioninformationresponse.md +++ b/docs/sdk/models/operations/getsourceconnectioninformationresponse.md @@ -13,8 +13,9 @@ let value: GetSourceConnectionInformationResponse = { ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetSourceConnectionInformationResponseBody](../../../sdk/models/operations/getsourceconnectioninformationresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsourceconnectioninformationresponsebody.md b/docs/sdk/models/operations/getsourceconnectioninformationresponsebody.md new file mode 100644 index 00000000..c0973501 --- /dev/null +++ b/docs/sdk/models/operations/getsourceconnectioninformationresponsebody.md @@ -0,0 +1,17 @@ +# GetSourceConnectionInformationResponseBody + +OK + +## Example Usage + +```typescript +import { GetSourceConnectionInformationResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSourceConnectionInformationResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetSourceConnectionInformationMediaContainer](../../../sdk/models/operations/getsourceconnectioninformationmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getstatisticsdevice.md b/docs/sdk/models/operations/getstatisticsdevice.md deleted file mode 100644 index e9e458eb..00000000 --- a/docs/sdk/models/operations/getstatisticsdevice.md +++ /dev/null @@ -1,25 +0,0 @@ -# GetStatisticsDevice - -## Example Usage - -```typescript -import { GetStatisticsDevice } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetStatisticsDevice = { - id: 208, - name: "Roku Express", - platform: "Roku", - clientIdentifier: "793095d235660625108ef785cc7646e9", - createdAt: 1706470556, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `id` | *number* | :heavy_minus_sign: | N/A | 208 | -| `name` | *string* | :heavy_minus_sign: | N/A | Roku Express | -| `platform` | *string* | :heavy_minus_sign: | N/A | Roku | -| `clientIdentifier` | *string* | :heavy_minus_sign: | N/A | 793095d235660625108ef785cc7646e9 | -| `createdAt` | *number* | :heavy_minus_sign: | N/A | 1706470556 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getstatisticsmediacontainer.md b/docs/sdk/models/operations/getstatisticsmediacontainer.md deleted file mode 100644 index a8974cf6..00000000 --- a/docs/sdk/models/operations/getstatisticsmediacontainer.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetStatisticsMediaContainer - -## Example Usage - -```typescript -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, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 5497 | -| `device` | [operations.GetStatisticsDevice](../../../sdk/models/operations/getstatisticsdevice.md)[] | :heavy_minus_sign: | N/A | | -| `account` | [operations.Account](../../../sdk/models/operations/account.md)[] | :heavy_minus_sign: | N/A | | -| `statisticsMedia` | [operations.StatisticsMedia](../../../sdk/models/operations/statisticsmedia.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getstatisticsrequest.md b/docs/sdk/models/operations/getstatisticsrequest.md deleted file mode 100644 index a3055e9a..00000000 --- a/docs/sdk/models/operations/getstatisticsrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetStatisticsRequest - -## Example Usage - -```typescript -import { GetStatisticsRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetStatisticsRequest = { - timespan: 4, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `timespan` | *number* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| 4 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getstatisticsresponse.md b/docs/sdk/models/operations/getstatisticsresponse.md deleted file mode 100644 index 4dd72c79..00000000 --- a/docs/sdk/models/operations/getstatisticsresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetStatisticsResponse - -## Example Usage - -```typescript -import { GetStatisticsResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetStatisticsResponse = { - contentType: "", - statusCode: 294297, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetStatisticsResponseBody](../../../sdk/models/operations/getstatisticsresponsebody.md) | :heavy_minus_sign: | Media Statistics | \ No newline at end of file diff --git a/docs/sdk/models/operations/getstatisticsresponsebody.md b/docs/sdk/models/operations/getstatisticsresponsebody.md deleted file mode 100644 index 4529b303..00000000 --- a/docs/sdk/models/operations/getstatisticsresponsebody.md +++ /dev/null @@ -1,53 +0,0 @@ -# GetStatisticsResponseBody - -Media Statistics - -## Example Usage - -```typescript -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, - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetStatisticsMediaContainer](../../../sdk/models/operations/getstatisticsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getstreamglobals.md b/docs/sdk/models/operations/getstreamglobals.md new file mode 100644 index 00000000..564f8042 --- /dev/null +++ b/docs/sdk/models/operations/getstreamglobals.md @@ -0,0 +1,35 @@ +# GetStreamGlobals + +## Example Usage + +```typescript +import { GetStreamGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetStreamGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getstreamlevelsglobals.md b/docs/sdk/models/operations/getstreamlevelsglobals.md new file mode 100644 index 00000000..4c568431 --- /dev/null +++ b/docs/sdk/models/operations/getstreamlevelsglobals.md @@ -0,0 +1,35 @@ +# GetStreamLevelsGlobals + +## Example Usage + +```typescript +import { GetStreamLevelsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetStreamLevelsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getstreamlevelslevel.md b/docs/sdk/models/operations/getstreamlevelslevel.md new file mode 100644 index 00000000..05fea71d --- /dev/null +++ b/docs/sdk/models/operations/getstreamlevelslevel.md @@ -0,0 +1,15 @@ +# GetStreamLevelsLevel + +## Example Usage + +```typescript +import { GetStreamLevelsLevel } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetStreamLevelsLevel = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `v` | *number* | :heavy_minus_sign: | The level in db. | \ No newline at end of file diff --git a/docs/sdk/models/operations/getstreamlevelsmediacontainer.md b/docs/sdk/models/operations/getstreamlevelsmediacontainer.md new file mode 100644 index 00000000..560fa3cb --- /dev/null +++ b/docs/sdk/models/operations/getstreamlevelsmediacontainer.md @@ -0,0 +1,25 @@ +# GetStreamLevelsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetStreamLevelsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetStreamLevelsMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `level` | [operations.GetStreamLevelsLevel](../../../sdk/models/operations/getstreamlevelslevel.md)[] | :heavy_minus_sign: | N/A | +| `totalSamples` | *string* | :heavy_minus_sign: | The total number of samples (as a string) | \ No newline at end of file diff --git a/docs/sdk/models/operations/getstreamlevelsrequest.md b/docs/sdk/models/operations/getstreamlevelsrequest.md new file mode 100644 index 00000000..1c127743 --- /dev/null +++ b/docs/sdk/models/operations/getstreamlevelsrequest.md @@ -0,0 +1,28 @@ +# GetStreamLevelsRequest + +## Example Usage + +```typescript +import { GetStreamLevelsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetStreamLevelsRequest = { + streamId: 474264, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `streamId` | *number* | :heavy_check_mark: | The id of the stream | | +| `subsample` | *number* | :heavy_minus_sign: | Subsample result down to return only the provided number of samples | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getstreamlevelsresponse.md b/docs/sdk/models/operations/getstreamlevelsresponse.md new file mode 100644 index 00000000..29d6195c --- /dev/null +++ b/docs/sdk/models/operations/getstreamlevelsresponse.md @@ -0,0 +1,21 @@ +# GetStreamLevelsResponse + +## Example Usage + +```typescript +import { GetStreamLevelsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetStreamLevelsResponse = { + contentType: "", + statusCode: 382130, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetStreamLevelsResponseBody](../../../sdk/models/operations/getstreamlevelsresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getstreamlevelsresponsebody.md b/docs/sdk/models/operations/getstreamlevelsresponsebody.md new file mode 100644 index 00000000..970e9145 --- /dev/null +++ b/docs/sdk/models/operations/getstreamlevelsresponsebody.md @@ -0,0 +1,17 @@ +# GetStreamLevelsResponseBody + +OK + +## Example Usage + +```typescript +import { GetStreamLevelsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetStreamLevelsResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetStreamLevelsMediaContainer](../../../sdk/models/operations/getstreamlevelsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getstreamloudnessglobals.md b/docs/sdk/models/operations/getstreamloudnessglobals.md new file mode 100644 index 00000000..7f67743f --- /dev/null +++ b/docs/sdk/models/operations/getstreamloudnessglobals.md @@ -0,0 +1,35 @@ +# GetStreamLoudnessGlobals + +## Example Usage + +```typescript +import { GetStreamLoudnessGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetStreamLoudnessGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getstreamloudnessrequest.md b/docs/sdk/models/operations/getstreamloudnessrequest.md new file mode 100644 index 00000000..f642657a --- /dev/null +++ b/docs/sdk/models/operations/getstreamloudnessrequest.md @@ -0,0 +1,28 @@ +# GetStreamLoudnessRequest + +## Example Usage + +```typescript +import { GetStreamLoudnessRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetStreamLoudnessRequest = { + streamId: 811213, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `streamId` | *number* | :heavy_check_mark: | The id of the stream | | +| `subsample` | *number* | :heavy_minus_sign: | Subsample result down to return only the provided number of samples | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getstreamloudnessresponse.md b/docs/sdk/models/operations/getstreamloudnessresponse.md new file mode 100644 index 00000000..987a34f9 --- /dev/null +++ b/docs/sdk/models/operations/getstreamloudnessresponse.md @@ -0,0 +1,21 @@ +# GetStreamLoudnessResponse + +## Example Usage + +```typescript +import { GetStreamLoudnessResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetStreamLoudnessResponse = { + contentType: "", + statusCode: 831734, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | +| `res` | *string* | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getstreamrequest.md b/docs/sdk/models/operations/getstreamrequest.md new file mode 100644 index 00000000..4fe08506 --- /dev/null +++ b/docs/sdk/models/operations/getstreamrequest.md @@ -0,0 +1,34 @@ +# GetStreamRequest + +## Example Usage + +```typescript +import { GetStreamRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: GetStreamRequest = { + streamId: 471434, + ext: "", + autoAdjustSubtitle: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `streamId` | *number* | :heavy_check_mark: | The id of the stream | | +| `ext` | *string* | :heavy_check_mark: | The extension of the stream. Required to fetch the `sub` portion of `idx`/`sub` subtitles | | +| `encoding` | *string* | :heavy_minus_sign: | The requested encoding for the subtitle (only used for text subtitles) | | +| `format` | *string* | :heavy_minus_sign: | The requested format for the subtitle to convert the subtitles to (only used for text subtitles) | | +| `autoAdjustSubtitle` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Whether the server should attempt to automatically adjust the subtitle timestamps to match the media | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getstreamresponse.md b/docs/sdk/models/operations/getstreamresponse.md new file mode 100644 index 00000000..93ee2412 --- /dev/null +++ b/docs/sdk/models/operations/getstreamresponse.md @@ -0,0 +1,20 @@ +# GetStreamResponse + +## Example Usage + +```typescript +import { GetStreamResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetStreamResponse = { + contentType: "", + statusCode: 810113, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsubscriptionglobals.md b/docs/sdk/models/operations/getsubscriptionglobals.md new file mode 100644 index 00000000..4f52b0f9 --- /dev/null +++ b/docs/sdk/models/operations/getsubscriptionglobals.md @@ -0,0 +1,35 @@ +# GetSubscriptionGlobals + +## Example Usage + +```typescript +import { GetSubscriptionGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSubscriptionGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsubscriptionrequest.md b/docs/sdk/models/operations/getsubscriptionrequest.md new file mode 100644 index 00000000..975d762a --- /dev/null +++ b/docs/sdk/models/operations/getsubscriptionrequest.md @@ -0,0 +1,32 @@ +# GetSubscriptionRequest + +## Example Usage + +```typescript +import { GetSubscriptionRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: GetSubscriptionRequest = { + subscriptionId: 533467, + includeGrabs: BoolInt.One, + includeStorage: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `subscriptionId` | *number* | :heavy_check_mark: | N/A | | +| `includeGrabs` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates whether the active grabs should be included as well | 1 | +| `includeStorage` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Compute the storage of recorded items desired by this subscription | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getsubscriptionresponse.md b/docs/sdk/models/operations/getsubscriptionresponse.md new file mode 100644 index 00000000..99d4c2cd --- /dev/null +++ b/docs/sdk/models/operations/getsubscriptionresponse.md @@ -0,0 +1,21 @@ +# GetSubscriptionResponse + +## Example Usage + +```typescript +import { GetSubscriptionResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetSubscriptionResponse = { + contentType: "", + statusCode: 484674, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithSubscription` | [shared.MediaContainerWithSubscription](../../../sdk/models/shared/mediacontainerwithsubscription.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettagsdirectory.md b/docs/sdk/models/operations/gettagsdirectory.md new file mode 100644 index 00000000..aef6c40c --- /dev/null +++ b/docs/sdk/models/operations/gettagsdirectory.md @@ -0,0 +1,20 @@ +# GetTagsDirectory + +## Example Usage + +```typescript +import { GetTagsDirectory } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetTagsDirectory = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `filter` | *string* | :heavy_minus_sign: | The filter string to view metadata wit this tag | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `tag` | *string* | :heavy_minus_sign: | The name of the tag | +| `tagKey` | *string* | :heavy_minus_sign: | The key of this tag. This is a universal key across all PMS instances and plex.tv services | +| `tagType` | *number* | :heavy_minus_sign: | The type of the tag | +| `thumb` | *string* | :heavy_minus_sign: | The URL to a thumbnail for this tag | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettagsglobals.md b/docs/sdk/models/operations/gettagsglobals.md new file mode 100644 index 00000000..010b181d --- /dev/null +++ b/docs/sdk/models/operations/gettagsglobals.md @@ -0,0 +1,35 @@ +# GetTagsGlobals + +## Example Usage + +```typescript +import { GetTagsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetTagsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettagsmediacontainer.md b/docs/sdk/models/operations/gettagsmediacontainer.md new file mode 100644 index 00000000..1d4c0a18 --- /dev/null +++ b/docs/sdk/models/operations/gettagsmediacontainer.md @@ -0,0 +1,24 @@ +# GetTagsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetTagsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetTagsMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `directory` | [operations.GetTagsDirectory](../../../sdk/models/operations/gettagsdirectory.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettagsrequest.md b/docs/sdk/models/operations/gettagsrequest.md new file mode 100644 index 00000000..5f6cb1dc --- /dev/null +++ b/docs/sdk/models/operations/gettagsrequest.md @@ -0,0 +1,25 @@ +# GetTagsRequest + +## Example Usage + +```typescript +import { GetTagsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetTagsRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `type` | *number* | :heavy_minus_sign: | The metadata type to filter by | | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettagsresponse.md b/docs/sdk/models/operations/gettagsresponse.md new file mode 100644 index 00000000..291342fc --- /dev/null +++ b/docs/sdk/models/operations/gettagsresponse.md @@ -0,0 +1,21 @@ +# GetTagsResponse + +## Example Usage + +```typescript +import { GetTagsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetTagsResponse = { + contentType: "", + statusCode: 501738, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetTagsResponseBody](../../../sdk/models/operations/gettagsresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettagsresponsebody.md b/docs/sdk/models/operations/gettagsresponsebody.md new file mode 100644 index 00000000..c31e563e --- /dev/null +++ b/docs/sdk/models/operations/gettagsresponsebody.md @@ -0,0 +1,17 @@ +# GetTagsResponseBody + +OK + +## Example Usage + +```typescript +import { GetTagsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetTagsResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetTagsMediaContainer](../../../sdk/models/operations/gettagsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettasksresponse.md b/docs/sdk/models/operations/gettasksresponse.md new file mode 100644 index 00000000..675996cc --- /dev/null +++ b/docs/sdk/models/operations/gettasksresponse.md @@ -0,0 +1,21 @@ +# GetTasksResponse + +## Example Usage + +```typescript +import { GetTasksResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetTasksResponse = { + contentType: "", + statusCode: 124531, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetTasksResponseBody](../../../sdk/models/operations/gettasksresponsebody.md) | :heavy_minus_sign: | Butler tasks | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettasksresponsebody.md b/docs/sdk/models/operations/gettasksresponsebody.md new file mode 100644 index 00000000..71a7f9c2 --- /dev/null +++ b/docs/sdk/models/operations/gettasksresponsebody.md @@ -0,0 +1,17 @@ +# GetTasksResponseBody + +Butler tasks + +## Example Usage + +```typescript +import { GetTasksResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetTasksResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `butlerTasks` | [operations.ButlerTasks](../../../sdk/models/operations/butlertasks.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettemplateglobals.md b/docs/sdk/models/operations/gettemplateglobals.md new file mode 100644 index 00000000..f1f35577 --- /dev/null +++ b/docs/sdk/models/operations/gettemplateglobals.md @@ -0,0 +1,35 @@ +# GetTemplateGlobals + +## Example Usage + +```typescript +import { GetTemplateGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetTemplateGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettemplatemediacontainer.md b/docs/sdk/models/operations/gettemplatemediacontainer.md new file mode 100644 index 00000000..62d221a9 --- /dev/null +++ b/docs/sdk/models/operations/gettemplatemediacontainer.md @@ -0,0 +1,188 @@ +# GetTemplateMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetTemplateMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetTemplateMediaContainer = { + subscriptionTemplate: [ + { + mediaSubscription: [ + { + title: "This Episode", + mediaGrabOperation: [ + { + metadata: { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: + "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + }, + ], + }, + ], + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `subscriptionTemplate` | [operations.SubscriptionTemplate](../../../sdk/models/operations/subscriptiontemplate.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettemplaterequest.md b/docs/sdk/models/operations/gettemplaterequest.md new file mode 100644 index 00000000..8b6e864b --- /dev/null +++ b/docs/sdk/models/operations/gettemplaterequest.md @@ -0,0 +1,27 @@ +# GetTemplateRequest + +## Example Usage + +```typescript +import { GetTemplateRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetTemplateRequest = { + guid: "plex://episode/5fc70265c40548002d539d23", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `guid` | *string* | :heavy_minus_sign: | The guid of the item for which to get the template | plex://episode/5fc70265c40548002d539d23 | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettemplateresponse.md b/docs/sdk/models/operations/gettemplateresponse.md new file mode 100644 index 00000000..3024fd19 --- /dev/null +++ b/docs/sdk/models/operations/gettemplateresponse.md @@ -0,0 +1,23 @@ +# GetTemplateResponse + +## Example Usage + +```typescript +import { GetTemplateResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetTemplateResponse = { + contentType: "", + statusCode: 473665, + headers: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetTemplateResponseBody](../../../sdk/models/operations/gettemplateresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettemplateresponsebody.md b/docs/sdk/models/operations/gettemplateresponsebody.md new file mode 100644 index 00000000..19d2b130 --- /dev/null +++ b/docs/sdk/models/operations/gettemplateresponsebody.md @@ -0,0 +1,183 @@ +# GetTemplateResponseBody + +OK + +## Example Usage + +```typescript +import { GetTemplateResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetTemplateResponseBody = { + mediaContainer: { + subscriptionTemplate: [ + { + mediaSubscription: [ + { + title: "This Episode", + mediaGrabOperation: [ + { + metadata: { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: + "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + }, + ], + }, + ], + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetTemplateMediaContainer](../../../sdk/models/operations/gettemplatemediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getthumbglobals.md b/docs/sdk/models/operations/getthumbglobals.md new file mode 100644 index 00000000..c4a0290e --- /dev/null +++ b/docs/sdk/models/operations/getthumbglobals.md @@ -0,0 +1,35 @@ +# GetThumbGlobals + +## Example Usage + +```typescript +import { GetThumbGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetThumbGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/getthumbimagerequest.md b/docs/sdk/models/operations/getthumbimagerequest.md deleted file mode 100644 index 37209964..00000000 --- a/docs/sdk/models/operations/getthumbimagerequest.md +++ /dev/null @@ -1,27 +0,0 @@ -# GetThumbImageRequest - -## Example Usage - -```typescript -import { GetThumbImageRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetThumbImageRequest = { - ratingKey: 9518, - width: 396, - height: 396, - minSize: 1, - upscale: 1, - xPlexToken: "CV5xoxjTpFKUzBTShsaf", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the children of. | 9518 | -| `width` | *number* | :heavy_check_mark: | N/A | 396 | -| `height` | *number* | :heavy_check_mark: | N/A | 396 | -| `minSize` | *number* | :heavy_check_mark: | N/A | 1 | -| `upscale` | *number* | :heavy_check_mark: | N/A | 1 | -| `xPlexToken` | *string* | :heavy_check_mark: | An authentication token, obtained from plex.tv | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/sdk/models/operations/getthumbimageresponse.md b/docs/sdk/models/operations/getthumbimageresponse.md deleted file mode 100644 index 4191c249..00000000 --- a/docs/sdk/models/operations/getthumbimageresponse.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetThumbImageResponse - -## Example Usage - -```typescript -import { GetThumbImageResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | -| `responseStream` | *ReadableStream* | :heavy_minus_sign: | Successful response returning an image | -| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getthumbrequest.md b/docs/sdk/models/operations/getthumbrequest.md new file mode 100644 index 00000000..b5ccd7f0 --- /dev/null +++ b/docs/sdk/models/operations/getthumbrequest.md @@ -0,0 +1,29 @@ +# GetThumbRequest + +## Example Usage + +```typescript +import { GetThumbRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetThumbRequest = { + deviceId: 689308, + version: 911429, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `deviceId` | *number* | :heavy_check_mark: | The ID of the device. | | +| `version` | *number* | :heavy_check_mark: | A version number of the thumb used for busting cache | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getthumbresponse.md b/docs/sdk/models/operations/getthumbresponse.md new file mode 100644 index 00000000..c2e68141 --- /dev/null +++ b/docs/sdk/models/operations/getthumbresponse.md @@ -0,0 +1,20 @@ +# GetThumbResponse + +## Example Usage + +```typescript +import { GetThumbResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetThumbResponse = { + contentType: "", + statusCode: 249506, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettimelinerequest.md b/docs/sdk/models/operations/gettimelinerequest.md deleted file mode 100644 index ec6c6135..00000000 --- a/docs/sdk/models/operations/gettimelinerequest.md +++ /dev/null @@ -1,35 +0,0 @@ -# GetTimelineRequest - -## Example Usage - -```typescript -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, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `ratingKey` | *number* | :heavy_check_mark: | The rating key of the media item | 23409 | -| `key` | *string* | :heavy_check_mark: | The key of the media item to get the timeline for | /library/metadata/23409 | -| `state` | [operations.State](../../../sdk/models/operations/state.md) | :heavy_check_mark: | The state of the media item | playing | -| `hasMDE` | *number* | :heavy_check_mark: | Whether the media item has MDE | 1 | -| `time` | *number* | :heavy_check_mark: | The time of the media item | 2000 | -| `duration` | *number* | :heavy_check_mark: | The duration of the media item | 10000 | -| `context` | *string* | :heavy_check_mark: | The context of the media item | home:hub.continueWatching | -| `playQueueItemID` | *number* | :heavy_check_mark: | The play queue item ID of the media item | 1 | -| `playBackTime` | *number* | :heavy_check_mark: | The playback time of the media item | 2000 | -| `row` | *number* | :heavy_check_mark: | The row of the media item | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettimelineresponse.md b/docs/sdk/models/operations/gettimelineresponse.md deleted file mode 100644 index 8beaf66e..00000000 --- a/docs/sdk/models/operations/gettimelineresponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetTimelineResponse - -## Example Usage - -```typescript -import { GetTimelineResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetTimelineResponse = { - contentType: "", - statusCode: 227259, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettokenbypinidauthpincontainer.md b/docs/sdk/models/operations/gettokenbypinidauthpincontainer.md deleted file mode 100644 index 4ca7a3ad..00000000 --- a/docs/sdk/models/operations/gettokenbypinidauthpincontainer.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetTokenByPinIdAuthPinContainer - -The Pin with a non-null authToken when it has been verified by the user - -## Example Usage - -```typescript -import { GetTokenByPinIdAuthPinContainer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetTokenByPinIdAuthPinContainer = { - id: 308667304, - code: "7RQZ", - product: "0", - 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, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | N/A | 308667304 | -| `code` | *string* | :heavy_check_mark: | N/A | 7RQZ | -| `product` | *string* | :heavy_check_mark: | N/A | Tautulli | -| `trusted` | *boolean* | :heavy_minus_sign: | N/A | | -| `qr` | *string* | :heavy_check_mark: | N/A | https://plex.tv/api/v2/pins/qr/7RQZ | -| `clientIdentifier` | *string* | :heavy_check_mark: | The X-Client-Identifier used in the request | Tautulli | -| `location` | [operations.GetTokenByPinIdGeoData](../../../sdk/models/operations/gettokenbypinidgeodata.md) | :heavy_check_mark: | Geo location data | {
"code": "VI",
"continent_code": "NA",
"country": "United States Virgin Islands",
"city": "Amsterdam",
"european_union_member": true,
"time_zone": "America/St_Thomas",
"postal_code": 802,
"in_privacy_restricted_country": true,
"in_privacy_restricted_region": true,
"subdivisions": "Saint Thomas",
"coordinates": "18.3381, -64.8941"
} | -| `expiresIn` | *number* | :heavy_minus_sign: | The number of seconds this pin expires, by default 900 seconds | 876 | -| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | N/A | 2024-07-16T17:03:05Z | -| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | N/A | 2024-07-16T17:18:05Z | -| `authToken` | *string* | :heavy_minus_sign: | N/A | gcgzw5rz2xovp84b4vha3a40 | -| `newRegistration` | *any* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettokenbypinidgeodata.md b/docs/sdk/models/operations/gettokenbypinidgeodata.md deleted file mode 100644 index 69f899b2..00000000 --- a/docs/sdk/models/operations/gettokenbypinidgeodata.md +++ /dev/null @@ -1,39 +0,0 @@ -# GetTokenByPinIdGeoData - -Geo location data - -## Example Usage - -```typescript -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", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `code` | *string* | :heavy_check_mark: | The ISO 3166-1 alpha-2 code of the country. | VI | -| `continentCode` | *string* | :heavy_check_mark: | The continent code where the country is located. | NA | -| `country` | *string* | :heavy_check_mark: | The official name of the country. | United States Virgin Islands | -| `city` | *string* | :heavy_check_mark: | The name of the city. | Amsterdam | -| `europeanUnionMember` | *boolean* | :heavy_minus_sign: | Indicates if the country is a member of the European Union. | true | -| `timeZone` | *string* | :heavy_check_mark: | The time zone of the country. | America/St_Thomas | -| `postalCode` | *string* | :heavy_check_mark: | The postal code of the location. | 802 | -| `inPrivacyRestrictedCountry` | *boolean* | :heavy_minus_sign: | Indicates if the country has privacy restrictions. | true | -| `inPrivacyRestrictedRegion` | *boolean* | :heavy_minus_sign: | Indicates if the region has privacy restrictions. | true | -| `subdivisions` | *string* | :heavy_check_mark: | The name of the primary administrative subdivision. | Saint Thomas | -| `coordinates` | *string* | :heavy_check_mark: | The geographical coordinates (latitude, longitude) of the location. | 18.3381, -64.8941 | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettokenbypinidrequest.md b/docs/sdk/models/operations/gettokenbypinidrequest.md deleted file mode 100644 index a7a203d8..00000000 --- a/docs/sdk/models/operations/gettokenbypinidrequest.md +++ /dev/null @@ -1,27 +0,0 @@ -# GetTokenByPinIdRequest - -## Example Usage - -```typescript -import { GetTokenByPinIdRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetTokenByPinIdRequest = { - pinID: 721343, - clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", - clientName: "Plex for Roku", - deviceNickname: "Roku 3", - clientVersion: "2.4.1", - platform: "Roku", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `pinID` | *number* | :heavy_check_mark: | The PinID to retrieve an access token for | | -| `clientID` | *string* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | -| `clientName` | *string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku | -| `deviceNickname` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | -| `clientVersion` | *string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 | -| `platform` | *string* | :heavy_minus_sign: | The platform of the client application. | Roku | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettokenbypinidresponse.md b/docs/sdk/models/operations/gettokenbypinidresponse.md deleted file mode 100644 index 488144d6..00000000 --- a/docs/sdk/models/operations/gettokenbypinidresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetTokenByPinIdResponse - -## Example Usage - -```typescript -import { GetTokenByPinIdResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetTokenByPinIdResponse = { - contentType: "", - statusCode: 125739, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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 | | -| `authPinContainer` | [operations.GetTokenByPinIdAuthPinContainer](../../../sdk/models/operations/gettokenbypinidauthpincontainer.md) | :heavy_minus_sign: | The Pin with a non-null authToken when it has been verified by the user | {
"id": 308667304,
"code": "7RQZ",
"product": "0",
"trusted": false,
"qr": "https://plex.tv/api/v2/pins/qr/7RQZ",
"clientIdentifier": "string",
"location": {
"code": "VI",
"continent_code": "NA",
"country": "United States Virgin Islands",
"city": "Amsterdam",
"european_union_member": true,
"time_zone": "America/St_Thomas",
"postal_code": 802,
"in_privacy_restricted_country": true,
"in_privacy_restricted_region": true,
"subdivisions": "Saint Thomas",
"coordinates": "18.3381, -64.8941"
},
"expiresIn": 876,
"createdAt": "2024-07-16T17:03:05Z",
"expiresAt": "2024-07-16T17:18:05Z",
"authToken": null,
"newRegistration": null
} | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettokendetailsauthenticationresponsestatus.md b/docs/sdk/models/operations/gettokendetailsauthenticationresponsestatus.md deleted file mode 100644 index 8414284e..00000000 --- a/docs/sdk/models/operations/gettokendetailsauthenticationresponsestatus.md +++ /dev/null @@ -1,22 +0,0 @@ -# GetTokenDetailsAuthenticationResponseStatus - -String representation of subscriptionActive - -## Example Usage - -```typescript -import { GetTokenDetailsAuthenticationResponseStatus } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetTokenDetailsAuthenticationResponseStatus = - GetTokenDetailsAuthenticationResponseStatus.Inactive; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Inactive` | Inactive | -| `Active` | Active | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettokendetailsauthenticationstatus.md b/docs/sdk/models/operations/gettokendetailsauthenticationstatus.md deleted file mode 100644 index 54163881..00000000 --- a/docs/sdk/models/operations/gettokendetailsauthenticationstatus.md +++ /dev/null @@ -1,22 +0,0 @@ -# GetTokenDetailsAuthenticationStatus - -String representation of subscriptionActive - -## Example Usage - -```typescript -import { GetTokenDetailsAuthenticationStatus } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetTokenDetailsAuthenticationStatus = - GetTokenDetailsAuthenticationStatus.Inactive; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Inactive` | Inactive | -| `Active` | Active | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettokendetailsresponse.md b/docs/sdk/models/operations/gettokendetailsresponse.md deleted file mode 100644 index 5703ebc9..00000000 --- a/docs/sdk/models/operations/gettokendetailsresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetTokenDetailsResponse - -## Example Usage - -```typescript -import { GetTokenDetailsResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetTokenDetailsResponse = { - contentType: "", - statusCode: 687254, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `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.GetTokenDetailsUserPlexAccount](../../../sdk/models/operations/gettokendetailsuserplexaccount.md) | :heavy_minus_sign: | Logged in user details | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettokendetailsstatus.md b/docs/sdk/models/operations/gettokendetailsstatus.md deleted file mode 100644 index f6e2c8b9..00000000 --- a/docs/sdk/models/operations/gettokendetailsstatus.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetTokenDetailsStatus - -## Example Usage - -```typescript -import { GetTokenDetailsStatus } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetTokenDetailsStatus = GetTokenDetailsStatus.Online; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Online` | online | -| `Offline` | offline | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettokendetailssubscription.md b/docs/sdk/models/operations/gettokendetailssubscription.md deleted file mode 100644 index 4878812f..00000000 --- a/docs/sdk/models/operations/gettokendetailssubscription.md +++ /dev/null @@ -1,24 +0,0 @@ -# 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` | *string*[] | :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/gettokendetailsuserplexaccount.md b/docs/sdk/models/operations/gettokendetailsuserplexaccount.md deleted file mode 100644 index fa923ca1..00000000 --- a/docs/sdk/models/operations/gettokendetailsuserplexaccount.md +++ /dev/null @@ -1,123 +0,0 @@ -# GetTokenDetailsUserPlexAccount - -Logged in user details - -## Example Usage - -```typescript -import { - AutoSelectSubtitle, - DefaultSubtitleAccessibility, - DefaultSubtitleForced, - GetTokenDetailsAuthenticationResponseStatus, - GetTokenDetailsAuthenticationStatus, - GetTokenDetailsStatus, - GetTokenDetailsUserPlexAccount, - MailingListStatus, - MediaReviewsVisibility, - WatchedIndicator, -} from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetTokenDetailsUserPlexAccount = { - adsConsent: true, - adsConsentReminderAt: 1556281940, - adsConsentSetAt: 1556281940, - authToken: "CxoUzBTSV5hsxjTpFKaf", - country: "US", - email: "username@email.com", - friendlyName: "friendlyUsername", - entitlements: [ - "[]", - ], - homeSize: 1, - id: 13692262, - joinedAt: 1556281940, - locale: "en", - mailingListStatus: MailingListStatus.Active, - maxHomeSize: 15, - profile: { - defaultAudioLanguage: "ja", - defaultSubtitleLanguage: "en", - autoSelectSubtitle: AutoSelectSubtitle.Enable, - defaultSubtitleAccessibility: DefaultSubtitleAccessibility.Enable, - defaultSubtitleForced: DefaultSubtitleForced.Enable, - watchedIndicator: WatchedIndicator.Enable, - mediaReviewsVisibility: MediaReviewsVisibility.Enable, - }, - rememberExpiresAt: 1556281940, - scrobbleTypes: "", - services: [ - { - identifier: "metadata-dev", - endpoint: "https://epg.provider.plex.tv", - token: "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", - secret: "", - status: GetTokenDetailsStatus.Online, - }, - ], - subscription: { - active: true, - subscribedAt: "2021-04-12T18:21:12Z", - status: GetTokenDetailsAuthenticationStatus.Inactive, - }, - subscriptionDescription: "", - subscriptions: [ - { - active: true, - subscribedAt: "2021-04-12T18:21:12Z", - status: GetTokenDetailsAuthenticationResponseStatus.Inactive, - }, - ], - thumb: "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", - title: "UsernameTitle", - username: "Username", - uuid: "dae343c1f45beb4f", - attributionPartner: null, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `adsConsent` | *boolean* | :heavy_check_mark: | Unknown | | -| `adsConsentReminderAt` | *number* | :heavy_check_mark: | N/A | 1556281940 | -| `adsConsentSetAt` | *number* | :heavy_check_mark: | N/A | 1556281940 | -| `anonymous` | *boolean* | :heavy_minus_sign: | Unknown | | -| `authToken` | *string* | :heavy_check_mark: | The account token | CxoUzBTSV5hsxjTpFKaf | -| `backupCodesCreated` | *boolean* | :heavy_minus_sign: | If the two-factor authentication backup codes have been created | | -| `confirmed` | *boolean* | :heavy_minus_sign: | If the account has been confirmed | | -| `country` | *string* | :heavy_check_mark: | The account country | US | -| `email` | *string* | :heavy_check_mark: | The account email address | username@email.com | -| `emailOnlyAuth` | *boolean* | :heavy_minus_sign: | If login with email only is enabled | | -| `experimentalFeatures` | *boolean* | :heavy_minus_sign: | If experimental features are enabled | | -| `friendlyName` | *string* | :heavy_check_mark: | Your account full name | friendlyUsername | -| `entitlements` | *string*[] | :heavy_check_mark: | List of devices your allowed to use with this account | | -| `guest` | *boolean* | :heavy_minus_sign: | If the account is a Plex Home guest user | | -| `hasPassword` | *boolean* | :heavy_minus_sign: | If the account has a password | | -| `home` | *boolean* | :heavy_minus_sign: | If the account is a Plex Home user | | -| `homeAdmin` | *boolean* | :heavy_minus_sign: | If the account is the Plex Home admin | | -| `homeSize` | *number* | :heavy_check_mark: | The number of accounts in the Plex Home | 1 | -| `id` | *number* | :heavy_check_mark: | The Plex account ID | 13692262 | -| `joinedAt` | *number* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | -| `locale` | *string* | :heavy_check_mark: | The account locale | | -| `mailingListActive` | *boolean* | :heavy_minus_sign: | If you are subscribed to the Plex newsletter | | -| `mailingListStatus` | [operations.MailingListStatus](../../../sdk/models/operations/mailingliststatus.md) | :heavy_check_mark: | Your current mailing list status (active or unsubscribed) | active | -| `maxHomeSize` | *number* | :heavy_check_mark: | The maximum number of accounts allowed in the Plex Home | 15 | -| ~~`pin`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

[Might be removed] The hashed Plex Home PIN | | -| `profile` | [operations.UserProfile](../../../sdk/models/operations/userprofile.md) | :heavy_check_mark: | N/A | | -| `protected` | *boolean* | :heavy_minus_sign: | If the account has a Plex Home PIN enabled | | -| `rememberExpiresAt` | *number* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | -| `restricted` | *boolean* | :heavy_minus_sign: | If the account is a Plex Home managed user | | -| `roles` | *string*[] | :heavy_minus_sign: | [Might be removed] List of account roles. Plexpass membership listed here | | -| `scrobbleTypes` | *string* | :heavy_check_mark: | Unknown | | -| `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.GetTokenDetailsSubscription](../../../sdk/models/operations/gettokendetailssubscription.md)[] | :heavy_minus_sign: | 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 | | -| `username` | *string* | :heavy_check_mark: | The account username | Username | -| `uuid` | *string* | :heavy_check_mark: | The account UUID | dae343c1f45beb4f | -| `attributionPartner` | *string* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettopwatchedcontentcountry.md b/docs/sdk/models/operations/gettopwatchedcontentcountry.md deleted file mode 100644 index 89833277..00000000 --- a/docs/sdk/models/operations/gettopwatchedcontentcountry.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetTopWatchedContentCountry - -## Example Usage - -```typescript -import { GetTopWatchedContentCountry } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetTopWatchedContentCountry = { - id: 116, - filter: "country=116", - tag: "United States of America", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | -| `id` | *number* | :heavy_minus_sign: | N/A | 116 | -| `filter` | *string* | :heavy_minus_sign: | N/A | country=116 | -| `tag` | *string* | :heavy_minus_sign: | N/A | United States of America | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettopwatchedcontentgenre.md b/docs/sdk/models/operations/gettopwatchedcontentgenre.md deleted file mode 100644 index cfea0c59..00000000 --- a/docs/sdk/models/operations/gettopwatchedcontentgenre.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetTopWatchedContentGenre - -## Example Usage - -```typescript -import { GetTopWatchedContentGenre } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetTopWatchedContentGenre = { - id: 184, - filter: "genre=184", - tag: "Thriller", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *number* | :heavy_minus_sign: | N/A | 184 | -| `filter` | *string* | :heavy_minus_sign: | N/A | genre=184 | -| `tag` | *string* | :heavy_minus_sign: | N/A | Thriller | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettopwatchedcontentguids.md b/docs/sdk/models/operations/gettopwatchedcontentguids.md deleted file mode 100644 index 6dbcdb9f..00000000 --- a/docs/sdk/models/operations/gettopwatchedcontentguids.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetTopWatchedContentGuids - -## Example Usage - -```typescript -import { GetTopWatchedContentGuids } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetTopWatchedContentGuids = { - id: "tvdb://2337", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_minus_sign: | N/A | tvdb://2337 | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettopwatchedcontentmediacontainer.md b/docs/sdk/models/operations/gettopwatchedcontentmediacontainer.md deleted file mode 100644 index acdba270..00000000 --- a/docs/sdk/models/operations/gettopwatchedcontentmediacontainer.md +++ /dev/null @@ -1,94 +0,0 @@ -# GetTopWatchedContentMediaContainer - -## Example Usage - -```typescript -import { GetTopWatchedContentMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; -import { RFCDate } from "@lukehagar/plexjs/sdk/types"; - -let value: GetTopWatchedContentMediaContainer = { - size: 50, - allowSync: false, - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1734362201, - 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, - }, - ], - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `identifier` | *string* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `mediaTagPrefix` | *string* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | -| `mediaTagVersion` | *number* | :heavy_check_mark: | The version number for media tags. | 1734362201 | -| `metadata` | [operations.GetTopWatchedContentMetadata](../../../sdk/models/operations/gettopwatchedcontentmetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettopwatchedcontentmetadata.md b/docs/sdk/models/operations/gettopwatchedcontentmetadata.md deleted file mode 100644 index 2ed3da6c..00000000 --- a/docs/sdk/models/operations/gettopwatchedcontentmetadata.md +++ /dev/null @@ -1,111 +0,0 @@ -# GetTopWatchedContentMetadata - -## Example Usage - -```typescript -import { GetTopWatchedContentMetadata } from "@lukehagar/plexjs/sdk/models/operations"; -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, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ratingKey` | *string* | :heavy_minus_sign: | N/A | 17 | -| `key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17 | -| `guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d77683f6f4521001ea9dc53 | -| `slug` | *string* | :heavy_minus_sign: | N/A | waterloo-road | -| `studio` | *string* | :heavy_minus_sign: | N/A | Universal Pictures | -| `type` | *string* | :heavy_minus_sign: | N/A | movie | -| `title` | *string* | :heavy_minus_sign: | N/A | Serenity | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | -| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | -| `librarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/1 | -| `contentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 | -| `summary` | *string* | :heavy_minus_sign: | N/A | 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` | *number* | :heavy_minus_sign: | N/A | 1 | -| `audienceRating` | *number* | :heavy_minus_sign: | N/A | 9.1 | -| `year` | *number* | :heavy_minus_sign: | N/A | 2005 | -| `tagline` | *string* | :heavy_minus_sign: | N/A | They aim to misbehave. | -| `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/thumb/1705637165 | -| `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/art/1705637165 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 141417 | -| `originallyAvailableAt` | [RFCDate](../../../types/rfcdate.md) | :heavy_minus_sign: | N/A | 2005-09-29 00:00:00 +0000 UTC | -| `leafCount` | *number* | :heavy_minus_sign: | N/A | 222 | -| `viewedLeafCount` | *number* | :heavy_minus_sign: | N/A | 100 | -| `childCount` | *number* | :heavy_minus_sign: | N/A | 13 | -| `addedAt` | *number* | :heavy_minus_sign: | N/A | 1705637164 | -| `updatedAt` | *number* | :heavy_minus_sign: | N/A | 1705637165 | -| `globalViewCount` | *number* | :heavy_minus_sign: | N/A | 80 | -| `audienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | -| `genre` | [operations.GetTopWatchedContentGenre](../../../sdk/models/operations/gettopwatchedcontentgenre.md)[] | :heavy_minus_sign: | N/A | | -| `country` | [operations.GetTopWatchedContentCountry](../../../sdk/models/operations/gettopwatchedcontentcountry.md)[] | :heavy_minus_sign: | N/A | | -| `guids` | [operations.GetTopWatchedContentGuids](../../../sdk/models/operations/gettopwatchedcontentguids.md)[] | :heavy_minus_sign: | N/A | | -| `role` | [operations.GetTopWatchedContentRole](../../../sdk/models/operations/gettopwatchedcontentrole.md)[] | :heavy_minus_sign: | N/A | | -| `user` | [operations.GetTopWatchedContentUser](../../../sdk/models/operations/gettopwatchedcontentuser.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettopwatchedcontentqueryparamincludeguids.md b/docs/sdk/models/operations/gettopwatchedcontentqueryparamincludeguids.md deleted file mode 100644 index a5fd72d1..00000000 --- a/docs/sdk/models/operations/gettopwatchedcontentqueryparamincludeguids.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetTopWatchedContentQueryParamIncludeGuids - -Adds the Guid object to the response - - -## Example Usage - -```typescript -import { GetTopWatchedContentQueryParamIncludeGuids } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetTopWatchedContentQueryParamIncludeGuids = - GetTopWatchedContentQueryParamIncludeGuids.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettopwatchedcontentqueryparamtype.md b/docs/sdk/models/operations/gettopwatchedcontentqueryparamtype.md deleted file mode 100644 index 2d715222..00000000 --- a/docs/sdk/models/operations/gettopwatchedcontentqueryparamtype.md +++ /dev/null @@ -1,35 +0,0 @@ -# GetTopWatchedContentQueryParamType - -The type of media to retrieve or filter by. -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 - - -## Example Usage - -```typescript -import { GetTopWatchedContentQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetTopWatchedContentQueryParamType = - GetTopWatchedContentQueryParamType.TvShow; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Artist` | 5 | -| `Album` | 6 | -| `Track` | 7 | -| `PhotoAlbum` | 8 | -| `Photo` | 9 | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettopwatchedcontentrequest.md b/docs/sdk/models/operations/gettopwatchedcontentrequest.md deleted file mode 100644 index baf4e564..00000000 --- a/docs/sdk/models/operations/gettopwatchedcontentrequest.md +++ /dev/null @@ -1,23 +0,0 @@ -# GetTopWatchedContentRequest - -## Example Usage - -```typescript -import { - GetTopWatchedContentQueryParamIncludeGuids, - GetTopWatchedContentQueryParamType, - GetTopWatchedContentRequest, -} from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetTopWatchedContentRequest = { - type: GetTopWatchedContentQueryParamType.TvShow, - includeGuids: GetTopWatchedContentQueryParamIncludeGuids.Enable, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [operations.GetTopWatchedContentQueryParamType](../../../sdk/models/operations/gettopwatchedcontentqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
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
| 2 | -| `includeGuids` | [operations.GetTopWatchedContentQueryParamIncludeGuids](../../../sdk/models/operations/gettopwatchedcontentqueryparamincludeguids.md) | :heavy_minus_sign: | Adds the Guid object to the response
| 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettopwatchedcontentresponse.md b/docs/sdk/models/operations/gettopwatchedcontentresponse.md deleted file mode 100644 index 7ec46954..00000000 --- a/docs/sdk/models/operations/gettopwatchedcontentresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetTopWatchedContentResponse - -## Example Usage - -```typescript -import { GetTopWatchedContentResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetTopWatchedContentResponse = { - contentType: "", - statusCode: 478842, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetTopWatchedContentResponseBody](../../../sdk/models/operations/gettopwatchedcontentresponsebody.md) | :heavy_minus_sign: | The metadata of the library item. | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettopwatchedcontentresponsebody.md b/docs/sdk/models/operations/gettopwatchedcontentresponsebody.md deleted file mode 100644 index 3e937b0d..00000000 --- a/docs/sdk/models/operations/gettopwatchedcontentresponsebody.md +++ /dev/null @@ -1,93 +0,0 @@ -# GetTopWatchedContentResponseBody - -The metadata of the library item. - -## Example Usage - -```typescript -import { GetTopWatchedContentResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; -import { RFCDate } from "@lukehagar/plexjs/sdk/types"; - -let value: GetTopWatchedContentResponseBody = { - mediaContainer: { - size: 50, - allowSync: false, - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1734362201, - 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, - }, - ], - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetTopWatchedContentMediaContainer](../../../sdk/models/operations/gettopwatchedcontentmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettopwatchedcontentrole.md b/docs/sdk/models/operations/gettopwatchedcontentrole.md deleted file mode 100644 index 14b231ce..00000000 --- a/docs/sdk/models/operations/gettopwatchedcontentrole.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetTopWatchedContentRole - -## Example Usage - -```typescript -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", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `id` | *number* | :heavy_minus_sign: | N/A | 220 | -| `filter` | *string* | :heavy_minus_sign: | N/A | actor=220 | -| `tag` | *string* | :heavy_minus_sign: | N/A | Dennis Keiffer | -| `tagKey` | *string* | :heavy_minus_sign: | N/A | 5d77683554f42c001f8c4708 | -| `role` | *string* | :heavy_minus_sign: | N/A | Bar Guy (uncredited) | -| `thumb` | *string* | :heavy_minus_sign: | N/A | https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettopwatchedcontentuser.md b/docs/sdk/models/operations/gettopwatchedcontentuser.md deleted file mode 100644 index ed12355a..00000000 --- a/docs/sdk/models/operations/gettopwatchedcontentuser.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetTopWatchedContentUser - -## Example Usage - -```typescript -import { GetTopWatchedContentUser } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetTopWatchedContentUser = { - id: 220, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *number* | :heavy_minus_sign: | N/A | 220 | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettranscodesessionsmediacontainer.md b/docs/sdk/models/operations/gettranscodesessionsmediacontainer.md deleted file mode 100644 index 7b963afe..00000000 --- a/docs/sdk/models/operations/gettranscodesessionsmediacontainer.md +++ /dev/null @@ -1,46 +0,0 @@ -# GetTranscodeSessionsMediaContainer - -## Example Usage - -```typescript -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, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `size` | *number* | :heavy_minus_sign: | N/A | 1 | -| `transcodeSession` | [operations.TranscodeSession](../../../sdk/models/operations/transcodesession.md)[] | :heavy_minus_sign: | N/A | [
{
"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
}
] | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettranscodesessionsresponse.md b/docs/sdk/models/operations/gettranscodesessionsresponse.md deleted file mode 100644 index 552ac402..00000000 --- a/docs/sdk/models/operations/gettranscodesessionsresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetTranscodeSessionsResponse - -## Example Usage - -```typescript -import { GetTranscodeSessionsResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetTranscodeSessionsResponse = { - contentType: "", - statusCode: 486483, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetTranscodeSessionsResponseBody](../../../sdk/models/operations/gettranscodesessionsresponsebody.md) | :heavy_minus_sign: | The Transcode Sessions | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettranscodesessionsresponsebody.md b/docs/sdk/models/operations/gettranscodesessionsresponsebody.md deleted file mode 100644 index 87be0bd1..00000000 --- a/docs/sdk/models/operations/gettranscodesessionsresponsebody.md +++ /dev/null @@ -1,49 +0,0 @@ -# GetTranscodeSessionsResponseBody - -The Transcode Sessions - -## Example Usage - -```typescript -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, - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetTranscodeSessionsMediaContainer](../../../sdk/models/operations/gettranscodesessionsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettransienttokenglobals.md b/docs/sdk/models/operations/gettransienttokenglobals.md new file mode 100644 index 00000000..dd075cdc --- /dev/null +++ b/docs/sdk/models/operations/gettransienttokenglobals.md @@ -0,0 +1,35 @@ +# GetTransientTokenGlobals + +## Example Usage + +```typescript +import { GetTransientTokenGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetTransientTokenGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettransienttokenmediacontainer.md b/docs/sdk/models/operations/gettransienttokenmediacontainer.md new file mode 100644 index 00000000..6656929f --- /dev/null +++ b/docs/sdk/models/operations/gettransienttokenmediacontainer.md @@ -0,0 +1,24 @@ +# GetTransientTokenMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetTransientTokenMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetTransientTokenMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `token` | *string* | :heavy_minus_sign: | The transient token | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettransienttokenqueryparamtype.md b/docs/sdk/models/operations/gettransienttokenqueryparamtype.md deleted file mode 100644 index 6121aa57..00000000 --- a/docs/sdk/models/operations/gettransienttokenqueryparamtype.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetTransientTokenQueryParamType - -`delegation` - This is the only supported `type` parameter. - -## Example Usage - -```typescript -import { GetTransientTokenQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetTransientTokenQueryParamType = - GetTransientTokenQueryParamType.Delegation; -``` - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Delegation` | delegation | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettransienttokenrequest.md b/docs/sdk/models/operations/gettransienttokenrequest.md index 1e59c90a..f66d15d4 100644 --- a/docs/sdk/models/operations/gettransienttokenrequest.md +++ b/docs/sdk/models/operations/gettransienttokenrequest.md @@ -3,17 +3,27 @@ ## Example Usage ```typescript -import { GetTransientTokenQueryParamType, GetTransientTokenRequest, Scope } from "@lukehagar/plexjs/sdk/models/operations"; +import { GetTransientTokenRequest, GetTransientTokenScope, GetTransientTokenType } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetTransientTokenRequest = { - type: GetTransientTokenQueryParamType.Delegation, - scope: Scope.All, + type: GetTransientTokenType.Delegation, + scope: GetTransientTokenScope.All, }; ``` ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `type` | [operations.GetTransientTokenQueryParamType](../../../sdk/models/operations/gettransienttokenqueryparamtype.md) | :heavy_check_mark: | `delegation` - This is the only supported `type` parameter. | -| `scope` | [operations.Scope](../../../sdk/models/operations/scope.md) | :heavy_check_mark: | `all` - This is the only supported `scope` parameter. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `type` | [operations.GetTransientTokenType](../../../sdk/models/operations/gettransienttokentype.md) | :heavy_check_mark: | The value `delegation` is the only supported `type` parameter. | | +| `scope` | [operations.GetTransientTokenScope](../../../sdk/models/operations/gettransienttokenscope.md) | :heavy_check_mark: | The value `all` is the only supported `scope` parameter. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettransienttokenresponse.md b/docs/sdk/models/operations/gettransienttokenresponse.md index 40356ac7..4ec598f7 100644 --- a/docs/sdk/models/operations/gettransienttokenresponse.md +++ b/docs/sdk/models/operations/gettransienttokenresponse.md @@ -13,8 +13,9 @@ let value: GetTransientTokenResponse = { ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetTransientTokenResponseBody](../../../sdk/models/operations/gettransienttokenresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettransienttokenresponsebody.md b/docs/sdk/models/operations/gettransienttokenresponsebody.md new file mode 100644 index 00000000..2acae65f --- /dev/null +++ b/docs/sdk/models/operations/gettransienttokenresponsebody.md @@ -0,0 +1,17 @@ +# GetTransientTokenResponseBody + +OK + +## Example Usage + +```typescript +import { GetTransientTokenResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetTransientTokenResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetTransientTokenMediaContainer](../../../sdk/models/operations/gettransienttokenmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettransienttokenscope.md b/docs/sdk/models/operations/gettransienttokenscope.md new file mode 100644 index 00000000..2fc4b850 --- /dev/null +++ b/docs/sdk/models/operations/gettransienttokenscope.md @@ -0,0 +1,17 @@ +# GetTransientTokenScope + +The value `all` is the only supported `scope` parameter. + +## Example Usage + +```typescript +import { GetTransientTokenScope } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetTransientTokenScope = GetTransientTokenScope.All; +``` + +## Values + +| Name | Value | +| ----- | ----- | +| `All` | all | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettransienttokentype.md b/docs/sdk/models/operations/gettransienttokentype.md new file mode 100644 index 00000000..7ed4afbf --- /dev/null +++ b/docs/sdk/models/operations/gettransienttokentype.md @@ -0,0 +1,17 @@ +# GetTransientTokenType + +The value `delegation` is the only supported `type` parameter. + +## Example Usage + +```typescript +import { GetTransientTokenType } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetTransientTokenType = GetTransientTokenType.Delegation; +``` + +## Values + +| Name | Value | +| ------------ | ------------ | +| `Delegation` | delegation | \ No newline at end of file diff --git a/docs/sdk/models/operations/getupdatesstatusmediacontainer.md b/docs/sdk/models/operations/getupdatesstatusmediacontainer.md new file mode 100644 index 00000000..4391c730 --- /dev/null +++ b/docs/sdk/models/operations/getupdatesstatusmediacontainer.md @@ -0,0 +1,20 @@ +# GetUpdatesStatusMediaContainer + +## Example Usage + +```typescript +import { GetUpdatesStatusMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetUpdatesStatusMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `autoUpdateVersion` | *number* | :heavy_minus_sign: | The version of the updater (currently `1`) | +| `canInstall` | *boolean* | :heavy_minus_sign: | Indicates whether this install can be updated through these endpoints (typically only on MacOS and Windows) | +| `checkedAt` | *number* | :heavy_minus_sign: | The last time a check for updates was performed | +| `downloadURL` | *string* | :heavy_minus_sign: | The URL where the update is available | +| `release` | [operations.Release](../../../sdk/models/operations/release.md)[] | :heavy_minus_sign: | N/A | +| `status` | *number* | :heavy_minus_sign: | The current error code (`0` means no error) | \ No newline at end of file diff --git a/docs/sdk/models/operations/getupdatesstatusresponse.md b/docs/sdk/models/operations/getupdatesstatusresponse.md new file mode 100644 index 00000000..fb57442a --- /dev/null +++ b/docs/sdk/models/operations/getupdatesstatusresponse.md @@ -0,0 +1,21 @@ +# GetUpdatesStatusResponse + +## Example Usage + +```typescript +import { GetUpdatesStatusResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetUpdatesStatusResponse = { + contentType: "", + statusCode: 558781, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.GetUpdatesStatusResponseBody](../../../sdk/models/operations/getupdatesstatusresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/getupdatesstatusresponsebody.md b/docs/sdk/models/operations/getupdatesstatusresponsebody.md new file mode 100644 index 00000000..abefef9a --- /dev/null +++ b/docs/sdk/models/operations/getupdatesstatusresponsebody.md @@ -0,0 +1,17 @@ +# GetUpdatesStatusResponseBody + +OK + +## Example Usage + +```typescript +import { GetUpdatesStatusResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetUpdatesStatusResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.GetUpdatesStatusMediaContainer](../../../sdk/models/operations/getupdatesstatusmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getupdatesstatusstate.md b/docs/sdk/models/operations/getupdatesstatusstate.md new file mode 100644 index 00000000..7a40b7fb --- /dev/null +++ b/docs/sdk/models/operations/getupdatesstatusstate.md @@ -0,0 +1,36 @@ +# GetUpdatesStatusState + +The status of this update. + +- available - This release is available +- downloading - This release is downloading +- downloaded - This release has been downloaded +- installing - This release is installing +- tonight - This release will be installed tonight +- skipped - This release has been skipped +- error - This release has an error +- notify - This release is only notifying it is available (typically because it cannot be installed on this setup) +- done - This release is complete + + +## Example Usage + +```typescript +import { GetUpdatesStatusState } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetUpdatesStatusState = GetUpdatesStatusState.Done; +``` + +## Values + +| Name | Value | +| ------------- | ------------- | +| `Available` | available | +| `Downloading` | downloading | +| `Downloaded` | downloaded | +| `Installing` | installing | +| `Tonight` | tonight | +| `Skipped` | skipped | +| `Error` | error | +| `Notify` | notify | +| `Done` | done | \ No newline at end of file diff --git a/docs/sdk/models/operations/getupdatestatusmediacontainer.md b/docs/sdk/models/operations/getupdatestatusmediacontainer.md deleted file mode 100644 index c6e35497..00000000 --- a/docs/sdk/models/operations/getupdatestatusmediacontainer.md +++ /dev/null @@ -1,55 +0,0 @@ -# GetUpdateStatusMediaContainer - -## Example Usage - -```typescript -import { GetUpdateStatusMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetUpdateStatusMediaContainer = { - 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", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | 1 | -| `canInstall` | *boolean* | :heavy_minus_sign: | N/A | false | -| `checkedAt` | *number* | :heavy_minus_sign: | N/A | 1705801232 | -| `downloadURL` | *string* | :heavy_minus_sign: | N/A | https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx | -| `status` | *number* | :heavy_minus_sign: | N/A | 0 | -| `release` | [operations.Release](../../../sdk/models/operations/release.md)[] | :heavy_minus_sign: | N/A | [
{
"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\u0026build=linux-x86_64\u0026distro=redhat\u0026X-Plex-Token=xxxxxxxxxxxxxxxxxxxx",
"state": "notify"
}
] | \ No newline at end of file diff --git a/docs/sdk/models/operations/getupdatestatusresponse.md b/docs/sdk/models/operations/getupdatestatusresponse.md deleted file mode 100644 index 78b4adb9..00000000 --- a/docs/sdk/models/operations/getupdatestatusresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetUpdateStatusResponse - -## Example Usage - -```typescript -import { GetUpdateStatusResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetUpdateStatusResponse = { - contentType: "", - statusCode: 419425, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetUpdateStatusResponseBody](../../../sdk/models/operations/getupdatestatusresponsebody.md) | :heavy_minus_sign: | The Server Updates | \ No newline at end of file diff --git a/docs/sdk/models/operations/getupdatestatusresponsebody.md b/docs/sdk/models/operations/getupdatestatusresponsebody.md deleted file mode 100644 index 2c60b40b..00000000 --- a/docs/sdk/models/operations/getupdatestatusresponsebody.md +++ /dev/null @@ -1,54 +0,0 @@ -# GetUpdateStatusResponseBody - -The Server Updates - -## Example Usage - -```typescript -import { GetUpdateStatusResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetUpdateStatusResponseBody = { - 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", - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetUpdateStatusMediaContainer](../../../sdk/models/operations/getupdatestatusmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getuserfriendsresponse.md b/docs/sdk/models/operations/getuserfriendsresponse.md deleted file mode 100644 index 3cc07583..00000000 --- a/docs/sdk/models/operations/getuserfriendsresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetUserFriendsResponse - -## Example Usage - -```typescript -import { GetUserFriendsResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetUserFriendsResponse = { - contentType: "", - statusCode: 640770, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | -| `friends` | [operations.Friend](../../../sdk/models/operations/friend.md)[] | :heavy_minus_sign: | Friends Data | \ No newline at end of file diff --git a/docs/sdk/models/operations/getusersmediacontainer.md b/docs/sdk/models/operations/getusersmediacontainer.md deleted file mode 100644 index 15653bb1..00000000 --- a/docs/sdk/models/operations/getusersmediacontainer.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetUsersMediaContainer - -Container holding user and server details. - -## Example Usage - -```typescript -import { GetUsersMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetUsersMediaContainer = { - friendlyName: "myPlex", - identifier: "com.plexapp.plugins.myplex", - machineIdentifier: "3dff4c4da3b1229a649aa574a9e2b419a684a20e", - totalSize: 30, - size: 30, - user: [], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `friendlyName` | *string* | :heavy_check_mark: | The friendly name of the Plex instance. | myPlex | -| `identifier` | *string* | :heavy_check_mark: | N/A | com.plexapp.plugins.myplex | -| `machineIdentifier` | *string* | :heavy_check_mark: | Unique Machine identifier of the Plex server. | 3dff4c4da3b1229a649aa574a9e2b419a684a20e | -| `totalSize` | *number* | :heavy_check_mark: | Total number of users. | 30 | -| `size` | *number* | :heavy_check_mark: | Number of users in the current response. | 30 | -| `user` | [operations.User](../../../sdk/models/operations/user.md)[] | :heavy_check_mark: | List of users with access to the Plex server. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getusersrequest.md b/docs/sdk/models/operations/getusersrequest.md deleted file mode 100644 index bd8a91ba..00000000 --- a/docs/sdk/models/operations/getusersrequest.md +++ /dev/null @@ -1,41 +0,0 @@ -# GetUsersRequest - -## Example Usage - -```typescript -import { GetUsersRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetUsersRequest = { - clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", - clientName: "Plex for Roku", - deviceNickname: "Roku 3", - deviceName: "Chrome", - deviceScreenResolution: "1487x1165,2560x1440", - clientVersion: "2.4.1", - platform: "Roku", - clientFeatures: "external-media,indirect-media,hub-style-list", - model: "4200X", - xPlexSessionId: "97e136ef-4ddd-4ff3-89a7-a5820c96c2ca", - xPlexLanguage: "en", - platformVersion: "4.3 build 1057", - xPlexToken: "CV5xoxjTpFKUzBTShsaf", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -| `clientID` | *string* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | -| `clientName` | *string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku | -| `deviceNickname` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | -| `deviceName` | *string* | :heavy_minus_sign: | The name of the device the client application is running on. This is used to track the client application and its usage. (Chrome, Safari, etc.) | Chrome | -| `deviceScreenResolution` | *string* | :heavy_minus_sign: | The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440) | 1487x1165,2560x1440 | -| `clientVersion` | *string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 | -| `platform` | *string* | :heavy_minus_sign: | The platform of the client application. | Roku | -| `clientFeatures` | *string* | :heavy_minus_sign: | The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list) | external-media,indirect-media,hub-style-list | -| `model` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | -| `xPlexSessionId` | *string* | :heavy_minus_sign: | The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca) | 97e136ef-4ddd-4ff3-89a7-a5820c96c2ca | -| `xPlexLanguage` | *string* | :heavy_minus_sign: | The language of the client application. | en | -| `platformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | -| `xPlexToken` | *string* | :heavy_check_mark: | An authentication token, obtained from plex.tv | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/sdk/models/operations/getusersresponse.md b/docs/sdk/models/operations/getusersresponse.md deleted file mode 100644 index a5bdd544..00000000 --- a/docs/sdk/models/operations/getusersresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetUsersResponse - -## Example Usage - -```typescript -import { GetUsersResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetUsersResponse = { - contentType: "", - statusCode: 793403, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | -| `body` | *Uint8Array* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/getusersresponsebody.md b/docs/sdk/models/operations/getusersresponsebody.md deleted file mode 100644 index 27ad5d11..00000000 --- a/docs/sdk/models/operations/getusersresponsebody.md +++ /dev/null @@ -1,74 +0,0 @@ -# GetUsersResponseBody - -Successful response with media container data in XML - -## Example Usage - -```typescript -import { - AllLibraries, - AllowCameraUpload, - AllowChannels, - AllowSubtitleAdmin, - AllowSync, - AllowTuners, - GetUsersResponseBody, - Home, - Owned, - Pending, - Protected, - Restricted, -} from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetUsersResponseBody = { - mediaContainer: { - friendlyName: "myPlex", - identifier: "com.plexapp.plugins.myplex", - machineIdentifier: "3dff4c4da3b1229a649aa574a9e2b419a684a20e", - totalSize: 30, - size: 30, - user: [ - { - id: 22526914, - title: "Plex User", - username: "zgfuc7krcqfimrmb9lsl5j", - email: "zgfuc7krcqfimrmb9lsl5j@protonmail.com", - recommendationsPlaylistId: "", - thumb: "https://plex.tv/users/3346028014e93acd/avatar?c=1731605021", - protected: Protected.Enable, - home: Home.Enable, - allowTuners: AllowTuners.Enable, - allowSync: AllowSync.Enable, - allowCameraUpload: AllowCameraUpload.Enable, - allowChannels: AllowChannels.Enable, - allowSubtitleAdmin: AllowSubtitleAdmin.Enable, - filterAll: "", - filterMovies: "", - filterMusic: "", - filterPhotos: "", - filterTelevision: "", - restricted: Restricted.Enable, - server: [ - { - id: 907759180, - serverId: 9999999, - machineIdentifier: "fbb8aa6be6e0c997c6268bc2b4431c8807f70a3", - name: "ConnectedUserFlix", - lastSeenAt: 1556281940, - numLibraries: 16, - allLibraries: AllLibraries.Enable, - owned: Owned.Enable, - pending: Pending.Enable, - }, - ], - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `mediaContainer` | [operations.GetUsersMediaContainer](../../../sdk/models/operations/getusersmediacontainer.md) | :heavy_minus_sign: | Container holding user and server details. | \ No newline at end of file diff --git a/docs/sdk/models/operations/getusersserver.md b/docs/sdk/models/operations/getusersserver.md deleted file mode 100644 index 181a6978..00000000 --- a/docs/sdk/models/operations/getusersserver.md +++ /dev/null @@ -1,33 +0,0 @@ -# GetUsersServer - -## Example Usage - -```typescript -import { AllLibraries, GetUsersServer, Owned, Pending } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetUsersServer = { - id: 907759180, - serverId: 9999999, - machineIdentifier: "fbb8aa6be6e0c997c6268bc2b4431c8807f70a3", - name: "ConnectedUserFlix", - lastSeenAt: 1556281940, - numLibraries: 16, - allLibraries: AllLibraries.Enable, - owned: Owned.Enable, - pending: Pending.Enable, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | Unique ID of the server of the connected user | 907759180 | -| `serverId` | *number* | :heavy_check_mark: | ID of the actual Plex server. | 9999999 | -| `machineIdentifier` | *string* | :heavy_check_mark: | Machine identifier of the Plex server. | fbb8aa6be6e0c997c6268bc2b4431c8807f70a3 | -| `name` | *string* | :heavy_check_mark: | Name of the Plex server of the connected user. | ConnectedUserFlix | -| `lastSeenAt` | *number* | :heavy_check_mark: | N/A | 1556281940 | -| `numLibraries` | *number* | :heavy_check_mark: | Number of libraries in the server this user has access to. | 16 | -| `allLibraries` | [operations.AllLibraries](../../../sdk/models/operations/alllibraries.md) | :heavy_minus_sign: | N/A | 1 | -| `owned` | [operations.Owned](../../../sdk/models/operations/owned.md) | :heavy_minus_sign: | N/A | 1 | -| `pending` | [operations.Pending](../../../sdk/models/operations/pending.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getwatchlistrequest.md b/docs/sdk/models/operations/getwatchlistrequest.md deleted file mode 100644 index 66cb4ff4..00000000 --- a/docs/sdk/models/operations/getwatchlistrequest.md +++ /dev/null @@ -1,26 +0,0 @@ -# GetWatchListRequest - -## Example Usage - -```typescript -import { Filter, GetWatchListRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetWatchListRequest = { - filter: Filter.Released, - xPlexToken: "CV5xoxjTpFKUzBTShsaf", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `filter` | [operations.Filter](../../../sdk/models/operations/filter.md) | :heavy_check_mark: | Filter | | -| `sort` | *string* | :heavy_minus_sign: | In the format "field:dir". Available fields are "watchlistedAt" (Added At),
"titleSort" (Title), "originallyAvailableAt" (Release Date), or "rating" (Critic Rating).
"dir" can be "asc" or "desc"
| | -| `libtype` | [operations.Libtype](../../../sdk/models/operations/libtype.md) | :heavy_minus_sign: | The type of library to filter. Can be "movie" or "show", or all if not present.
| | -| `maxresults` | *number* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
| | -| `includeCollections` | [operations.IncludeCollections](../../../sdk/models/operations/includecollections.md) | :heavy_minus_sign: | include collections in the results
| | -| `includeExternalMedia` | [operations.IncludeExternalMedia](../../../sdk/models/operations/includeexternalmedia.md) | :heavy_minus_sign: | include external media in the results
| | -| `xPlexContainerStart` | *number* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 0
| 0 | -| `xPlexContainerSize` | *number* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 50
| 50 | -| `xPlexToken` | *string* | :heavy_check_mark: | An authentication token, obtained from plex.tv | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/sdk/models/operations/getwatchlistresponse.md b/docs/sdk/models/operations/getwatchlistresponse.md deleted file mode 100644 index ae8a2ca1..00000000 --- a/docs/sdk/models/operations/getwatchlistresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetWatchListResponse - -## Example Usage - -```typescript -import { GetWatchListResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetWatchListResponse = { - contentType: "", - statusCode: 283331, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `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 | -| `object` | [operations.GetWatchListResponseBody](../../../sdk/models/operations/getwatchlistresponsebody.md) | :heavy_minus_sign: | Watchlist Data | \ No newline at end of file diff --git a/docs/sdk/models/operations/getwatchlistresponsebody.md b/docs/sdk/models/operations/getwatchlistresponsebody.md deleted file mode 100644 index 3938dba1..00000000 --- a/docs/sdk/models/operations/getwatchlistresponsebody.md +++ /dev/null @@ -1,23 +0,0 @@ -# GetWatchListResponseBody - -Watchlist Data - -## Example Usage - -```typescript -import { GetWatchListResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetWatchListResponseBody = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `librarySectionID` | *string* | :heavy_minus_sign: | N/A | -| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | -| `offset` | *number* | :heavy_minus_sign: | N/A | -| `totalSize` | *number* | :heavy_minus_sign: | N/A | -| `identifier` | *string* | :heavy_minus_sign: | N/A | -| `size` | *number* | :heavy_minus_sign: | N/A | -| `metadata` | [operations.Metadata](../../../sdk/models/operations/metadata.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/guids.md b/docs/sdk/models/operations/guids.md deleted file mode 100644 index 61707bcb..00000000 --- a/docs/sdk/models/operations/guids.md +++ /dev/null @@ -1,18 +0,0 @@ -# Guids - -## Example Usage - -```typescript -import { Guids } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Guids = { - id: - "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
| {
"imdbExample": {
"summary": "IMDB example",
"value": "imdb://tt13015952"
},
"tmdbExample": {
"summary": "TMDB example",
"value": "tmdb://2434012"
},
"tvdbExample": {
"summary": "TVDB example",
"value": "tvdb://7945991"
}
} | \ No newline at end of file diff --git a/docs/sdk/models/operations/hasthumbnail.md b/docs/sdk/models/operations/hasthumbnail.md deleted file mode 100644 index a2394e71..00000000 --- a/docs/sdk/models/operations/hasthumbnail.md +++ /dev/null @@ -1,18 +0,0 @@ -# HasThumbnail - -Indicates if the part has a thumbnail. - -## Example Usage - -```typescript -import { HasThumbnail } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: HasThumbnail = HasThumbnail.True; -``` - -## Values - -| Name | Value | -| ------- | ------- | -| `False` | 0 | -| `True` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/hidden.md b/docs/sdk/models/operations/hidden.md deleted file mode 100644 index 9baa8f40..00000000 --- a/docs/sdk/models/operations/hidden.md +++ /dev/null @@ -1,19 +0,0 @@ -# Hidden - -The Plex library visibility setting - -## Example Usage - -```typescript -import { Hidden } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Hidden = Hidden.ExcludeHomeScreen; -``` - -## Values - -| Name | Value | -| ---------------------------------- | ---------------------------------- | -| `Visible` | 0 | -| `ExcludeHomeScreen` | 1 | -| `ExcludeHomeScreenAndGlobalSearch` | 2 | \ No newline at end of file diff --git a/docs/sdk/models/operations/hints.md b/docs/sdk/models/operations/hints.md new file mode 100644 index 00000000..da6bae17 --- /dev/null +++ b/docs/sdk/models/operations/hints.md @@ -0,0 +1,16 @@ +# Hints + +Hints describing what we're looking for. Note: The hint `ratingKey` is required for downloading from a PMS remote. + +## Example Usage + +```typescript +import { Hints } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: Hints = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdk/models/operations/home.md b/docs/sdk/models/operations/home.md deleted file mode 100644 index 2e1944dd..00000000 --- a/docs/sdk/models/operations/home.md +++ /dev/null @@ -1,18 +0,0 @@ -# Home - -Indicates if the user is part of a home group. - -## Example Usage - -```typescript -import { Home } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Home = Home.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/homevisibility.md b/docs/sdk/models/operations/homevisibility.md new file mode 100644 index 00000000..2d0e360f --- /dev/null +++ b/docs/sdk/models/operations/homevisibility.md @@ -0,0 +1,25 @@ +# HomeVisibility + +Whether this hub is visible on the home screen + - all: Visible to all users + - none: Visible to no users + - admin: Visible to only admin users + - shared: Visible to shared users + + +## Example Usage + +```typescript +import { HomeVisibility } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: HomeVisibility = HomeVisibility.All; +``` + +## Values + +| Name | Value | +| -------- | -------- | +| `All` | all | +| `None` | none | +| `Admin` | admin | +| `Shared` | shared | \ No newline at end of file diff --git a/docs/sdk/models/operations/hub.md b/docs/sdk/models/operations/hub.md index eba9bc1f..6062cdad 100644 --- a/docs/sdk/models/operations/hub.md +++ b/docs/sdk/models/operations/hub.md @@ -5,53 +5,17 @@ ```typescript 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, - }, - ], -}; +let value: Hub = {}; ``` ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `hubKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/50768,65523,58188,57341,57302,57070 | -| `key` | *string* | :heavy_minus_sign: | N/A | /playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio | -| `title` | *string* | :heavy_minus_sign: | N/A | Recent Playlists | -| `type` | *string* | :heavy_minus_sign: | N/A | playlist | -| `hubIdentifier` | *string* | :heavy_minus_sign: | N/A | home.playlists | -| `context` | *string* | :heavy_minus_sign: | N/A | hub.home.playlists | -| `size` | *number* | :heavy_minus_sign: | N/A | 6 | -| `more` | *boolean* | :heavy_minus_sign: | N/A | true | -| `style` | *string* | :heavy_minus_sign: | N/A | shelf | -| `promoted` | *boolean* | :heavy_minus_sign: | N/A | true | -| `metadata` | [operations.GetGlobalHubsMetadata](../../../sdk/models/operations/getglobalhubsmetadata.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `homeVisibility` | [operations.HomeVisibility](../../../sdk/models/operations/homevisibility.md) | :heavy_minus_sign: | Whether this hub is visible on the home screen
- all: Visible to all users
- none: Visible to no users
- admin: Visible to only admin users
- shared: Visible to shared users
| +| `identifier` | *string* | :heavy_minus_sign: | The identifier for this hub | +| `promotedToOwnHome` | *boolean* | :heavy_minus_sign: | Whether this hub is visible to admin user home | +| `promotedToRecommended` | *boolean* | :heavy_minus_sign: | Whether this hub is promoted to all for recommendations | +| `promotedToSharedHome` | *boolean* | :heavy_minus_sign: | Whether this hub is visible to shared user's home | +| `recommendationsVisibility` | [operations.RecommendationsVisibility](../../../sdk/models/operations/recommendationsvisibility.md) | :heavy_minus_sign: | The visibility of this hub in recommendations:
- all: Visible to all users
- none: Visible to no users
- admin: Visible to only admin users
- shared: Visible to shared users
| +| `title` | *string* | :heavy_minus_sign: | The title of this hub | \ No newline at end of file diff --git a/docs/sdk/models/operations/image.md b/docs/sdk/models/operations/image.md deleted file mode 100644 index 5c41b917..00000000 --- a/docs/sdk/models/operations/image.md +++ /dev/null @@ -1,17 +0,0 @@ -# Image - -## Example Usage - -```typescript -import { Image } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Image = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `alt` | *string* | :heavy_minus_sign: | N/A | -| `type` | *string* | :heavy_minus_sign: | N/A | -| `url` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/includeadvanced.md b/docs/sdk/models/operations/includeadvanced.md deleted file mode 100644 index 6ac084bf..00000000 --- a/docs/sdk/models/operations/includeadvanced.md +++ /dev/null @@ -1,16 +0,0 @@ -# IncludeAdvanced - -## Example Usage - -```typescript -import { IncludeAdvanced } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: IncludeAdvanced = IncludeAdvanced.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/includecollections.md b/docs/sdk/models/operations/includecollections.md deleted file mode 100644 index 0cb6ec30..00000000 --- a/docs/sdk/models/operations/includecollections.md +++ /dev/null @@ -1,19 +0,0 @@ -# IncludeCollections - -include collections in the results - - -## Example Usage - -```typescript -import { IncludeCollections } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: IncludeCollections = IncludeCollections.One; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `One` | 1 | -| `Zero` | 0 | \ No newline at end of file diff --git a/docs/sdk/models/operations/includedetails.md b/docs/sdk/models/operations/includedetails.md deleted file mode 100644 index 66f98df1..00000000 --- a/docs/sdk/models/operations/includedetails.md +++ /dev/null @@ -1,20 +0,0 @@ -# IncludeDetails - -Whether or not to include details for a section (types, filters, and sorts). -Only exists for backwards compatibility, media providers other than the server libraries have it on always. - - -## Example Usage - -```typescript -import { IncludeDetails } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: IncludeDetails = IncludeDetails.One; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/includeexternalmedia.md b/docs/sdk/models/operations/includeexternalmedia.md deleted file mode 100644 index e720260e..00000000 --- a/docs/sdk/models/operations/includeexternalmedia.md +++ /dev/null @@ -1,19 +0,0 @@ -# IncludeExternalMedia - -include external media in the results - - -## Example Usage - -```typescript -import { IncludeExternalMedia } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: IncludeExternalMedia = IncludeExternalMedia.Zero; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `One` | 1 | -| `Zero` | 0 | \ No newline at end of file diff --git a/docs/sdk/models/operations/includeguids.md b/docs/sdk/models/operations/includeguids.md deleted file mode 100644 index fb7ac0bb..00000000 --- a/docs/sdk/models/operations/includeguids.md +++ /dev/null @@ -1,19 +0,0 @@ -# IncludeGuids - -Adds the Guids object to the response - - -## Example Usage - -```typescript -import { IncludeGuids } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: IncludeGuids = IncludeGuids.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/includehttps.md b/docs/sdk/models/operations/includehttps.md deleted file mode 100644 index 5d7bbe80..00000000 --- a/docs/sdk/models/operations/includehttps.md +++ /dev/null @@ -1,18 +0,0 @@ -# IncludeHttps - -Include Https entries in the results - -## Example Usage - -```typescript -import { IncludeHttps } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: IncludeHttps = IncludeHttps.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/includeipv6.md b/docs/sdk/models/operations/includeipv6.md deleted file mode 100644 index 48402b21..00000000 --- a/docs/sdk/models/operations/includeipv6.md +++ /dev/null @@ -1,18 +0,0 @@ -# IncludeIPv6 - -Include IPv6 entries in the results - -## Example Usage - -```typescript -import { IncludeIPv6 } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: IncludeIPv6 = IncludeIPv6.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/includemeta.md b/docs/sdk/models/operations/includemeta.md deleted file mode 100644 index ce04cd62..00000000 --- a/docs/sdk/models/operations/includemeta.md +++ /dev/null @@ -1,19 +0,0 @@ -# IncludeMeta - -Adds the Meta object to the response - - -## Example Usage - -```typescript -import { IncludeMeta } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: IncludeMeta = IncludeMeta.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/includerelay.md b/docs/sdk/models/operations/includerelay.md deleted file mode 100644 index d6b8314b..00000000 --- a/docs/sdk/models/operations/includerelay.md +++ /dev/null @@ -1,20 +0,0 @@ -# IncludeRelay - -Include Relay addresses in the results -E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 - - -## Example Usage - -```typescript -import { IncludeRelay } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: IncludeRelay = IncludeRelay.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/ingesttransientitemglobals.md b/docs/sdk/models/operations/ingesttransientitemglobals.md new file mode 100644 index 00000000..770a9343 --- /dev/null +++ b/docs/sdk/models/operations/ingesttransientitemglobals.md @@ -0,0 +1,35 @@ +# IngestTransientItemGlobals + +## Example Usage + +```typescript +import { IngestTransientItemGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: IngestTransientItemGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/ingesttransientitemrequest.md b/docs/sdk/models/operations/ingesttransientitemrequest.md new file mode 100644 index 00000000..72ce276a --- /dev/null +++ b/docs/sdk/models/operations/ingesttransientitemrequest.md @@ -0,0 +1,34 @@ +# IngestTransientItemRequest + +## Example Usage + +```typescript +import { IngestTransientItemRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: IngestTransientItemRequest = { + url: "file:///storage%2Femulated%2F0%2FArcher-S01E01.mkv", + virtualFilePath: "/Avatar.mkv", + computeHashes: BoolInt.One, + ingestNonMatches: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `url` | *string* | :heavy_minus_sign: | The file of the file to ingest. | file:///storage%2Femulated%2F0%2FArcher-S01E01.mkv | +| `virtualFilePath` | *string* | :heavy_minus_sign: | A virtual path to use when the url is opaque. | /Avatar.mkv | +| `computeHashes` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Whether or not to compute Plex and OpenSubtitle hashes for the file. Defaults to 0. | 1 | +| `ingestNonMatches` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Whether or not non matching media should be stored. Defaults to 0. | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/ingesttransientitemresponse.md b/docs/sdk/models/operations/ingesttransientitemresponse.md new file mode 100644 index 00000000..3d5f5851 --- /dev/null +++ b/docs/sdk/models/operations/ingesttransientitemresponse.md @@ -0,0 +1,31 @@ +# IngestTransientItemResponse + +## Example Usage + +```typescript +import { IngestTransientItemResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: IngestTransientItemResponse = { + contentType: "", + statusCode: 333468, + headers: { + "key": [ + "", + "", + ], + "key1": [ + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/internalpaymentmethod.md b/docs/sdk/models/operations/internalpaymentmethod.md deleted file mode 100644 index d01a125c..00000000 --- a/docs/sdk/models/operations/internalpaymentmethod.md +++ /dev/null @@ -1,14 +0,0 @@ -# InternalPaymentMethod - -## Example Usage - -```typescript -import { InternalPaymentMethod } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: InternalPaymentMethod = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdk/models/operations/language.md b/docs/sdk/models/operations/language.md new file mode 100644 index 00000000..58c8b23b --- /dev/null +++ b/docs/sdk/models/operations/language.md @@ -0,0 +1,16 @@ +# Language + +## Example Usage + +```typescript +import { Language } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: Language = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `code` | *string* | :heavy_minus_sign: | 3 letter language code | +| `title` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/level.md b/docs/sdk/models/operations/level.md deleted file mode 100644 index d9f0b29a..00000000 --- a/docs/sdk/models/operations/level.md +++ /dev/null @@ -1,30 +0,0 @@ -# Level - -An integer log level to write to the PMS log with. -0: Error -1: Warning -2: Info -3: Debug -4: Verbose - - -## Example Usage - -```typescript -import { Level } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Level = Level.Two; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Zero` | 0 | -| `One` | 1 | -| `Two` | 2 | -| `Three` | 3 | -| `Four` | 4 | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/libtype.md b/docs/sdk/models/operations/libtype.md deleted file mode 100644 index 56d99c00..00000000 --- a/docs/sdk/models/operations/libtype.md +++ /dev/null @@ -1,22 +0,0 @@ -# Libtype - -The type of library to filter. Can be "movie" or "show", or all if not present. - - -## Example Usage - -```typescript -import { Libtype } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Libtype = Libtype.Show; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Movie` | movie | -| `Show` | show | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/lineup.md b/docs/sdk/models/operations/lineup.md new file mode 100644 index 00000000..29f3e740 --- /dev/null +++ b/docs/sdk/models/operations/lineup.md @@ -0,0 +1,20 @@ +# Lineup + +## Example Usage + +```typescript +import { Lineup } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: Lineup = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | The type of this object (`lineup` in this case) | +| `lineupType` | [operations.LineupType](../../../sdk/models/operations/lineuptype.md) | :heavy_minus_sign: | - `-1`: N/A
- `0`: Over the air
- `1`: Cable
- `2`: Satellite
- `3`: IPTV
- `4`: Virtual
| +| `location` | *string* | :heavy_minus_sign: | N/A | +| `uuid` | *string* | :heavy_minus_sign: | The uuid of this lineup | +| `channel` | [shared.Channel](../../../sdk/models/shared/channel.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/lineuptype.md b/docs/sdk/models/operations/lineuptype.md new file mode 100644 index 00000000..1470ff25 --- /dev/null +++ b/docs/sdk/models/operations/lineuptype.md @@ -0,0 +1,28 @@ +# LineupType + +- `-1`: N/A +- `0`: Over the air +- `1`: Cable +- `2`: Satellite +- `3`: IPTV +- `4`: Virtual + + +## Example Usage + +```typescript +import { LineupType } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: LineupType = LineupType.Two; +``` + +## Values + +| Name | Value | +| -------- | -------- | +| `Minus1` | -1 | +| `Zero` | 0 | +| `One` | 1 | +| `Two` | 2 | +| `Three` | 3 | +| `Four` | 4 | \ No newline at end of file diff --git a/docs/sdk/models/operations/listactivitiesmediacontainer.md b/docs/sdk/models/operations/listactivitiesmediacontainer.md new file mode 100644 index 00000000..5357811c --- /dev/null +++ b/docs/sdk/models/operations/listactivitiesmediacontainer.md @@ -0,0 +1,15 @@ +# ListActivitiesMediaContainer + +## Example Usage + +```typescript +import { ListActivitiesMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListActivitiesMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `activity` | [operations.Activity](../../../sdk/models/operations/activity.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listactivitiesresponse.md b/docs/sdk/models/operations/listactivitiesresponse.md new file mode 100644 index 00000000..5584b5ed --- /dev/null +++ b/docs/sdk/models/operations/listactivitiesresponse.md @@ -0,0 +1,21 @@ +# ListActivitiesResponse + +## Example Usage + +```typescript +import { ListActivitiesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListActivitiesResponse = { + contentType: "", + statusCode: 805406, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.ListActivitiesResponseBody](../../../sdk/models/operations/listactivitiesresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/listactivitiesresponsebody.md b/docs/sdk/models/operations/listactivitiesresponsebody.md new file mode 100644 index 00000000..ca707cf4 --- /dev/null +++ b/docs/sdk/models/operations/listactivitiesresponsebody.md @@ -0,0 +1,17 @@ +# ListActivitiesResponseBody + +OK + +## Example Usage + +```typescript +import { ListActivitiesResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListActivitiesResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.ListActivitiesMediaContainer](../../../sdk/models/operations/listactivitiesmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listcontentglobals.md b/docs/sdk/models/operations/listcontentglobals.md new file mode 100644 index 00000000..06e10f7d --- /dev/null +++ b/docs/sdk/models/operations/listcontentglobals.md @@ -0,0 +1,35 @@ +# ListContentGlobals + +## Example Usage + +```typescript +import { ListContentGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListContentGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/listcontentrequest.md b/docs/sdk/models/operations/listcontentrequest.md new file mode 100644 index 00000000..04c473af --- /dev/null +++ b/docs/sdk/models/operations/listcontentrequest.md @@ -0,0 +1,28 @@ +# ListContentRequest + +## Example Usage + +```typescript +import { ListContentRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListContentRequest = { + sectionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `mediaQuery` | [shared.MediaQuery](../../../sdk/models/shared/mediaquery.md) | :heavy_minus_sign: | This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries | | +| `sectionId` | *string* | :heavy_check_mark: | The id of the section | | \ No newline at end of file diff --git a/docs/sdk/models/operations/listcontentresponse.md b/docs/sdk/models/operations/listcontentresponse.md new file mode 100644 index 00000000..e8a89940 --- /dev/null +++ b/docs/sdk/models/operations/listcontentresponse.md @@ -0,0 +1,23 @@ +# ListContentResponse + +## Example Usage + +```typescript +import { ListContentResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListContentResponse = { + contentType: "", + statusCode: 378103, + headers: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listdevicesresponse.md b/docs/sdk/models/operations/listdevicesresponse.md new file mode 100644 index 00000000..4c4baa73 --- /dev/null +++ b/docs/sdk/models/operations/listdevicesresponse.md @@ -0,0 +1,25 @@ +# ListDevicesResponse + +## Example Usage + +```typescript +import { ListDevicesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListDevicesResponse = { + contentType: "", + statusCode: 561860, + headers: { + "key": [], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithDevice` | [shared.MediaContainerWithDevice](../../../sdk/models/shared/mediacontainerwithdevice.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listdownloadqueueitemsdecisionresult.md b/docs/sdk/models/operations/listdownloadqueueitemsdecisionresult.md new file mode 100644 index 00000000..57a381f6 --- /dev/null +++ b/docs/sdk/models/operations/listdownloadqueueitemsdecisionresult.md @@ -0,0 +1,23 @@ +# ListDownloadQueueItemsDecisionResult + +## Example Usage + +```typescript +import { ListDownloadQueueItemsDecisionResult } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListDownloadQueueItemsDecisionResult = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `availableBandwidth` | *number* | :heavy_minus_sign: | The maximum bitrate set when item was added | +| `directPlayDecisionCode` | *number* | :heavy_minus_sign: | N/A | +| `directPlayDecisionText` | *string* | :heavy_minus_sign: | N/A | +| `generalDecisionCode` | *number* | :heavy_minus_sign: | N/A | +| `generalDecisionText` | *string* | :heavy_minus_sign: | N/A | +| `mdeDecisionCode` | *number* | :heavy_minus_sign: | The code indicating the status of evaluation of playback when client indicates `hasMDE=1` | +| `mdeDecisionText` | *string* | :heavy_minus_sign: | Descriptive text for the above code | +| `transcodeDecisionCode` | *number* | :heavy_minus_sign: | N/A | +| `transcodeDecisionText` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listdownloadqueueitemsdownloadqueueitem.md b/docs/sdk/models/operations/listdownloadqueueitemsdownloadqueueitem.md new file mode 100644 index 00000000..51f0b11d --- /dev/null +++ b/docs/sdk/models/operations/listdownloadqueueitemsdownloadqueueitem.md @@ -0,0 +1,22 @@ +# ListDownloadQueueItemsDownloadQueueItem + +## Example Usage + +```typescript +import { ListDownloadQueueItemsDownloadQueueItem } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListDownloadQueueItemsDownloadQueueItem = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `decisionResult` | [operations.ListDownloadQueueItemsDecisionResult](../../../sdk/models/operations/listdownloadqueueitemsdecisionresult.md) | :heavy_minus_sign: | N/A | +| `error` | *string* | :heavy_minus_sign: | The error encountered in transcoding or decision | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `queueId` | *number* | :heavy_minus_sign: | N/A | +| `status` | [operations.ListDownloadQueueItemsStatus](../../../sdk/models/operations/listdownloadqueueitemsstatus.md) | :heavy_minus_sign: | The state of the item:
- deciding: The item decision is pending
- waiting: The item is waiting for transcode
- processing: The item is being transcoded
- available: The item is available for download
- error: The item encountered an error in the decision or transcode
- expired: The transcoded item has timed out and is no longer available
| +| `transcode` | [operations.ListDownloadQueueItemsTranscode](../../../sdk/models/operations/listdownloadqueueitemstranscode.md) | :heavy_minus_sign: | The transcode session object which is not yet documented otherwise it'd be a $ref here. | +| `transcodeSession` | [shared.TranscodeSession](../../../sdk/models/shared/transcodesession.md) | :heavy_minus_sign: | The transcode session if item is currently being transcoded | \ No newline at end of file diff --git a/docs/sdk/models/operations/listdownloadqueueitemsglobals.md b/docs/sdk/models/operations/listdownloadqueueitemsglobals.md new file mode 100644 index 00000000..7ef47332 --- /dev/null +++ b/docs/sdk/models/operations/listdownloadqueueitemsglobals.md @@ -0,0 +1,35 @@ +# ListDownloadQueueItemsGlobals + +## Example Usage + +```typescript +import { ListDownloadQueueItemsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListDownloadQueueItemsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/listdownloadqueueitemsmediacontainer.md b/docs/sdk/models/operations/listdownloadqueueitemsmediacontainer.md new file mode 100644 index 00000000..03ec00bc --- /dev/null +++ b/docs/sdk/models/operations/listdownloadqueueitemsmediacontainer.md @@ -0,0 +1,24 @@ +# ListDownloadQueueItemsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { ListDownloadQueueItemsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListDownloadQueueItemsMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `downloadQueueItem` | [operations.ListDownloadQueueItemsDownloadQueueItem](../../../sdk/models/operations/listdownloadqueueitemsdownloadqueueitem.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listdownloadqueueitemsrequest.md b/docs/sdk/models/operations/listdownloadqueueitemsrequest.md new file mode 100644 index 00000000..5270e4db --- /dev/null +++ b/docs/sdk/models/operations/listdownloadqueueitemsrequest.md @@ -0,0 +1,27 @@ +# ListDownloadQueueItemsRequest + +## Example Usage + +```typescript +import { ListDownloadQueueItemsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListDownloadQueueItemsRequest = { + queueId: 434783, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `queueId` | *number* | :heavy_check_mark: | The queue id | | \ No newline at end of file diff --git a/docs/sdk/models/operations/listdownloadqueueitemsresponse.md b/docs/sdk/models/operations/listdownloadqueueitemsresponse.md new file mode 100644 index 00000000..0842c502 --- /dev/null +++ b/docs/sdk/models/operations/listdownloadqueueitemsresponse.md @@ -0,0 +1,21 @@ +# ListDownloadQueueItemsResponse + +## Example Usage + +```typescript +import { ListDownloadQueueItemsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListDownloadQueueItemsResponse = { + contentType: "", + statusCode: 77421, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.ListDownloadQueueItemsResponseBody](../../../sdk/models/operations/listdownloadqueueitemsresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/listdownloadqueueitemsresponsebody.md b/docs/sdk/models/operations/listdownloadqueueitemsresponsebody.md new file mode 100644 index 00000000..7af8dcfc --- /dev/null +++ b/docs/sdk/models/operations/listdownloadqueueitemsresponsebody.md @@ -0,0 +1,17 @@ +# ListDownloadQueueItemsResponseBody + +OK + +## Example Usage + +```typescript +import { ListDownloadQueueItemsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListDownloadQueueItemsResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.ListDownloadQueueItemsMediaContainer](../../../sdk/models/operations/listdownloadqueueitemsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listdownloadqueueitemsstatus.md b/docs/sdk/models/operations/listdownloadqueueitemsstatus.md new file mode 100644 index 00000000..db4280ba --- /dev/null +++ b/docs/sdk/models/operations/listdownloadqueueitemsstatus.md @@ -0,0 +1,30 @@ +# ListDownloadQueueItemsStatus + +The state of the item: + - deciding: The item decision is pending + - waiting: The item is waiting for transcode + - processing: The item is being transcoded + - available: The item is available for download + - error: The item encountered an error in the decision or transcode + - expired: The transcoded item has timed out and is no longer available + + +## Example Usage + +```typescript +import { ListDownloadQueueItemsStatus } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListDownloadQueueItemsStatus = + ListDownloadQueueItemsStatus.Processing; +``` + +## Values + +| Name | Value | +| ------------ | ------------ | +| `Deciding` | deciding | +| `Waiting` | waiting | +| `Processing` | processing | +| `Available` | available | +| `Error` | error | +| `Expired` | expired | \ No newline at end of file diff --git a/docs/sdk/models/operations/listdownloadqueueitemstranscode.md b/docs/sdk/models/operations/listdownloadqueueitemstranscode.md new file mode 100644 index 00000000..2051835f --- /dev/null +++ b/docs/sdk/models/operations/listdownloadqueueitemstranscode.md @@ -0,0 +1,16 @@ +# ListDownloadQueueItemsTranscode + +The transcode session object which is not yet documented otherwise it'd be a $ref here. + +## Example Usage + +```typescript +import { ListDownloadQueueItemsTranscode } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListDownloadQueueItemsTranscode = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdk/models/operations/listdvrsdvr.md b/docs/sdk/models/operations/listdvrsdvr.md new file mode 100644 index 00000000..9867e4eb --- /dev/null +++ b/docs/sdk/models/operations/listdvrsdvr.md @@ -0,0 +1,19 @@ +# ListDVRsDVR + +## Example Usage + +```typescript +import { ListDVRsDVR } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListDVRsDVR = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `device` | [shared.Device](../../../sdk/models/shared/device.md)[] | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `language` | *string* | :heavy_minus_sign: | N/A | +| `lineup` | *string* | :heavy_minus_sign: | N/A | +| `uuid` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listdvrsmediacontainer.md b/docs/sdk/models/operations/listdvrsmediacontainer.md new file mode 100644 index 00000000..ebdbb9d1 --- /dev/null +++ b/docs/sdk/models/operations/listdvrsmediacontainer.md @@ -0,0 +1,16 @@ +# ListDVRsMediaContainer + +## Example Usage + +```typescript +import { ListDVRsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListDVRsMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.ListDVRsMediaContainerMediaContainer](../../../sdk/models/operations/listdvrsmediacontainermediacontainer.md) | :heavy_minus_sign: | N/A | +| `dvr` | [operations.ListDVRsDVR](../../../sdk/models/operations/listdvrsdvr.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listdvrsmediacontainermediacontainer.md b/docs/sdk/models/operations/listdvrsmediacontainermediacontainer.md new file mode 100644 index 00000000..75018700 --- /dev/null +++ b/docs/sdk/models/operations/listdvrsmediacontainermediacontainer.md @@ -0,0 +1,24 @@ +# ListDVRsMediaContainerMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { ListDVRsMediaContainerMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListDVRsMediaContainerMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `status` | *number* | :heavy_minus_sign: | A status indicator. If present and non-zero, indicates an error | \ No newline at end of file diff --git a/docs/sdk/models/operations/listdvrsresponse.md b/docs/sdk/models/operations/listdvrsresponse.md new file mode 100644 index 00000000..fc01e052 --- /dev/null +++ b/docs/sdk/models/operations/listdvrsresponse.md @@ -0,0 +1,33 @@ +# ListDVRsResponse + +## Example Usage + +```typescript +import { ListDVRsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListDVRsResponse = { + contentType: "", + statusCode: 329056, + headers: { + "key": [ + "", + ], + "key1": [], + "key2": [ + "", + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.ListDVRsResponseBody](../../../sdk/models/operations/listdvrsresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listdvrsresponsebody.md b/docs/sdk/models/operations/listdvrsresponsebody.md new file mode 100644 index 00000000..29f12dbd --- /dev/null +++ b/docs/sdk/models/operations/listdvrsresponsebody.md @@ -0,0 +1,17 @@ +# ListDVRsResponseBody + +OK + +## Example Usage + +```typescript +import { ListDVRsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListDVRsResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.ListDVRsMediaContainer](../../../sdk/models/operations/listdvrsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listhubsglobals.md b/docs/sdk/models/operations/listhubsglobals.md new file mode 100644 index 00000000..620d872a --- /dev/null +++ b/docs/sdk/models/operations/listhubsglobals.md @@ -0,0 +1,35 @@ +# ListHubsGlobals + +## Example Usage + +```typescript +import { ListHubsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListHubsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/listhubsmediacontainer.md b/docs/sdk/models/operations/listhubsmediacontainer.md new file mode 100644 index 00000000..26b5ebe1 --- /dev/null +++ b/docs/sdk/models/operations/listhubsmediacontainer.md @@ -0,0 +1,24 @@ +# ListHubsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { ListHubsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListHubsMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `hub` | [operations.Hub](../../../sdk/models/operations/hub.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listhubsrequest.md b/docs/sdk/models/operations/listhubsrequest.md new file mode 100644 index 00000000..b34a894e --- /dev/null +++ b/docs/sdk/models/operations/listhubsrequest.md @@ -0,0 +1,28 @@ +# ListHubsRequest + +## Example Usage + +```typescript +import { ListHubsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListHubsRequest = { + sectionId: 893324, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | The section ID for the hubs to reorder | | +| `metadataItemId` | *number* | :heavy_minus_sign: | Restrict hubs to ones relevant to the provided metadata item | | \ No newline at end of file diff --git a/docs/sdk/models/operations/listhubsresponse.md b/docs/sdk/models/operations/listhubsresponse.md new file mode 100644 index 00000000..f32f02a0 --- /dev/null +++ b/docs/sdk/models/operations/listhubsresponse.md @@ -0,0 +1,34 @@ +# ListHubsResponse + +## Example Usage + +```typescript +import { ListHubsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListHubsResponse = { + contentType: "", + statusCode: 533204, + headers: { + "key": [ + "", + "", + "", + ], + "key1": [ + "", + "", + ], + "key2": [], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.ListHubsResponseBody](../../../sdk/models/operations/listhubsresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listhubsresponsebody.md b/docs/sdk/models/operations/listhubsresponsebody.md new file mode 100644 index 00000000..6592c767 --- /dev/null +++ b/docs/sdk/models/operations/listhubsresponsebody.md @@ -0,0 +1,17 @@ +# ListHubsResponseBody + +OK + +## Example Usage + +```typescript +import { ListHubsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListHubsResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.ListHubsMediaContainer](../../../sdk/models/operations/listhubsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listlineupsglobals.md b/docs/sdk/models/operations/listlineupsglobals.md new file mode 100644 index 00000000..6fd933b6 --- /dev/null +++ b/docs/sdk/models/operations/listlineupsglobals.md @@ -0,0 +1,35 @@ +# ListLineupsGlobals + +## Example Usage + +```typescript +import { ListLineupsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListLineupsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/listlineupsrequest.md b/docs/sdk/models/operations/listlineupsrequest.md new file mode 100644 index 00000000..47b1eb64 --- /dev/null +++ b/docs/sdk/models/operations/listlineupsrequest.md @@ -0,0 +1,31 @@ +# ListLineupsRequest + +## Example Usage + +```typescript +import { ListLineupsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListLineupsRequest = { + country: "Reunion", + epgId: "", + region: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `country` | *string* | :heavy_check_mark: | 3 letter country code | | +| `epgId` | *string* | :heavy_check_mark: | The `providerIdentifier` of the provider | | +| `region` | *string* | :heavy_check_mark: | The region for the lineup | | \ No newline at end of file diff --git a/docs/sdk/models/operations/listlineupsresponse.md b/docs/sdk/models/operations/listlineupsresponse.md new file mode 100644 index 00000000..9beab78b --- /dev/null +++ b/docs/sdk/models/operations/listlineupsresponse.md @@ -0,0 +1,28 @@ +# ListLineupsResponse + +## Example Usage + +```typescript +import { ListLineupsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListLineupsResponse = { + contentType: "", + statusCode: 522517, + headers: { + "key": [ + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithLineup` | [shared.MediaContainerWithLineup](../../../sdk/models/shared/mediacontainerwithlineup.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listmatchesglobals.md b/docs/sdk/models/operations/listmatchesglobals.md new file mode 100644 index 00000000..a85ada90 --- /dev/null +++ b/docs/sdk/models/operations/listmatchesglobals.md @@ -0,0 +1,35 @@ +# ListMatchesGlobals + +## Example Usage + +```typescript +import { ListMatchesGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListMatchesGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/listmatchesrequest.md b/docs/sdk/models/operations/listmatchesrequest.md new file mode 100644 index 00000000..3c4eb584 --- /dev/null +++ b/docs/sdk/models/operations/listmatchesrequest.md @@ -0,0 +1,35 @@ +# ListMatchesRequest + +## Example Usage + +```typescript +import { ListMatchesRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: ListMatchesRequest = { + ids: "", + manual: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `title` | *string* | :heavy_minus_sign: | N/A | | +| `parentTitle` | *string* | :heavy_minus_sign: | N/A | | +| `agent` | *string* | :heavy_minus_sign: | N/A | | +| `language` | *string* | :heavy_minus_sign: | N/A | | +| `year` | *number* | :heavy_minus_sign: | N/A | | +| `manual` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/listmatchesresponse.md b/docs/sdk/models/operations/listmatchesresponse.md new file mode 100644 index 00000000..21d0f9a3 --- /dev/null +++ b/docs/sdk/models/operations/listmatchesresponse.md @@ -0,0 +1,21 @@ +# ListMatchesResponse + +## Example Usage + +```typescript +import { ListMatchesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListMatchesResponse = { + contentType: "", + statusCode: 327655, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/listmomentsglobals.md b/docs/sdk/models/operations/listmomentsglobals.md new file mode 100644 index 00000000..5acec0ea --- /dev/null +++ b/docs/sdk/models/operations/listmomentsglobals.md @@ -0,0 +1,35 @@ +# ListMomentsGlobals + +## Example Usage + +```typescript +import { ListMomentsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListMomentsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/listmomentsrequest.md b/docs/sdk/models/operations/listmomentsrequest.md new file mode 100644 index 00000000..23787723 --- /dev/null +++ b/docs/sdk/models/operations/listmomentsrequest.md @@ -0,0 +1,27 @@ +# ListMomentsRequest + +## Example Usage + +```typescript +import { ListMomentsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListMomentsRequest = { + sectionId: 711707, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/sdk/models/operations/listmomentsresponse.md b/docs/sdk/models/operations/listmomentsresponse.md new file mode 100644 index 00000000..816d0ee3 --- /dev/null +++ b/docs/sdk/models/operations/listmomentsresponse.md @@ -0,0 +1,21 @@ +# ListMomentsResponse + +## Example Usage + +```typescript +import { ListMomentsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListMomentsResponse = { + contentType: "", + statusCode: 863263, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithArtwork` | [shared.MediaContainerWithArtwork](../../../sdk/models/shared/mediacontainerwithartwork.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/listpersonmediaglobals.md b/docs/sdk/models/operations/listpersonmediaglobals.md new file mode 100644 index 00000000..2245aae2 --- /dev/null +++ b/docs/sdk/models/operations/listpersonmediaglobals.md @@ -0,0 +1,35 @@ +# ListPersonMediaGlobals + +## Example Usage + +```typescript +import { ListPersonMediaGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListPersonMediaGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/listpersonmediarequest.md b/docs/sdk/models/operations/listpersonmediarequest.md new file mode 100644 index 00000000..48e7468e --- /dev/null +++ b/docs/sdk/models/operations/listpersonmediarequest.md @@ -0,0 +1,27 @@ +# ListPersonMediaRequest + +## Example Usage + +```typescript +import { ListPersonMediaRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListPersonMediaRequest = { + personId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `personId` | *string* | :heavy_check_mark: | Either the PMS tag `id` of the person or `tagKey` of the actor. Note the `tagKey` is the hex portion of the plex guid for the actor | | \ No newline at end of file diff --git a/docs/sdk/models/operations/listpersonmediaresponse.md b/docs/sdk/models/operations/listpersonmediaresponse.md new file mode 100644 index 00000000..492c590a --- /dev/null +++ b/docs/sdk/models/operations/listpersonmediaresponse.md @@ -0,0 +1,21 @@ +# ListPersonMediaResponse + +## Example Usage + +```typescript +import { ListPersonMediaResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListPersonMediaResponse = { + contentType: "", + statusCode: 776873, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/listplaybackhistoryglobals.md b/docs/sdk/models/operations/listplaybackhistoryglobals.md new file mode 100644 index 00000000..4e86390e --- /dev/null +++ b/docs/sdk/models/operations/listplaybackhistoryglobals.md @@ -0,0 +1,35 @@ +# ListPlaybackHistoryGlobals + +## Example Usage + +```typescript +import { ListPlaybackHistoryGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListPlaybackHistoryGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/listplaybackhistorymediacontainer.md b/docs/sdk/models/operations/listplaybackhistorymediacontainer.md new file mode 100644 index 00000000..2af08fce --- /dev/null +++ b/docs/sdk/models/operations/listplaybackhistorymediacontainer.md @@ -0,0 +1,24 @@ +# ListPlaybackHistoryMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { ListPlaybackHistoryMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListPlaybackHistoryMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `metadata` | [operations.ListPlaybackHistoryMetadatum](../../../sdk/models/operations/listplaybackhistorymetadatum.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listplaybackhistorymetadatum.md b/docs/sdk/models/operations/listplaybackhistorymetadatum.md new file mode 100644 index 00000000..76ec42ad --- /dev/null +++ b/docs/sdk/models/operations/listplaybackhistorymetadatum.md @@ -0,0 +1,25 @@ +# ListPlaybackHistoryMetadatum + +## Example Usage + +```typescript +import { ListPlaybackHistoryMetadatum } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListPlaybackHistoryMetadatum = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `accountID` | *number* | :heavy_minus_sign: | The account id of this playback | +| `deviceID` | *number* | :heavy_minus_sign: | The device id which played the item | +| `historyKey` | *string* | :heavy_minus_sign: | The key for this individual history item | +| `key` | *string* | :heavy_minus_sign: | The metadata key for the item played | +| `librarySectionID` | *string* | :heavy_minus_sign: | The library section id containing the item played | +| `originallyAvailableAt` | *string* | :heavy_minus_sign: | The originally available at of the item played | +| `ratingKey` | *string* | :heavy_minus_sign: | The rating key for the item played | +| `thumb` | *string* | :heavy_minus_sign: | The thumb of the item played | +| `title` | *string* | :heavy_minus_sign: | The title of the item played | +| `type` | *string* | :heavy_minus_sign: | The metadata type of the item played | +| `viewedAt` | *number* | :heavy_minus_sign: | The time when the item was played | \ No newline at end of file diff --git a/docs/sdk/models/operations/listplaybackhistoryrequest.md b/docs/sdk/models/operations/listplaybackhistoryrequest.md new file mode 100644 index 00000000..613696f6 --- /dev/null +++ b/docs/sdk/models/operations/listplaybackhistoryrequest.md @@ -0,0 +1,33 @@ +# ListPlaybackHistoryRequest + +## Example Usage + +```typescript +import { ListPlaybackHistoryRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListPlaybackHistoryRequest = { + sort: [ + "viewedAt:desc,accountID", + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `accountID` | *number* | :heavy_minus_sign: | The account id to restrict view history | | +| `viewedAt` | *number* | :heavy_minus_sign: | The time period to restrict history (typically of the form `viewedAt>=12456789`) | | +| `librarySectionID` | *number* | :heavy_minus_sign: | The library section id to restrict view history | | +| `metadataItemID` | *number* | :heavy_minus_sign: | The metadata item to restrict view history (can provide the id for a show to see all of that show's view history). Note this is translated to `metadata_items.id`, `parents.id`, or `grandparents.id` internally depending on the metadata type. | | +| `sort` | *string*[] | :heavy_minus_sign: | The field on which to sort. Multiple orderings can be specified separated by `,` and the direction specified following a `:` (`desc` or `asc`; `asc` is assumed if not provided). Note `metadataItemID` may not be used here. | viewedAt:desc,accountID | \ No newline at end of file diff --git a/docs/sdk/models/operations/listplaybackhistoryresponse.md b/docs/sdk/models/operations/listplaybackhistoryresponse.md new file mode 100644 index 00000000..1552b340 --- /dev/null +++ b/docs/sdk/models/operations/listplaybackhistoryresponse.md @@ -0,0 +1,23 @@ +# ListPlaybackHistoryResponse + +## Example Usage + +```typescript +import { ListPlaybackHistoryResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListPlaybackHistoryResponse = { + contentType: "", + statusCode: 514983, + headers: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.ListPlaybackHistoryResponseBody](../../../sdk/models/operations/listplaybackhistoryresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listplaybackhistoryresponsebody.md b/docs/sdk/models/operations/listplaybackhistoryresponsebody.md new file mode 100644 index 00000000..a209ffe9 --- /dev/null +++ b/docs/sdk/models/operations/listplaybackhistoryresponsebody.md @@ -0,0 +1,17 @@ +# ListPlaybackHistoryResponseBody + +OK + +## Example Usage + +```typescript +import { ListPlaybackHistoryResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListPlaybackHistoryResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.ListPlaybackHistoryMediaContainer](../../../sdk/models/operations/listplaybackhistorymediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listplaylistsglobals.md b/docs/sdk/models/operations/listplaylistsglobals.md new file mode 100644 index 00000000..d905857b --- /dev/null +++ b/docs/sdk/models/operations/listplaylistsglobals.md @@ -0,0 +1,35 @@ +# ListPlaylistsGlobals + +## Example Usage + +```typescript +import { ListPlaylistsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListPlaylistsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/listplaylistsrequest.md b/docs/sdk/models/operations/listplaylistsrequest.md new file mode 100644 index 00000000..079564b7 --- /dev/null +++ b/docs/sdk/models/operations/listplaylistsrequest.md @@ -0,0 +1,26 @@ +# ListPlaylistsRequest + +## Example Usage + +```typescript +import { ListPlaylistsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListPlaylistsRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistType` | [operations.PlaylistType](../../../sdk/models/operations/playlisttype.md) | :heavy_minus_sign: | Limit to a type of playlist | | +| `smart` | *boolean* | :heavy_minus_sign: | Whether this is a smart collection/playlist | | \ No newline at end of file diff --git a/docs/sdk/models/operations/listplaylistsresponse.md b/docs/sdk/models/operations/listplaylistsresponse.md new file mode 100644 index 00000000..12a1343a --- /dev/null +++ b/docs/sdk/models/operations/listplaylistsresponse.md @@ -0,0 +1,23 @@ +# ListPlaylistsResponse + +## Example Usage + +```typescript +import { ListPlaylistsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListPlaylistsResponse = { + contentType: "", + statusCode: 167417, + headers: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithPlaylistMetadata` | [shared.MediaContainerWithPlaylistMetadata](../../../sdk/models/shared/mediacontainerwithplaylistmetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listprovidersmediacontainer.md b/docs/sdk/models/operations/listprovidersmediacontainer.md new file mode 100644 index 00000000..53ef32c7 --- /dev/null +++ b/docs/sdk/models/operations/listprovidersmediacontainer.md @@ -0,0 +1,82 @@ +# ListProvidersMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { ListProvidersMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListProvidersMediaContainer = { + livetv: 7, + machineIdentifier: "0123456789abcdef0123456789abcdef012345678", + musicAnalysis: 2, + myPlexMappingState: "mapped", + myPlexSigninState: "ok", + offlineTranscode: 1, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | A unique identifier for the provider, e.g. `com.plexapp.plugins.library`. | | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| | +| `size` | *number* | :heavy_minus_sign: | N/A | | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| | +| `allowCameraUpload` | *boolean* | :heavy_minus_sign: | N/A | | +| `allowChannelAccess` | *boolean* | :heavy_minus_sign: | N/A | | +| `allowMediaDeletion` | *boolean* | :heavy_minus_sign: | N/A | | +| `allowSharing` | *boolean* | :heavy_minus_sign: | N/A | | +| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | | +| `allowTuners` | *boolean* | :heavy_minus_sign: | N/A | | +| `backgroundProcessing` | *boolean* | :heavy_minus_sign: | N/A | | +| `certificate` | *boolean* | :heavy_minus_sign: | N/A | | +| `companionProxy` | *boolean* | :heavy_minus_sign: | N/A | | +| `countryCode` | *string* | :heavy_minus_sign: | N/A | | +| `diagnostics` | *string* | :heavy_minus_sign: | N/A | | +| `eventStream` | *boolean* | :heavy_minus_sign: | N/A | | +| `friendlyName` | *string* | :heavy_minus_sign: | N/A | | +| `hubSearch` | *boolean* | :heavy_minus_sign: | N/A | | +| `itemClusters` | *boolean* | :heavy_minus_sign: | N/A | | +| `livetv` | *number* | :heavy_minus_sign: | N/A | 7 | +| `machineIdentifier` | *any* | :heavy_minus_sign: | N/A | 0123456789abcdef0123456789abcdef012345678 | +| `mediaProviders` | *boolean* | :heavy_minus_sign: | N/A | | +| `multiuser` | *boolean* | :heavy_minus_sign: | N/A | | +| `musicAnalysis` | *number* | :heavy_minus_sign: | N/A | 2 | +| `myPlex` | *boolean* | :heavy_minus_sign: | N/A | | +| `myPlexMappingState` | *any* | :heavy_minus_sign: | N/A | mapped | +| `myPlexSigninState` | *any* | :heavy_minus_sign: | N/A | ok | +| `myPlexSubscription` | *boolean* | :heavy_minus_sign: | N/A | | +| `myPlexUsername` | *string* | :heavy_minus_sign: | N/A | | +| `offlineTranscode` | *any* | :heavy_minus_sign: | N/A | 1 | +| `ownerFeatures` | *string* | :heavy_minus_sign: | A comma-separated list of features which are enabled for the server owner | | +| `platform` | *string* | :heavy_minus_sign: | N/A | | +| `platformVersion` | *string* | :heavy_minus_sign: | N/A | | +| `pluginHost` | *boolean* | :heavy_minus_sign: | N/A | | +| `pushNotifications` | *boolean* | :heavy_minus_sign: | N/A | | +| `readOnlyLibraries` | *boolean* | :heavy_minus_sign: | N/A | | +| `streamingBrainABRVersion` | *number* | :heavy_minus_sign: | N/A | | +| `streamingBrainVersion` | *number* | :heavy_minus_sign: | N/A | | +| `sync` | *boolean* | :heavy_minus_sign: | N/A | | +| `transcoderActiveVideoSessions` | *number* | :heavy_minus_sign: | N/A | | +| `transcoderAudio` | *boolean* | :heavy_minus_sign: | N/A | | +| `transcoderLyrics` | *boolean* | :heavy_minus_sign: | N/A | | +| `transcoderPhoto` | *boolean* | :heavy_minus_sign: | N/A | | +| `transcoderSubtitles` | *boolean* | :heavy_minus_sign: | N/A | | +| `transcoderVideo` | *boolean* | :heavy_minus_sign: | N/A | | +| `transcoderVideoBitrates` | *any* | :heavy_minus_sign: | The suggested video quality bitrates to present to the user | | +| `transcoderVideoQualities` | *string* | :heavy_minus_sign: | N/A | | +| `transcoderVideoResolutions` | *any* | :heavy_minus_sign: | The suggested video resolutions to the above quality bitrates | | +| `updatedAt` | *number* | :heavy_minus_sign: | N/A | | +| `updater` | *boolean* | :heavy_minus_sign: | N/A | | +| `version` | *string* | :heavy_minus_sign: | N/A | | +| `voiceSearch` | *boolean* | :heavy_minus_sign: | N/A | | +| `feature` | [operations.Feature](../../../sdk/models/operations/feature.md)[] | :heavy_minus_sign: | N/A | | +| `protocols` | *string* | :heavy_minus_sign: | A comma-separated list of default protocols for the provider, which can be:
- `stream`: The provider allows streaming media directly from the provider (e.g. for Vimeo). - `download`: The provider allows downloading media for offline storage, sync, etc. (e.g. Podcasts). - `livetv`: The provider provides live content which is only available on a schedule basis. | | +| `title` | *string* | :heavy_minus_sign: | The title of the provider. | | +| `types` | *string* | :heavy_minus_sign: | This attribute contains a comma-separated list of the media types exposed by the provider (e.g. `video, audio`). | | \ No newline at end of file diff --git a/docs/sdk/models/operations/listprovidersresponse.md b/docs/sdk/models/operations/listprovidersresponse.md new file mode 100644 index 00000000..005ebc68 --- /dev/null +++ b/docs/sdk/models/operations/listprovidersresponse.md @@ -0,0 +1,21 @@ +# ListProvidersResponse + +## Example Usage + +```typescript +import { ListProvidersResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListProvidersResponse = { + contentType: "", + statusCode: 588193, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.ListProvidersResponseBody](../../../sdk/models/operations/listprovidersresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/listprovidersresponsebody.md b/docs/sdk/models/operations/listprovidersresponsebody.md new file mode 100644 index 00000000..1f3105c2 --- /dev/null +++ b/docs/sdk/models/operations/listprovidersresponsebody.md @@ -0,0 +1,26 @@ +# ListProvidersResponseBody + +OK + +## Example Usage + +```typescript +import { ListProvidersResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListProvidersResponseBody = { + mediaContainer: { + livetv: 7, + machineIdentifier: "0123456789abcdef0123456789abcdef012345678", + musicAnalysis: 2, + myPlexMappingState: "mapped", + myPlexSigninState: "ok", + offlineTranscode: 1, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.ListProvidersMediaContainer](../../../sdk/models/operations/listprovidersmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listsessionsmediacontainer.md b/docs/sdk/models/operations/listsessionsmediacontainer.md new file mode 100644 index 00000000..bcde3ad8 --- /dev/null +++ b/docs/sdk/models/operations/listsessionsmediacontainer.md @@ -0,0 +1,176 @@ +# ListSessionsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { ListSessionsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListSessionsMediaContainer = { + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `metadata` | [operations.ListSessionsMetadatum](../../../sdk/models/operations/listsessionsmetadatum.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listsessionsmetadatum.md b/docs/sdk/models/operations/listsessionsmetadatum.md new file mode 100644 index 00000000..c5323e58 --- /dev/null +++ b/docs/sdk/models/operations/listsessionsmetadatum.md @@ -0,0 +1,240 @@ +# ListSessionsMetadatum + +Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + +Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + +Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + + +## Example Usage + +```typescript +import { ListSessionsMetadatum } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListSessionsMetadatum = { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `player` | [shared.Player](../../../sdk/models/shared/player.md) | :heavy_minus_sign: | Information about the player being used for playback | +| `session` | [shared.Session](../../../sdk/models/shared/session.md) | :heavy_minus_sign: | Information about the playback session | +| `user` | [shared.User](../../../sdk/models/shared/user.md) | :heavy_minus_sign: | The user playing the content | +| `title` | *any* | :heavy_minus_sign: | The title of the item (e.g. “300” or “The Simpsons”) | +| `type` | *any* | :heavy_minus_sign: | The type of the video item, such as `movie`, `episode`, or `clip`. | +| `absoluteIndex` | *number* | :heavy_minus_sign: | When present, contains the disc number for a track on multi-disc albums. | +| `addedAt` | *number* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was added to the library. | +| `art` | *any* | :heavy_minus_sign: | When present, the URL for the background artwork for the item. | +| `audienceRating` | *number* | :heavy_minus_sign: | Some rating systems separate reviewer ratings from audience ratings | +| `audienceRatingImage` | *any* | :heavy_minus_sign: | A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). | +| `autotag` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `banner` | *any* | :heavy_minus_sign: | When present, the URL for a banner graphic for the item. | +| `chapterSource` | *any* | :heavy_minus_sign: | When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). | +| `composite` | *any* | :heavy_minus_sign: | When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). | +| `contentRating` | *any* | :heavy_minus_sign: | If known, the content rating (e.g. MPAA) for an item. | +| `country` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `director` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `duration` | *number* | :heavy_minus_sign: | When present, the duration for the item, in units of milliseconds. | +| `filter` | [shared.Filter](../../../sdk/models/shared/filter.md)[] | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `genre` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `grandparentArt` | *string* | :heavy_minus_sign: | The `art` of the grandparent | +| `grandparentHero` | *string* | :heavy_minus_sign: | The `hero` of the grandparent | +| `grandparentKey` | *string* | :heavy_minus_sign: | The `key` of the grandparent | +| `grandparentRatingKey` | *string* | :heavy_minus_sign: | The `ratingKey` of the grandparent | +| `grandparentTheme` | *string* | :heavy_minus_sign: | The `theme` of the grandparent | +| `grandparentThumb` | *string* | :heavy_minus_sign: | The `thumb` of the grandparent | +| `grandparentTitle` | *string* | :heavy_minus_sign: | The `title` of the grandparent | +| `guid` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `hero` | *any* | :heavy_minus_sign: | When present, the URL for a hero image for the item. | +| `image` | [shared.Image](../../../sdk/models/shared/image.md)[] | :heavy_minus_sign: | N/A | +| `index` | *number* | :heavy_minus_sign: | When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. | +| `key` | *any* | :heavy_minus_sign: | The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. | +| `lastViewedAt` | *number* | :heavy_minus_sign: | When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. | +| `leafCount` | *number* | :heavy_minus_sign: | For shows and seasons, contains the number of total episodes. | +| `media` | [shared.Media](../../../sdk/models/shared/media.md)[] | :heavy_minus_sign: | N/A | +| `originallyAvailableAt` | *any* | :heavy_minus_sign: | When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. | +| `originalTitle` | *any* | :heavy_minus_sign: | When present, used to indicate an item's original title, e.g. a movie's foreign title. | +| `parentHero` | *string* | :heavy_minus_sign: | The `hero` of the parent | +| `parentIndex` | *number* | :heavy_minus_sign: | The `index` of the parent | +| `parentKey` | *string* | :heavy_minus_sign: | The `key` of the parent | +| `parentRatingKey` | *string* | :heavy_minus_sign: | The `ratingKey` of the parent | +| `parentThumb` | *string* | :heavy_minus_sign: | The `thumb` of the parent | +| `parentTitle` | *string* | :heavy_minus_sign: | The `title` of the parent | +| `primaryExtraKey` | *any* | :heavy_minus_sign: | Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. | +| `prompt` | *string* | :heavy_minus_sign: | Prompt to give the user for this directory (such as `Search Movies`) | +| `rating` | *number* | :heavy_minus_sign: | When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. | +| `ratingArray` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `ratingCount` | *number* | :heavy_minus_sign: | Number of ratings under this metadata | +| `ratingImage` | *any* | :heavy_minus_sign: | When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. | +| `ratingKey` | *any* | :heavy_minus_sign: | This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. | +| `role` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `search` | *boolean* | :heavy_minus_sign: | Indicates this is a search directory | +| `secondary` | *boolean* | :heavy_minus_sign: | Used by old clients to provide nested menus allowing for primative (but structured) navigation. | +| `skipChildren` | *boolean* | :heavy_minus_sign: | When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. | +| `skipParent` | *boolean* | :heavy_minus_sign: | When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). | +| `sort` | [shared.Sort](../../../sdk/models/shared/sort.md)[] | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `studio` | *any* | :heavy_minus_sign: | When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). | +| `subtype` | *any* | :heavy_minus_sign: | The subtype of the video item, such as `photo` when the video item is in a photo library | +| `summary` | *any* | :heavy_minus_sign: | When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). | +| `tagline` | *any* | :heavy_minus_sign: | When present, a pithy one-liner about the item (usually only seen for movies). | +| `theme` | *any* | :heavy_minus_sign: | When present, the URL for theme music for the item (usually only for TV shows). | +| `thumb` | *any* | :heavy_minus_sign: | When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. | +| `titleSort` | *any* | :heavy_minus_sign: | Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). | +| `updatedAt` | *number* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). | +| `userRating` | *number* | :heavy_minus_sign: | When the user has rated an item, this contains the user rating | +| `viewCount` | *number* | :heavy_minus_sign: | When a users has completed watched or listened to an item, this attribute contains the number of consumptions. | +| `viewedLeafCount` | *number* | :heavy_minus_sign: | For shows and seasons, contains the number of viewed episodes. | +| `viewOffset` | *number* | :heavy_minus_sign: | When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. | +| `writer` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `year` | *number* | :heavy_minus_sign: | When present, the year associated with the item's release (e.g. release year for a movie). | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listsessionsresponse.md b/docs/sdk/models/operations/listsessionsresponse.md new file mode 100644 index 00000000..64ddc57e --- /dev/null +++ b/docs/sdk/models/operations/listsessionsresponse.md @@ -0,0 +1,25 @@ +# ListSessionsResponse + +## Example Usage + +```typescript +import { ListSessionsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListSessionsResponse = { + contentType: "", + statusCode: 150259, + headers: { + "key": [], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.ListSessionsResponseBody](../../../sdk/models/operations/listsessionsresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listsessionsresponsebody.md b/docs/sdk/models/operations/listsessionsresponsebody.md new file mode 100644 index 00000000..315d09a8 --- /dev/null +++ b/docs/sdk/models/operations/listsessionsresponsebody.md @@ -0,0 +1,171 @@ +# ListSessionsResponseBody + +OK + +## Example Usage + +```typescript +import { ListSessionsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListSessionsResponseBody = { + mediaContainer: { + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.ListSessionsMediaContainer](../../../sdk/models/operations/listsessionsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listsimilarglobals.md b/docs/sdk/models/operations/listsimilarglobals.md new file mode 100644 index 00000000..2781c556 --- /dev/null +++ b/docs/sdk/models/operations/listsimilarglobals.md @@ -0,0 +1,35 @@ +# ListSimilarGlobals + +## Example Usage + +```typescript +import { ListSimilarGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListSimilarGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/listsimilarrequest.md b/docs/sdk/models/operations/listsimilarrequest.md new file mode 100644 index 00000000..ef02b55c --- /dev/null +++ b/docs/sdk/models/operations/listsimilarrequest.md @@ -0,0 +1,28 @@ +# ListSimilarRequest + +## Example Usage + +```typescript +import { ListSimilarRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListSimilarRequest = { + ids: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `count` | *number* | :heavy_minus_sign: | Limit results to count items | | \ No newline at end of file diff --git a/docs/sdk/models/operations/listsimilarresponse.md b/docs/sdk/models/operations/listsimilarresponse.md new file mode 100644 index 00000000..45533aa2 --- /dev/null +++ b/docs/sdk/models/operations/listsimilarresponse.md @@ -0,0 +1,21 @@ +# ListSimilarResponse + +## Example Usage + +```typescript +import { ListSimilarResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListSimilarResponse = { + contentType: "", + statusCode: 791119, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/listsonicallysimilarglobals.md b/docs/sdk/models/operations/listsonicallysimilarglobals.md new file mode 100644 index 00000000..929b707d --- /dev/null +++ b/docs/sdk/models/operations/listsonicallysimilarglobals.md @@ -0,0 +1,35 @@ +# ListSonicallySimilarGlobals + +## Example Usage + +```typescript +import { ListSonicallySimilarGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListSonicallySimilarGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/listsonicallysimilarrequest.md b/docs/sdk/models/operations/listsonicallysimilarrequest.md new file mode 100644 index 00000000..002179ad --- /dev/null +++ b/docs/sdk/models/operations/listsonicallysimilarrequest.md @@ -0,0 +1,31 @@ +# ListSonicallySimilarRequest + +## Example Usage + +```typescript +import { ListSonicallySimilarRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListSonicallySimilarRequest = { + ids: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `excludeParentID` | *number* | :heavy_minus_sign: | N/A | | +| `excludeGrandparentID` | *number* | :heavy_minus_sign: | N/A | | +| `limit` | *number* | :heavy_minus_sign: | N/A | | +| `maxDistance` | *number* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/listsonicallysimilarresponse.md b/docs/sdk/models/operations/listsonicallysimilarresponse.md new file mode 100644 index 00000000..e4cd86d3 --- /dev/null +++ b/docs/sdk/models/operations/listsonicallysimilarresponse.md @@ -0,0 +1,21 @@ +# ListSonicallySimilarResponse + +## Example Usage + +```typescript +import { ListSonicallySimilarResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListSonicallySimilarResponse = { + contentType: "", + statusCode: 907963, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/listtopusersglobals.md b/docs/sdk/models/operations/listtopusersglobals.md new file mode 100644 index 00000000..5813fdba --- /dev/null +++ b/docs/sdk/models/operations/listtopusersglobals.md @@ -0,0 +1,35 @@ +# ListTopUsersGlobals + +## Example Usage + +```typescript +import { ListTopUsersGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListTopUsersGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/listtopusersmediacontainer.md b/docs/sdk/models/operations/listtopusersmediacontainer.md new file mode 100644 index 00000000..9832b9fb --- /dev/null +++ b/docs/sdk/models/operations/listtopusersmediacontainer.md @@ -0,0 +1,24 @@ +# ListTopUsersMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { ListTopUsersMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListTopUsersMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `account` | [operations.Account](../../../sdk/models/operations/account.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/listtopusersrequest.md b/docs/sdk/models/operations/listtopusersrequest.md new file mode 100644 index 00000000..f4f2e0bf --- /dev/null +++ b/docs/sdk/models/operations/listtopusersrequest.md @@ -0,0 +1,27 @@ +# ListTopUsersRequest + +## Example Usage + +```typescript +import { ListTopUsersRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListTopUsersRequest = { + ids: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/listtopusersresponse.md b/docs/sdk/models/operations/listtopusersresponse.md new file mode 100644 index 00000000..13970a02 --- /dev/null +++ b/docs/sdk/models/operations/listtopusersresponse.md @@ -0,0 +1,21 @@ +# ListTopUsersResponse + +## Example Usage + +```typescript +import { ListTopUsersResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListTopUsersResponse = { + contentType: "", + statusCode: 256110, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.ListTopUsersResponseBody](../../../sdk/models/operations/listtopusersresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/listtopusersresponsebody.md b/docs/sdk/models/operations/listtopusersresponsebody.md new file mode 100644 index 00000000..350498a8 --- /dev/null +++ b/docs/sdk/models/operations/listtopusersresponsebody.md @@ -0,0 +1,17 @@ +# ListTopUsersResponseBody + +OK + +## Example Usage + +```typescript +import { ListTopUsersResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ListTopUsersResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.ListTopUsersMediaContainer](../../../sdk/models/operations/listtopusersmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/location.md b/docs/sdk/models/operations/location.md deleted file mode 100644 index 24f519f9..00000000 --- a/docs/sdk/models/operations/location.md +++ /dev/null @@ -1,19 +0,0 @@ -# Location - -The folder path for the media item. - -## Example Usage - -```typescript -import { Location } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Location = { - path: "/TV Shows/Clarkson's Farm", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `path` | *string* | :heavy_check_mark: | N/A | /TV Shows/Clarkson's Farm | \ No newline at end of file diff --git a/docs/sdk/models/operations/loglinerequest.md b/docs/sdk/models/operations/loglinerequest.md deleted file mode 100644 index b1a24852..00000000 --- a/docs/sdk/models/operations/loglinerequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# LogLineRequest - -## Example Usage - -```typescript -import { Level, LogLineRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: LogLineRequest = { - level: Level.One, - message: "Test log message", - source: "Postman", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `level` | [operations.Level](../../../sdk/models/operations/level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with.
0: Error
1: Warning
2: Info
3: Debug
4: Verbose
| | -| `message` | *string* | :heavy_check_mark: | The text of the message to write to the log. | Test log message | -| `source` | *string* | :heavy_check_mark: | a string indicating the source of the message. | Postman | \ No newline at end of file diff --git a/docs/sdk/models/operations/loglineresponse.md b/docs/sdk/models/operations/loglineresponse.md deleted file mode 100644 index c75deda3..00000000 --- a/docs/sdk/models/operations/loglineresponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# LogLineResponse - -## Example Usage - -```typescript -import { LogLineResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: LogLineResponse = { - contentType: "", - statusCode: 280494, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/logmultilineresponse.md b/docs/sdk/models/operations/logmultilineresponse.md deleted file mode 100644 index c33e6a2d..00000000 --- a/docs/sdk/models/operations/logmultilineresponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# LogMultiLineResponse - -## Example Usage - -```typescript -import { LogMultiLineResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: LogMultiLineResponse = { - contentType: "", - statusCode: 479763, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/mailingliststatus.md b/docs/sdk/models/operations/mailingliststatus.md deleted file mode 100644 index 480f2282..00000000 --- a/docs/sdk/models/operations/mailingliststatus.md +++ /dev/null @@ -1,21 +0,0 @@ -# MailingListStatus - -Your current mailing list status (active or unsubscribed) - -## Example Usage - -```typescript -import { MailingListStatus } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: MailingListStatus = MailingListStatus.Active; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Active` | active | -| `Unsubscribed` | unsubscribed | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/makedecisionglobals.md b/docs/sdk/models/operations/makedecisionglobals.md new file mode 100644 index 00000000..d7f750c3 --- /dev/null +++ b/docs/sdk/models/operations/makedecisionglobals.md @@ -0,0 +1,35 @@ +# MakeDecisionGlobals + +## Example Usage + +```typescript +import { MakeDecisionGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MakeDecisionGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/makedecisionlocation.md b/docs/sdk/models/operations/makedecisionlocation.md new file mode 100644 index 00000000..b1daf5fa --- /dev/null +++ b/docs/sdk/models/operations/makedecisionlocation.md @@ -0,0 +1,19 @@ +# MakeDecisionLocation + +Network type of the client, can be used to help determine target bitrate. + +## Example Usage + +```typescript +import { MakeDecisionLocation } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MakeDecisionLocation = MakeDecisionLocation.Wan; +``` + +## Values + +| Name | Value | +| ---------- | ---------- | +| `Lan` | lan | +| `Wan` | wan | +| `Cellular` | cellular | \ No newline at end of file diff --git a/docs/sdk/models/operations/makedecisionprotocol.md b/docs/sdk/models/operations/makedecisionprotocol.md new file mode 100644 index 00000000..0f1abb1b --- /dev/null +++ b/docs/sdk/models/operations/makedecisionprotocol.md @@ -0,0 +1,20 @@ +# MakeDecisionProtocol + +Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + + +## Example Usage + +```typescript +import { MakeDecisionProtocol } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MakeDecisionProtocol = MakeDecisionProtocol.Dash; +``` + +## Values + +| Name | Value | +| ------ | ------ | +| `Http` | http | +| `Hls` | hls | +| `Dash` | dash | \ No newline at end of file diff --git a/docs/sdk/models/operations/makedecisionrequest.md b/docs/sdk/models/operations/makedecisionrequest.md new file mode 100644 index 00000000..82d74493 --- /dev/null +++ b/docs/sdk/models/operations/makedecisionrequest.md @@ -0,0 +1,92 @@ +# MakeDecisionRequest + +## Example Usage + +```typescript +import { + MakeDecisionLocation, + MakeDecisionProtocol, + MakeDecisionRequest, + MakeDecisionSubtitles, +} from "@lukehagar/plexjs/sdk/models/operations"; +import { AdvancedSubtitles, BoolInt, TranscodeType } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MakeDecisionRequest = { + transcodeType: TranscodeType.Audio, + advancedSubtitles: AdvancedSubtitles.Burn, + audioBoost: 50, + audioChannelCount: 5, + autoAdjustQuality: BoolInt.One, + autoAdjustSubtitle: BoolInt.One, + directPlay: BoolInt.One, + directStream: BoolInt.One, + directStreamAudio: BoolInt.One, + disableResolutionRotation: BoolInt.One, + hasMDE: BoolInt.One, + location: MakeDecisionLocation.Wan, + mediaBufferSize: 102400, + mediaIndex: 0, + musicBitrate: 5000, + offset: 90.5, + partIndex: 0, + path: "/library/metadata/151671", + peakBitrate: 12000, + photoResolution: "1080x1080", + protocol: MakeDecisionProtocol.Dash, + secondsPerSegment: 5, + subtitleSize: 50, + subtitles: MakeDecisionSubtitles.Embedded, + videoBitrate: 12000, + videoQuality: 50, + videoResolution: "1080x1080", + xPlexClientProfileExtra: + "add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)", + xPlexClientProfileName: "generic", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `transcodeType` | [shared.TranscodeType](../../../sdk/models/shared/transcodetype.md) | :heavy_check_mark: | Type of transcode media | | +| `transcodeSessionId` | *string* | :heavy_minus_sign: | Transcode session UUID | | +| `advancedSubtitles` | [shared.AdvancedSubtitles](../../../sdk/models/shared/advancedsubtitles.md) | :heavy_minus_sign: | Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost
| burn | +| `audioBoost` | *number* | :heavy_minus_sign: | Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) | 50 | +| `audioChannelCount` | *number* | :heavy_minus_sign: | Target video number of audio channels. | 5 | +| `autoAdjustQuality` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates the client supports ABR. | 1 | +| `autoAdjustSubtitle` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates if the server should adjust subtitles based on Voice Activity Data. | 1 | +| `directPlay` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates the client supports direct playing the indicated content. | 1 | +| `directStream` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates the client supports direct streaming the video of the indicated content. | 1 | +| `directStreamAudio` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates the client supports direct streaming the audio of the indicated content. | 1 | +| `disableResolutionRotation` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates if resolution should be adjusted for orientation. | 1 | +| `hasMDE` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 | 1 | +| `location` | [operations.MakeDecisionLocation](../../../sdk/models/operations/makedecisionlocation.md) | :heavy_minus_sign: | Network type of the client, can be used to help determine target bitrate. | wan | +| `mediaBufferSize` | *number* | :heavy_minus_sign: | Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. | 102400 | +| `mediaIndex` | *number* | :heavy_minus_sign: | Index of the media to transcode. -1 or not specified indicates let the server choose. | 0 | +| `musicBitrate` | *number* | :heavy_minus_sign: | Target bitrate for audio only files (in kbps, used to transcode). | 5000 | +| `offset` | *number* | :heavy_minus_sign: | Offset from the start of the media (in seconds). | 90.5 | +| `partIndex` | *number* | :heavy_minus_sign: | Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode | 0 | +| `path` | *string* | :heavy_minus_sign: | Internal PMS path of the media to transcode. | /library/metadata/151671 | +| `peakBitrate` | *number* | :heavy_minus_sign: | Maximum bitrate (in kbps) to use in ABR. | 12000 | +| `photoResolution` | *string* | :heavy_minus_sign: | Target photo resolution. | 1080x1080 | +| `protocol` | [operations.MakeDecisionProtocol](../../../sdk/models/operations/makedecisionprotocol.md) | :heavy_minus_sign: | Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022)
| dash | +| `secondsPerSegment` | *number* | :heavy_minus_sign: | Number of seconds to include in each transcoded segment | 5 | +| `subtitleSize` | *number* | :heavy_minus_sign: | Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) | 50 | +| `subtitles` | [operations.MakeDecisionSubtitles](../../../sdk/models/operations/makedecisionsubtitles.md) | :heavy_minus_sign: | Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream
| Burn | +| `videoBitrate` | *number* | :heavy_minus_sign: | Target video bitrate (in kbps). | 12000 | +| `videoQuality` | *number* | :heavy_minus_sign: | Target photo quality. | 50 | +| `videoResolution` | *string* | :heavy_minus_sign: | Target maximum video resolution. | 1080x1080 | +| `xPlexClientProfileExtra` | *string* | :heavy_minus_sign: | See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . | add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash) | +| `xPlexClientProfileName` | *string* | :heavy_minus_sign: | Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. | generic | +| `xPlexSessionIdentifier` | *string* | :heavy_minus_sign: | Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) | | \ No newline at end of file diff --git a/docs/sdk/models/operations/makedecisionresponse.md b/docs/sdk/models/operations/makedecisionresponse.md new file mode 100644 index 00000000..a264bf04 --- /dev/null +++ b/docs/sdk/models/operations/makedecisionresponse.md @@ -0,0 +1,21 @@ +# MakeDecisionResponse + +## Example Usage + +```typescript +import { MakeDecisionResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MakeDecisionResponse = { + contentType: "", + statusCode: 348140, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithDecision` | [shared.MediaContainerWithDecision](../../../sdk/models/shared/mediacontainerwithdecision.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/makedecisionsubtitles.md b/docs/sdk/models/operations/makedecisionsubtitles.md new file mode 100644 index 00000000..55258d57 --- /dev/null +++ b/docs/sdk/models/operations/makedecisionsubtitles.md @@ -0,0 +1,24 @@ +# MakeDecisionSubtitles + +Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + + +## Example Usage + +```typescript +import { MakeDecisionSubtitles } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MakeDecisionSubtitles = MakeDecisionSubtitles.Auto; +``` + +## Values + +| Name | Value | +| ----------- | ----------- | +| `Auto` | auto | +| `Burn` | burn | +| `None` | none | +| `Sidecar` | sidecar | +| `Embedded` | embedded | +| `Segmented` | segmented | +| `Unknown` | unknown | \ No newline at end of file diff --git a/docs/sdk/models/operations/marker.md b/docs/sdk/models/operations/marker.md deleted file mode 100644 index 7fe50049..00000000 --- a/docs/sdk/models/operations/marker.md +++ /dev/null @@ -1,32 +0,0 @@ -# Marker - -The final status of the marker - -## Example Usage - -```typescript -import { Marker } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Marker = { - id: 306970, - type: "credits", - startTimeOffset: 4176050, - endTimeOffset: 4393389, - final: true, - attributes: { - id: 306970, - version: 4, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | N/A | 306970 | -| `type` | *string* | :heavy_check_mark: | N/A | credits | -| `startTimeOffset` | *number* | :heavy_check_mark: | N/A | 4176050 | -| `endTimeOffset` | *number* | :heavy_check_mark: | N/A | 4393389 | -| `final` | *boolean* | :heavy_minus_sign: | N/A | true | -| `attributes` | [operations.Attributes](../../../sdk/models/operations/attributes.md) | :heavy_minus_sign: | Attributes associated with the marker. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/markplayedglobals.md b/docs/sdk/models/operations/markplayedglobals.md new file mode 100644 index 00000000..76f29f56 --- /dev/null +++ b/docs/sdk/models/operations/markplayedglobals.md @@ -0,0 +1,35 @@ +# MarkPlayedGlobals + +## Example Usage + +```typescript +import { MarkPlayedGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MarkPlayedGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/markplayedrequest.md b/docs/sdk/models/operations/markplayedrequest.md index d1435af5..c155a964 100644 --- a/docs/sdk/models/operations/markplayedrequest.md +++ b/docs/sdk/models/operations/markplayedrequest.md @@ -6,12 +6,24 @@ import { MarkPlayedRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: MarkPlayedRequest = { - key: 59398, + identifier: "", }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `key` | *number* | :heavy_check_mark: | The media key to mark as played | 59398 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `identifier` | *string* | :heavy_check_mark: | The identifier of the media provider containing the media to rate. Typically `com.plexapp.plugins.library` | | +| `key` | *string* | :heavy_minus_sign: | The key of the item to rate. This is the `ratingKey` found in metadata items | | +| `uri` | *string* | :heavy_minus_sign: | The URI of the item to mark as played. See intro for description of the URIs | | \ No newline at end of file diff --git a/docs/sdk/models/operations/markunplayedrequest.md b/docs/sdk/models/operations/markunplayedrequest.md deleted file mode 100644 index 59f580fc..00000000 --- a/docs/sdk/models/operations/markunplayedrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# MarkUnplayedRequest - -## Example Usage - -```typescript -import { MarkUnplayedRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: MarkUnplayedRequest = { - key: 59398, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `key` | *number* | :heavy_check_mark: | The media key to mark as Unplayed | 59398 | \ No newline at end of file diff --git a/docs/sdk/models/operations/markunplayedresponse.md b/docs/sdk/models/operations/markunplayedresponse.md deleted file mode 100644 index 1fa18516..00000000 --- a/docs/sdk/models/operations/markunplayedresponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# MarkUnplayedResponse - -## Example Usage - -```typescript -import { MarkUnplayedResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: MarkUnplayedResponse = { - contentType: "", - statusCode: 49382, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/matchitemglobals.md b/docs/sdk/models/operations/matchitemglobals.md new file mode 100644 index 00000000..1c4a3b49 --- /dev/null +++ b/docs/sdk/models/operations/matchitemglobals.md @@ -0,0 +1,35 @@ +# MatchItemGlobals + +## Example Usage + +```typescript +import { MatchItemGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MatchItemGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/matchitemrequest.md b/docs/sdk/models/operations/matchitemrequest.md new file mode 100644 index 00000000..14140919 --- /dev/null +++ b/docs/sdk/models/operations/matchitemrequest.md @@ -0,0 +1,30 @@ +# MatchItemRequest + +## Example Usage + +```typescript +import { MatchItemRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MatchItemRequest = { + ids: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `guid` | *string* | :heavy_minus_sign: | N/A | | +| `name` | *string* | :heavy_minus_sign: | N/A | | +| `year` | *number* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/matchitemresponse.md b/docs/sdk/models/operations/matchitemresponse.md new file mode 100644 index 00000000..c630bd7a --- /dev/null +++ b/docs/sdk/models/operations/matchitemresponse.md @@ -0,0 +1,20 @@ +# MatchItemResponse + +## Example Usage + +```typescript +import { MatchItemResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MatchItemResponse = { + contentType: "", + statusCode: 164998, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/media.md b/docs/sdk/models/operations/media.md deleted file mode 100644 index e6ec0b04..00000000 --- a/docs/sdk/models/operations/media.md +++ /dev/null @@ -1,123 +0,0 @@ -# Media - -## Example Usage - -```typescript -import { HasThumbnail, Media } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Media = { - id: 387322, - duration: 9610350, - bitrate: 25512, - width: 3840, - height: 1602, - aspectRatio: 2.35, - audioChannels: 6, - displayOffset: 50, - audioCodec: "eac3", - videoCodec: "hevc", - videoResolution: "4k", - container: "mkv", - videoFrameRate: "24p", - videoProfile: "main 10", - hasVoiceActivity: false, - audioProfile: "dts", - has64bitOffsets: false, - part: [ - { - accessible: true, - exists: true, - id: 418385, - key: "/library/parts/418385/1735864239/file.mkv", - indexes: "sd", - duration: 9610350, - file: "/mnt/Movies_1/W/Wicked (2024).mkv", - size: 30649952104, - packetLength: 188, - container: "mkv", - videoProfile: "main 10", - audioProfile: "dts", - has64bitOffsets: false, - hasThumbnail: HasThumbnail.True, - stream: [ - { - id: 1002625, - format: "srt", - default: true, - codec: "hevc", - index: 0, - bitrate: 24743, - language: "English", - languageTag: "en", - languageCode: "eng", - headerCompression: true, - doviblCompatID: 1, - doviblPresent: true, - dovielPresent: false, - doviLevel: 6, - doviPresent: true, - doviProfile: 8, - dovirpuPresent: true, - doviVersion: "1.0", - bitDepth: 10, - chromaLocation: "topleft", - chromaSubsampling: "4:2:0", - codedHeight: 1608, - codedWidth: 3840, - closedCaptions: true, - colorPrimaries: "bt2020", - colorRange: "tv", - colorSpace: "bt2020nc", - colorTrc: "smpte2084", - frameRate: 23.976, - key: "/library/streams/216389", - height: 1602, - level: 150, - original: true, - hasScalingMatrix: false, - profile: "main 10", - scanType: "progressive", - embeddedInVideo: "progressive", - refFrames: 1, - width: 3840, - displayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - extendedDisplayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - selected: true, - forced: true, - channels: 6, - audioChannelLayout: "5.1(side)", - samplingRate: 48000, - canAutoSync: false, - hearingImpaired: true, - dub: true, - title: "SDH", - }, - ], - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | Unique media identifier. | 387322 | -| `duration` | *number* | :heavy_minus_sign: | Duration of the media in milliseconds. | 9610350 | -| `bitrate` | *number* | :heavy_minus_sign: | Bitrate in bits per second. | 25512 | -| `width` | *number* | :heavy_minus_sign: | Video width in pixels. | 3840 | -| `height` | *number* | :heavy_minus_sign: | Video height in pixels. | 1602 | -| `aspectRatio` | *number* | :heavy_minus_sign: | Aspect ratio of the video. | 2.35 | -| `audioChannels` | *number* | :heavy_minus_sign: | Number of audio channels. | 6 | -| `displayOffset` | *number* | :heavy_minus_sign: | N/A | 50 | -| `audioCodec` | *string* | :heavy_minus_sign: | Audio codec used. | eac3 | -| `videoCodec` | *string* | :heavy_minus_sign: | Video codec used. | hevc | -| `videoResolution` | *string* | :heavy_minus_sign: | Video resolution (e.g., 4k). | 4k | -| `container` | *string* | :heavy_minus_sign: | File container type. | mkv | -| `videoFrameRate` | *string* | :heavy_minus_sign: | Frame rate of the video. Values found include NTSC, PAL, 24p
| 24p | -| `videoProfile` | *string* | :heavy_minus_sign: | Video profile (e.g., main 10). | main 10 | -| `hasVoiceActivity` | *boolean* | :heavy_minus_sign: | Indicates whether voice activity is detected. | false | -| `audioProfile` | *string* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `optimizedForStreaming` | *operations.OptimizedForStreaming* | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | -| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | -| `part` | [operations.Part](../../../sdk/models/operations/part.md)[] | :heavy_minus_sign: | An array of parts for this media item. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/mediacontainer.md b/docs/sdk/models/operations/mediacontainer.md deleted file mode 100644 index 26fd4afb..00000000 --- a/docs/sdk/models/operations/mediacontainer.md +++ /dev/null @@ -1,65 +0,0 @@ -# MediaContainer - -## Example Usage - -```typescript -import { MediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: MediaContainer = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `size` | *number* | :heavy_minus_sign: | N/A | -| `allowCameraUpload` | *boolean* | :heavy_minus_sign: | N/A | -| `allowChannelAccess` | *boolean* | :heavy_minus_sign: | N/A | -| `allowMediaDeletion` | *boolean* | :heavy_minus_sign: | N/A | -| `allowSharing` | *boolean* | :heavy_minus_sign: | N/A | -| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | -| `allowTuners` | *boolean* | :heavy_minus_sign: | N/A | -| `backgroundProcessing` | *boolean* | :heavy_minus_sign: | N/A | -| `certificate` | *boolean* | :heavy_minus_sign: | N/A | -| `companionProxy` | *boolean* | :heavy_minus_sign: | N/A | -| `countryCode` | *string* | :heavy_minus_sign: | N/A | -| `diagnostics` | *string* | :heavy_minus_sign: | N/A | -| `eventStream` | *boolean* | :heavy_minus_sign: | N/A | -| `friendlyName` | *string* | :heavy_minus_sign: | N/A | -| `hubSearch` | *boolean* | :heavy_minus_sign: | N/A | -| `itemClusters` | *boolean* | :heavy_minus_sign: | N/A | -| `livetv` | *number* | :heavy_minus_sign: | N/A | -| `machineIdentifier` | *string* | :heavy_minus_sign: | N/A | -| `mediaProviders` | *boolean* | :heavy_minus_sign: | N/A | -| `multiuser` | *boolean* | :heavy_minus_sign: | N/A | -| `musicAnalysis` | *number* | :heavy_minus_sign: | N/A | -| `myPlex` | *boolean* | :heavy_minus_sign: | N/A | -| `myPlexMappingState` | *string* | :heavy_minus_sign: | N/A | -| `myPlexSigninState` | *string* | :heavy_minus_sign: | N/A | -| `myPlexSubscription` | *boolean* | :heavy_minus_sign: | N/A | -| `myPlexUsername` | *string* | :heavy_minus_sign: | N/A | -| `offlineTranscode` | *number* | :heavy_minus_sign: | N/A | -| `ownerFeatures` | *string* | :heavy_minus_sign: | N/A | -| `photoAutoTag` | *boolean* | :heavy_minus_sign: | N/A | -| `platform` | *string* | :heavy_minus_sign: | N/A | -| `platformVersion` | *string* | :heavy_minus_sign: | N/A | -| `pluginHost` | *boolean* | :heavy_minus_sign: | N/A | -| `pushNotifications` | *boolean* | :heavy_minus_sign: | N/A | -| `readOnlyLibraries` | *boolean* | :heavy_minus_sign: | N/A | -| `streamingBrainABRVersion` | *number* | :heavy_minus_sign: | N/A | -| `streamingBrainVersion` | *number* | :heavy_minus_sign: | N/A | -| `sync` | *boolean* | :heavy_minus_sign: | N/A | -| `transcoderActiveVideoSessions` | *number* | :heavy_minus_sign: | N/A | -| `transcoderAudio` | *boolean* | :heavy_minus_sign: | N/A | -| `transcoderLyrics` | *boolean* | :heavy_minus_sign: | N/A | -| `transcoderPhoto` | *boolean* | :heavy_minus_sign: | N/A | -| `transcoderSubtitles` | *boolean* | :heavy_minus_sign: | N/A | -| `transcoderVideo` | *boolean* | :heavy_minus_sign: | N/A | -| `transcoderVideoBitrates` | *string* | :heavy_minus_sign: | N/A | -| `transcoderVideoQualities` | *string* | :heavy_minus_sign: | N/A | -| `transcoderVideoResolutions` | *string* | :heavy_minus_sign: | N/A | -| `updatedAt` | *number* | :heavy_minus_sign: | N/A | -| `updater` | *boolean* | :heavy_minus_sign: | N/A | -| `version` | *string* | :heavy_minus_sign: | N/A | -| `voiceSearch` | *boolean* | :heavy_minus_sign: | N/A | -| `directory` | [operations.Directory](../../../sdk/models/operations/directory.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/mediagrabber.md b/docs/sdk/models/operations/mediagrabber.md new file mode 100644 index 00000000..5fcf9d6c --- /dev/null +++ b/docs/sdk/models/operations/mediagrabber.md @@ -0,0 +1,17 @@ +# MediaGrabber + +## Example Usage + +```typescript +import { MediaGrabber } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MediaGrabber = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `protocol` | *string* | :heavy_minus_sign: | N/A | +| `title` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/mediaprovider.md b/docs/sdk/models/operations/mediaprovider.md deleted file mode 100644 index 55301096..00000000 --- a/docs/sdk/models/operations/mediaprovider.md +++ /dev/null @@ -1,34 +0,0 @@ -# MediaProvider - -## Example Usage - -```typescript -import { MediaProvider } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: MediaProvider = { - feature: [ - { - type: "", - flavor: "global", - scrobbleKey: "/:/scrobble/new", - unscrobbleKey: "/:/unscrobble/new", - action: [ - { - id: "addToContinueWatching", - key: "/actions/addToContinueWatching", - }, - ], - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `identifier` | *string* | :heavy_minus_sign: | N/A | -| `title` | *string* | :heavy_minus_sign: | N/A | -| `types` | *string* | :heavy_minus_sign: | N/A | -| `protocols` | *string* | :heavy_minus_sign: | N/A | -| `feature` | [operations.Feature](../../../sdk/models/operations/feature.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/mediareviewsvisibility.md b/docs/sdk/models/operations/mediareviewsvisibility.md deleted file mode 100644 index 03144ea7..00000000 --- a/docs/sdk/models/operations/mediareviewsvisibility.md +++ /dev/null @@ -1,18 +0,0 @@ -# MediaReviewsVisibility - -Whether or not the account has media reviews visibility enabled - -## Example Usage - -```typescript -import { MediaReviewsVisibility } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: MediaReviewsVisibility = MediaReviewsVisibility.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/mediasettings.md b/docs/sdk/models/operations/mediasettings.md new file mode 100644 index 00000000..049b22c9 --- /dev/null +++ b/docs/sdk/models/operations/mediasettings.md @@ -0,0 +1,34 @@ +# MediaSettings + +## Example Usage + +```typescript +import { MediaSettings } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MediaSettings = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `advancedSubtitles` | [operations.AdvancedSubtitles](../../../sdk/models/operations/advancedsubtitles.md) | :heavy_minus_sign: | N/A | +| `audioBoost` | *number* | :heavy_minus_sign: | N/A | +| `audioChannelCount` | *number* | :heavy_minus_sign: | N/A | +| `autoAdjustQuality` | *boolean* | :heavy_minus_sign: | N/A | +| `autoAdjustSubtitle` | *boolean* | :heavy_minus_sign: | N/A | +| `directPlay` | *boolean* | :heavy_minus_sign: | N/A | +| `directStream` | *boolean* | :heavy_minus_sign: | N/A | +| `directStreamAudio` | *boolean* | :heavy_minus_sign: | N/A | +| `disableResolutionRotation` | *boolean* | :heavy_minus_sign: | N/A | +| `maxVideoBitrate` | *number* | :heavy_minus_sign: | N/A | +| `musicBitrate` | *number* | :heavy_minus_sign: | N/A | +| `peakBitrate` | *number* | :heavy_minus_sign: | N/A | +| `photoQuality` | *number* | :heavy_minus_sign: | N/A | +| `photoResolution` | *string* | :heavy_minus_sign: | N/A | +| `secondsPerSegment` | *number* | :heavy_minus_sign: | N/A | +| `subtitles` | [operations.GetPlaylistGeneratorSubtitles](../../../sdk/models/operations/getplaylistgeneratorsubtitles.md) | :heavy_minus_sign: | N/A | +| `subtitleSize` | *number* | :heavy_minus_sign: | N/A | +| `videoBitrate` | *number* | :heavy_minus_sign: | N/A | +| `videoQuality` | *number* | :heavy_minus_sign: | N/A | +| `videoResolution` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/mediasubscription.md b/docs/sdk/models/operations/mediasubscription.md new file mode 100644 index 00000000..8f1a36a7 --- /dev/null +++ b/docs/sdk/models/operations/mediasubscription.md @@ -0,0 +1,190 @@ +# MediaSubscription + +A media subscription contains a representation of metadata desired to be recorded + + +## Example Usage + +```typescript +import { MediaSubscription } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MediaSubscription = { + title: "This Episode", + mediaGrabOperation: [ + { + metadata: { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `title` | *string* | :heavy_minus_sign: | The title of this subscription type | This Episode | +| `type` | *number* | :heavy_minus_sign: | Metadata type number | | +| `airingsType` | *string* | :heavy_minus_sign: | N/A | | +| `createdAt` | *number* | :heavy_minus_sign: | N/A | | +| `directory` | Record | :heavy_minus_sign: | Media Matching Hints | | +| `durationTotal` | *number* | :heavy_minus_sign: | Only included if `includeStorage` is specified | | +| `key` | *string* | :heavy_minus_sign: | N/A | | +| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | | +| `locationPath` | *string* | :heavy_minus_sign: | N/A | | +| `mediaGrabOperation` | [shared.MediaGrabOperation](../../../sdk/models/shared/mediagraboperation.md)[] | :heavy_minus_sign: | N/A | | +| `playlist` | Record | :heavy_minus_sign: | Media Matching Hints | | +| `setting` | [shared.Setting](../../../sdk/models/shared/setting.md)[] | :heavy_minus_sign: | N/A | | +| `storageTotal` | *number* | :heavy_minus_sign: | Only included if `includeStorage` is specified | | +| `targetLibrarySectionID` | *number* | :heavy_minus_sign: | Where this subscription will record to | | +| `targetSectionLocationID` | *number* | :heavy_minus_sign: | The library section location id for where the item is to be recorded | | +| `video` | Record | :heavy_minus_sign: | Media Matching Hints | | +| `parameters` | *string* | :heavy_minus_sign: | Parameter string for creating this subscription | | +| `selected` | *boolean* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/mergeitemsglobals.md b/docs/sdk/models/operations/mergeitemsglobals.md new file mode 100644 index 00000000..6ddef48e --- /dev/null +++ b/docs/sdk/models/operations/mergeitemsglobals.md @@ -0,0 +1,35 @@ +# MergeItemsGlobals + +## Example Usage + +```typescript +import { MergeItemsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MergeItemsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/mergeitemsrequest.md b/docs/sdk/models/operations/mergeitemsrequest.md new file mode 100644 index 00000000..9eb3172f --- /dev/null +++ b/docs/sdk/models/operations/mergeitemsrequest.md @@ -0,0 +1,28 @@ +# MergeItemsRequest + +## Example Usage + +```typescript +import { MergeItemsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MergeItemsRequest = { + idsPathParameter: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `idsPathParameter` | *string* | :heavy_check_mark: | N/A | | +| `idsQueryParameter` | *string*[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/mergeitemsresponse.md b/docs/sdk/models/operations/mergeitemsresponse.md new file mode 100644 index 00000000..8a539113 --- /dev/null +++ b/docs/sdk/models/operations/mergeitemsresponse.md @@ -0,0 +1,20 @@ +# MergeItemsResponse + +## Example Usage + +```typescript +import { MergeItemsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MergeItemsResponse = { + contentType: "", + statusCode: 330785, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/meta.md b/docs/sdk/models/operations/meta.md deleted file mode 100644 index 3670fb92..00000000 --- a/docs/sdk/models/operations/meta.md +++ /dev/null @@ -1,68 +0,0 @@ -# Meta - -The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - - -## Example Usage - -```typescript -import { Meta } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Meta = { - type: [ - { - key: "/library/sections/2/all?type=2", - type: "filter", - subtype: "clip", - title: "TV Shows", - active: false, - filter: [ - { - filter: "genre", - filterType: "string", - key: "/library/sections/2/genre?type=2", - title: "Genre", - type: "filter", - advanced: true, - }, - ], - sort: [ - { - default: "asc", - active: false, - descKey: "titleSort:desc", - firstCharacterKey: "/library/sections/2/firstCharacter", - key: "titleSort", - title: "Title", - }, - ], - field: [ - { - key: "show.title", - title: "Show Title", - type: "string", - subType: "rating", - }, - ], - }, - ], - fieldType: [ - { - type: "tag", - operator: [ - { - key: "=", - title: "is", - }, - ], - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `type` | [operations.GetRecentlyAddedType](../../../sdk/models/operations/getrecentlyaddedtype.md)[] | :heavy_minus_sign: | N/A | -| `fieldType` | [operations.GetRecentlyAddedFieldType](../../../sdk/models/operations/getrecentlyaddedfieldtype.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/metadata.md b/docs/sdk/models/operations/metadata.md index 54e35c52..60fffd31 100644 --- a/docs/sdk/models/operations/metadata.md +++ b/docs/sdk/models/operations/metadata.md @@ -1,49 +1,239 @@ # Metadata +Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + +Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + +Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + + ## Example Usage ```typescript import { Metadata } from "@lukehagar/plexjs/sdk/models/operations"; -let value: Metadata = {}; +let value: Metadata = { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], +}; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `art` | *string* | :heavy_minus_sign: | N/A | -| `guid` | *string* | :heavy_minus_sign: | N/A | -| `key` | *string* | :heavy_minus_sign: | N/A | -| `ratingKey` | *string* | :heavy_minus_sign: | N/A | -| `studio` | *string* | :heavy_minus_sign: | N/A | -| `tagline` | *string* | :heavy_minus_sign: | N/A | -| `type` | *string* | :heavy_minus_sign: | N/A | -| `thumb` | *string* | :heavy_minus_sign: | N/A | -| `addedAt` | *number* | :heavy_minus_sign: | N/A | -| `duration` | *number* | :heavy_minus_sign: | N/A | -| `publicPagesURL` | *string* | :heavy_minus_sign: | N/A | -| `slug` | *string* | :heavy_minus_sign: | N/A | -| `userState` | *boolean* | :heavy_minus_sign: | N/A | -| `title` | *string* | :heavy_minus_sign: | N/A | -| `contentRating` | *string* | :heavy_minus_sign: | N/A | -| `originallyAvailableAt` | [RFCDate](../../../types/rfcdate.md) | :heavy_minus_sign: | N/A | -| `year` | *number* | :heavy_minus_sign: | N/A | -| `image` | [operations.Image](../../../sdk/models/operations/image.md)[] | :heavy_minus_sign: | N/A | -| `banner` | *string* | :heavy_minus_sign: | N/A | -| `rating` | *number* | :heavy_minus_sign: | N/A | -| `expiresAt` | *number* | :heavy_minus_sign: | N/A | -| `originalTitle` | *string* | :heavy_minus_sign: | N/A | -| `audienceRating` | *number* | :heavy_minus_sign: | N/A | -| `audienceRatingImage` | *string* | :heavy_minus_sign: | N/A | -| `ratingImage` | *string* | :heavy_minus_sign: | N/A | -| `imdbRatingCount` | *number* | :heavy_minus_sign: | N/A | -| `subtype` | *string* | :heavy_minus_sign: | N/A | -| `theme` | *string* | :heavy_minus_sign: | N/A | -| `leafCount` | *number* | :heavy_minus_sign: | N/A | -| `childCount` | *number* | :heavy_minus_sign: | N/A | -| `isContinuingSeries` | *boolean* | :heavy_minus_sign: | N/A | -| `skipChildren` | *boolean* | :heavy_minus_sign: | N/A | -| `availabilityId` | *string* | :heavy_minus_sign: | N/A | -| `streamingMediaId` | *string* | :heavy_minus_sign: | N/A | -| `playableKey` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `title` | *any* | :heavy_minus_sign: | The title of the item (e.g. “300” or “The Simpsons”) | +| `type` | *any* | :heavy_minus_sign: | The type of the video item, such as `movie`, `episode`, or `clip`. | +| `absoluteIndex` | *number* | :heavy_minus_sign: | When present, contains the disc number for a track on multi-disc albums. | +| `addedAt` | *number* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was added to the library. | +| `art` | *any* | :heavy_minus_sign: | When present, the URL for the background artwork for the item. | +| `audienceRating` | *number* | :heavy_minus_sign: | Some rating systems separate reviewer ratings from audience ratings | +| `audienceRatingImage` | *any* | :heavy_minus_sign: | A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). | +| `autotag` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `banner` | *any* | :heavy_minus_sign: | When present, the URL for a banner graphic for the item. | +| `chapterSource` | *any* | :heavy_minus_sign: | When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). | +| `composite` | *any* | :heavy_minus_sign: | When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). | +| `contentRating` | *any* | :heavy_minus_sign: | If known, the content rating (e.g. MPAA) for an item. | +| `country` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `director` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `duration` | *number* | :heavy_minus_sign: | When present, the duration for the item, in units of milliseconds. | +| `filter` | [shared.Filter](../../../sdk/models/shared/filter.md)[] | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `genre` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `grandparentArt` | *string* | :heavy_minus_sign: | The `art` of the grandparent | +| `grandparentHero` | *string* | :heavy_minus_sign: | The `hero` of the grandparent | +| `grandparentKey` | *string* | :heavy_minus_sign: | The `key` of the grandparent | +| `grandparentRatingKey` | *string* | :heavy_minus_sign: | The `ratingKey` of the grandparent | +| `grandparentTheme` | *string* | :heavy_minus_sign: | The `theme` of the grandparent | +| `grandparentThumb` | *string* | :heavy_minus_sign: | The `thumb` of the grandparent | +| `grandparentTitle` | *string* | :heavy_minus_sign: | The `title` of the grandparent | +| `guid` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `hero` | *any* | :heavy_minus_sign: | When present, the URL for a hero image for the item. | +| `image` | [shared.Image](../../../sdk/models/shared/image.md)[] | :heavy_minus_sign: | N/A | +| `index` | *number* | :heavy_minus_sign: | When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. | +| `key` | *any* | :heavy_minus_sign: | The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. | +| `lastViewedAt` | *number* | :heavy_minus_sign: | When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. | +| `leafCount` | *number* | :heavy_minus_sign: | For shows and seasons, contains the number of total episodes. | +| `media` | [shared.Media](../../../sdk/models/shared/media.md)[] | :heavy_minus_sign: | N/A | +| `originallyAvailableAt` | *any* | :heavy_minus_sign: | When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. | +| `originalTitle` | *any* | :heavy_minus_sign: | When present, used to indicate an item's original title, e.g. a movie's foreign title. | +| `parentHero` | *string* | :heavy_minus_sign: | The `hero` of the parent | +| `parentIndex` | *number* | :heavy_minus_sign: | The `index` of the parent | +| `parentKey` | *string* | :heavy_minus_sign: | The `key` of the parent | +| `parentRatingKey` | *string* | :heavy_minus_sign: | The `ratingKey` of the parent | +| `parentThumb` | *string* | :heavy_minus_sign: | The `thumb` of the parent | +| `parentTitle` | *string* | :heavy_minus_sign: | The `title` of the parent | +| `primaryExtraKey` | *any* | :heavy_minus_sign: | Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. | +| `prompt` | *string* | :heavy_minus_sign: | Prompt to give the user for this directory (such as `Search Movies`) | +| `rating` | *number* | :heavy_minus_sign: | When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. | +| `ratingArray` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `ratingCount` | *number* | :heavy_minus_sign: | Number of ratings under this metadata | +| `ratingImage` | *any* | :heavy_minus_sign: | When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. | +| `ratingKey` | *any* | :heavy_minus_sign: | This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. | +| `role` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `search` | *boolean* | :heavy_minus_sign: | Indicates this is a search directory | +| `secondary` | *boolean* | :heavy_minus_sign: | Used by old clients to provide nested menus allowing for primative (but structured) navigation. | +| `skipChildren` | *boolean* | :heavy_minus_sign: | When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. | +| `skipParent` | *boolean* | :heavy_minus_sign: | When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). | +| `sort` | [shared.Sort](../../../sdk/models/shared/sort.md)[] | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `studio` | *any* | :heavy_minus_sign: | When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). | +| `subtype` | *any* | :heavy_minus_sign: | The subtype of the video item, such as `photo` when the video item is in a photo library | +| `summary` | *any* | :heavy_minus_sign: | When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). | +| `tagline` | *any* | :heavy_minus_sign: | When present, a pithy one-liner about the item (usually only seen for movies). | +| `theme` | *any* | :heavy_minus_sign: | When present, the URL for theme music for the item (usually only for TV shows). | +| `thumb` | *any* | :heavy_minus_sign: | When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. | +| `titleSort` | *any* | :heavy_minus_sign: | Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). | +| `updatedAt` | *number* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). | +| `userRating` | *number* | :heavy_minus_sign: | When the user has rated an item, this contains the user rating | +| `viewCount` | *number* | :heavy_minus_sign: | When a users has completed watched or listened to an item, this attribute contains the number of consumptions. | +| `viewedLeafCount` | *number* | :heavy_minus_sign: | For shows and seasons, contains the number of viewed episodes. | +| `viewOffset` | *number* | :heavy_minus_sign: | When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. | +| `writer` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `year` | *number* | :heavy_minus_sign: | When present, the year associated with the item's release (e.g. release year for a movie). | +| `processingState` | [operations.ProcessingState](../../../sdk/models/operations/processingstate.md) | :heavy_minus_sign: | The state of processing if this generator is part of an optimizer playlist | +| `processingStateContext` | [operations.ProcessingStateContext](../../../sdk/models/operations/processingstatecontext.md) | :heavy_minus_sign: | The error which could have occurred (or `good`) | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/minsize.md b/docs/sdk/models/operations/minsize.md deleted file mode 100644 index 64e2a566..00000000 --- a/docs/sdk/models/operations/minsize.md +++ /dev/null @@ -1,18 +0,0 @@ -# MinSize - -images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. - -## Example Usage - -```typescript -import { MinSize } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: MinSize = MinSize.One; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/modifydeviceglobals.md b/docs/sdk/models/operations/modifydeviceglobals.md new file mode 100644 index 00000000..9d76b20b --- /dev/null +++ b/docs/sdk/models/operations/modifydeviceglobals.md @@ -0,0 +1,35 @@ +# ModifyDeviceGlobals + +## Example Usage + +```typescript +import { ModifyDeviceGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ModifyDeviceGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/modifydevicemediacontainer.md b/docs/sdk/models/operations/modifydevicemediacontainer.md new file mode 100644 index 00000000..d701c153 --- /dev/null +++ b/docs/sdk/models/operations/modifydevicemediacontainer.md @@ -0,0 +1,25 @@ +# ModifyDeviceMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { ModifyDeviceMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ModifyDeviceMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `message` | *string* | :heavy_minus_sign: | N/A | +| `status` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/modifydevicerequest.md b/docs/sdk/models/operations/modifydevicerequest.md new file mode 100644 index 00000000..2ed9076b --- /dev/null +++ b/docs/sdk/models/operations/modifydevicerequest.md @@ -0,0 +1,30 @@ +# ModifyDeviceRequest + +## Example Usage + +```typescript +import { ModifyDeviceRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: ModifyDeviceRequest = { + deviceId: 809966, + enabled: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `deviceId` | *number* | :heavy_check_mark: | The ID of the device. | | +| `enabled` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Whether to enable the device | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/modifydeviceresponse.md b/docs/sdk/models/operations/modifydeviceresponse.md new file mode 100644 index 00000000..2c55b9ca --- /dev/null +++ b/docs/sdk/models/operations/modifydeviceresponse.md @@ -0,0 +1,31 @@ +# ModifyDeviceResponse + +## Example Usage + +```typescript +import { ModifyDeviceResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ModifyDeviceResponse = { + contentType: "", + statusCode: 295865, + headers: { + "key": [ + "", + ], + "key1": [ + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.ModifyDeviceResponseBody](../../../sdk/models/operations/modifydeviceresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/modifydeviceresponsebody.md b/docs/sdk/models/operations/modifydeviceresponsebody.md new file mode 100644 index 00000000..1f03d232 --- /dev/null +++ b/docs/sdk/models/operations/modifydeviceresponsebody.md @@ -0,0 +1,17 @@ +# ModifyDeviceResponseBody + +OK + +## Example Usage + +```typescript +import { ModifyDeviceResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ModifyDeviceResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.ModifyDeviceMediaContainer](../../../sdk/models/operations/modifydevicemediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/modifyplaylistgeneratorglobals.md b/docs/sdk/models/operations/modifyplaylistgeneratorglobals.md new file mode 100644 index 00000000..bd29e305 --- /dev/null +++ b/docs/sdk/models/operations/modifyplaylistgeneratorglobals.md @@ -0,0 +1,35 @@ +# ModifyPlaylistGeneratorGlobals + +## Example Usage + +```typescript +import { ModifyPlaylistGeneratorGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ModifyPlaylistGeneratorGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/modifyplaylistgeneratoritem.md b/docs/sdk/models/operations/modifyplaylistgeneratoritem.md new file mode 100644 index 00000000..4c95baf9 --- /dev/null +++ b/docs/sdk/models/operations/modifyplaylistgeneratoritem.md @@ -0,0 +1,42 @@ +# ModifyPlaylistGeneratorItem + +Note: OpenAPI cannot properly render this query parameter example ([See GHI](https://github.com/OAI/OpenAPI-Specification/issues/1706)). It should be rendered as: + +Item[type]=42&Item[title]=Jack-Jack Attack&Item[target]=&Item[targetTagID]=1&Item[locationID]=-1&Item[Location][uri]=library://82503060-0d68-4603-b594-8b071d54819e/item//library/metadata/146&Item[Policy][scope]=all&Item[Policy][value]=&Item[Policy][unwatched]=0 + + +## Example Usage + +```typescript +import { ModifyPlaylistGeneratorItem, ModifyPlaylistGeneratorScope } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: ModifyPlaylistGeneratorItem = { + location: { + uri: + "library://82503060-0d68-4603-b594-8b071d54819e/item/%2Flibrary%2Fmetadata%2F146", + }, + locationID: -1, + policy: { + value: NaN, + scope: ModifyPlaylistGeneratorScope.All, + unwatched: BoolInt.Zero, + }, + target: "", + targetTagID: 1, + title: "Jack-Jack Attack", + type: 42, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `location` | [operations.ModifyPlaylistGeneratorLocation](../../../sdk/models/operations/modifyplaylistgeneratorlocation.md) | :heavy_minus_sign: | N/A | +| `locationID` | *number* | :heavy_minus_sign: | N/A | +| `policy` | [operations.ModifyPlaylistGeneratorPolicy](../../../sdk/models/operations/modifyplaylistgeneratorpolicy.md) | :heavy_minus_sign: | N/A | +| `target` | *string* | :heavy_minus_sign: | N/A | +| `targetTagID` | *number* | :heavy_minus_sign: | N/A | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `type` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/modifyplaylistgeneratorlocation.md b/docs/sdk/models/operations/modifyplaylistgeneratorlocation.md new file mode 100644 index 00000000..6982db32 --- /dev/null +++ b/docs/sdk/models/operations/modifyplaylistgeneratorlocation.md @@ -0,0 +1,15 @@ +# ModifyPlaylistGeneratorLocation + +## Example Usage + +```typescript +import { ModifyPlaylistGeneratorLocation } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ModifyPlaylistGeneratorLocation = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `uri` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/modifyplaylistgeneratorpolicy.md b/docs/sdk/models/operations/modifyplaylistgeneratorpolicy.md new file mode 100644 index 00000000..8ea8a507 --- /dev/null +++ b/docs/sdk/models/operations/modifyplaylistgeneratorpolicy.md @@ -0,0 +1,20 @@ +# ModifyPlaylistGeneratorPolicy + +## Example Usage + +```typescript +import { ModifyPlaylistGeneratorPolicy } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: ModifyPlaylistGeneratorPolicy = { + unwatched: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `value` | *number* | :heavy_minus_sign: | N/A | | +| `scope` | [operations.ModifyPlaylistGeneratorScope](../../../sdk/models/operations/modifyplaylistgeneratorscope.md) | :heavy_minus_sign: | N/A | | +| `unwatched` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/modifyplaylistgeneratorrequest.md b/docs/sdk/models/operations/modifyplaylistgeneratorrequest.md new file mode 100644 index 00000000..c407bf28 --- /dev/null +++ b/docs/sdk/models/operations/modifyplaylistgeneratorrequest.md @@ -0,0 +1,47 @@ +# ModifyPlaylistGeneratorRequest + +## Example Usage + +```typescript +import { ModifyPlaylistGeneratorRequest, ModifyPlaylistGeneratorScope } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: ModifyPlaylistGeneratorRequest = { + playlistId: 314072, + generatorId: 848744, + item: { + location: { + uri: + "library://82503060-0d68-4603-b594-8b071d54819e/item/%2Flibrary%2Fmetadata%2F146", + }, + locationID: -1, + policy: { + value: NaN, + scope: ModifyPlaylistGeneratorScope.All, + unwatched: BoolInt.Zero, + }, + target: "", + targetTagID: 1, + title: "Jack-Jack Attack", + type: 42, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *number* | :heavy_check_mark: | The ID of the playlist | | +| `generatorId` | *number* | :heavy_check_mark: | The generator item ID to modify. | | +| `item` | [operations.ModifyPlaylistGeneratorItem](../../../sdk/models/operations/modifyplaylistgeneratoritem.md) | :heavy_minus_sign: | Note: OpenAPI cannot properly render this query parameter example ([See GHI](https://github.com/OAI/OpenAPI-Specification/issues/1706)). It should be rendered as:

Item[type]=42&Item[title]=Jack-Jack Attack&Item[target]=&Item[targetTagID]=1&Item[locationID]=-1&Item[Location][uri]=library://82503060-0d68-4603-b594-8b071d54819e/item//library/metadata/146&Item[Policy][scope]=all&Item[Policy][value]=&Item[Policy][unwatched]=0
| {
"Location": {
"uri": "library://82503060-0d68-4603-b594-8b071d54819e/item/%2Flibrary%2Fmetadata%2F146"
},
"locationID": -1,
"Policy": {
"value": "",
"scope": "all",
"unwatched": 0
},
"target": "",
"targetTagID": 1,
"title": "Jack-Jack Attack",
"type": 42
} | \ No newline at end of file diff --git a/docs/sdk/models/operations/modifyplaylistgeneratorresponse.md b/docs/sdk/models/operations/modifyplaylistgeneratorresponse.md new file mode 100644 index 00000000..8ba33920 --- /dev/null +++ b/docs/sdk/models/operations/modifyplaylistgeneratorresponse.md @@ -0,0 +1,21 @@ +# ModifyPlaylistGeneratorResponse + +## Example Usage + +```typescript +import { ModifyPlaylistGeneratorResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ModifyPlaylistGeneratorResponse = { + contentType: "", + statusCode: 629713, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithPlaylistMetadata` | [shared.MediaContainerWithPlaylistMetadata](../../../sdk/models/shared/mediacontainerwithplaylistmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/modifyplaylistgeneratorscope.md b/docs/sdk/models/operations/modifyplaylistgeneratorscope.md new file mode 100644 index 00000000..9b84537a --- /dev/null +++ b/docs/sdk/models/operations/modifyplaylistgeneratorscope.md @@ -0,0 +1,16 @@ +# ModifyPlaylistGeneratorScope + +## Example Usage + +```typescript +import { ModifyPlaylistGeneratorScope } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ModifyPlaylistGeneratorScope = ModifyPlaylistGeneratorScope.All; +``` + +## Values + +| Name | Value | +| ------- | ------- | +| `All` | all | +| `Count` | count | \ No newline at end of file diff --git a/docs/sdk/models/operations/movecollectionitemglobals.md b/docs/sdk/models/operations/movecollectionitemglobals.md new file mode 100644 index 00000000..4fe2ac12 --- /dev/null +++ b/docs/sdk/models/operations/movecollectionitemglobals.md @@ -0,0 +1,35 @@ +# MoveCollectionItemGlobals + +## Example Usage + +```typescript +import { MoveCollectionItemGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MoveCollectionItemGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/movecollectionitemrequest.md b/docs/sdk/models/operations/movecollectionitemrequest.md new file mode 100644 index 00000000..aa5b0178 --- /dev/null +++ b/docs/sdk/models/operations/movecollectionitemrequest.md @@ -0,0 +1,30 @@ +# MoveCollectionItemRequest + +## Example Usage + +```typescript +import { MoveCollectionItemRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MoveCollectionItemRequest = { + collectionId: 681558, + itemId: 443943, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `collectionId` | *number* | :heavy_check_mark: | The collection id | | +| `itemId` | *number* | :heavy_check_mark: | The item to move | | +| `after` | *number* | :heavy_minus_sign: | The item to move this item after. If not provided, this item will be moved to the beginning | | \ No newline at end of file diff --git a/docs/sdk/models/operations/movecollectionitemresponse.md b/docs/sdk/models/operations/movecollectionitemresponse.md new file mode 100644 index 00000000..f187e6e5 --- /dev/null +++ b/docs/sdk/models/operations/movecollectionitemresponse.md @@ -0,0 +1,21 @@ +# MoveCollectionItemResponse + +## Example Usage + +```typescript +import { MoveCollectionItemResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MoveCollectionItemResponse = { + contentType: "", + statusCode: 375726, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/movehubglobals.md b/docs/sdk/models/operations/movehubglobals.md new file mode 100644 index 00000000..ea9791a0 --- /dev/null +++ b/docs/sdk/models/operations/movehubglobals.md @@ -0,0 +1,35 @@ +# MoveHubGlobals + +## Example Usage + +```typescript +import { MoveHubGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MoveHubGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/movehubrequest.md b/docs/sdk/models/operations/movehubrequest.md new file mode 100644 index 00000000..6e4d13a8 --- /dev/null +++ b/docs/sdk/models/operations/movehubrequest.md @@ -0,0 +1,30 @@ +# MoveHubRequest + +## Example Usage + +```typescript +import { MoveHubRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MoveHubRequest = { + sectionId: 417654, + identifier: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | The section ID for the hubs to reorder | | +| `identifier` | *string* | :heavy_check_mark: | The identifier of the hub to move | | +| `after` | *string* | :heavy_minus_sign: | The identifier of the hub to order this hub after (or empty/missing to put this hub first) | | \ No newline at end of file diff --git a/docs/sdk/models/operations/movehubresponse.md b/docs/sdk/models/operations/movehubresponse.md new file mode 100644 index 00000000..e8d1e567 --- /dev/null +++ b/docs/sdk/models/operations/movehubresponse.md @@ -0,0 +1,23 @@ +# MoveHubResponse + +## Example Usage + +```typescript +import { MoveHubResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MoveHubResponse = { + contentType: "", + statusCode: 884768, + headers: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `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 | +| `getResponses200` | [shared.GetResponses200](../../../sdk/models/shared/getresponses200.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/moveplaylistitemglobals.md b/docs/sdk/models/operations/moveplaylistitemglobals.md new file mode 100644 index 00000000..5eab1bdf --- /dev/null +++ b/docs/sdk/models/operations/moveplaylistitemglobals.md @@ -0,0 +1,35 @@ +# MovePlaylistItemGlobals + +## Example Usage + +```typescript +import { MovePlaylistItemGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MovePlaylistItemGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/moveplaylistitemrequest.md b/docs/sdk/models/operations/moveplaylistitemrequest.md new file mode 100644 index 00000000..202fde28 --- /dev/null +++ b/docs/sdk/models/operations/moveplaylistitemrequest.md @@ -0,0 +1,30 @@ +# MovePlaylistItemRequest + +## Example Usage + +```typescript +import { MovePlaylistItemRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MovePlaylistItemRequest = { + playlistId: 132421, + playlistItemId: 728817, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *number* | :heavy_check_mark: | The ID of the playlist | | +| `playlistItemId` | *number* | :heavy_check_mark: | The playlist item ID to move. | | +| `after` | *number* | :heavy_minus_sign: | The playlist item ID to insert the new item after. If not provided, item is moved to beginning of playlist | | \ No newline at end of file diff --git a/docs/sdk/models/operations/moveplaylistitemresponse.md b/docs/sdk/models/operations/moveplaylistitemresponse.md new file mode 100644 index 00000000..dfcd8632 --- /dev/null +++ b/docs/sdk/models/operations/moveplaylistitemresponse.md @@ -0,0 +1,21 @@ +# MovePlaylistItemResponse + +## Example Usage + +```typescript +import { MovePlaylistItemResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MovePlaylistItemResponse = { + contentType: "", + statusCode: 46880, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithPlaylistMetadata` | [shared.MediaContainerWithPlaylistMetadata](../../../sdk/models/shared/mediacontainerwithplaylistmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/moveplayqueueitemglobals.md b/docs/sdk/models/operations/moveplayqueueitemglobals.md new file mode 100644 index 00000000..32ce7ff3 --- /dev/null +++ b/docs/sdk/models/operations/moveplayqueueitemglobals.md @@ -0,0 +1,35 @@ +# MovePlayQueueItemGlobals + +## Example Usage + +```typescript +import { MovePlayQueueItemGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MovePlayQueueItemGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/moveplayqueueitemrequest.md b/docs/sdk/models/operations/moveplayqueueitemrequest.md new file mode 100644 index 00000000..39f5db2d --- /dev/null +++ b/docs/sdk/models/operations/moveplayqueueitemrequest.md @@ -0,0 +1,30 @@ +# MovePlayQueueItemRequest + +## Example Usage + +```typescript +import { MovePlayQueueItemRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MovePlayQueueItemRequest = { + playQueueId: 852964, + playQueueItemId: 956518, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playQueueId` | *number* | :heavy_check_mark: | The ID of the play queue. | | +| `playQueueItemId` | *number* | :heavy_check_mark: | The play queue item ID to delete. | | +| `after` | *number* | :heavy_minus_sign: | The play queue item ID to insert the new item after. If not present, moves to the beginning. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/moveplayqueueitemresponse.md b/docs/sdk/models/operations/moveplayqueueitemresponse.md new file mode 100644 index 00000000..2d23272a --- /dev/null +++ b/docs/sdk/models/operations/moveplayqueueitemresponse.md @@ -0,0 +1,21 @@ +# MovePlayQueueItemResponse + +## Example Usage + +```typescript +import { MovePlayQueueItemResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: MovePlayQueueItemResponse = { + contentType: "", + statusCode: 82636, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithPlaylistMetadata` | [shared.MediaContainerWithPlaylistMetadata](../../../sdk/models/shared/mediacontainerwithplaylistmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/myplex.md b/docs/sdk/models/operations/myplex.md deleted file mode 100644 index 7c37bfc6..00000000 --- a/docs/sdk/models/operations/myplex.md +++ /dev/null @@ -1,38 +0,0 @@ -# MyPlex - -## Example Usage - -```typescript -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", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `authToken` | *string* | :heavy_minus_sign: | N/A | Z5v-PrNASDFpsaCi3CPK7 | -| `username` | *string* | :heavy_minus_sign: | N/A | example.email@mail.com | -| `mappingState` | *string* | :heavy_minus_sign: | N/A | mapped | -| `mappingError` | *string* | :heavy_minus_sign: | N/A | | -| `signInState` | *string* | :heavy_minus_sign: | N/A | ok | -| `publicAddress` | *string* | :heavy_minus_sign: | N/A | 140.20.68.140 | -| `publicPort` | *number* | :heavy_minus_sign: | N/A | 32400 | -| `privateAddress` | *string* | :heavy_minus_sign: | N/A | 10.10.10.47 | -| `privatePort` | *number* | :heavy_minus_sign: | N/A | 32400 | -| `subscriptionFeatures` | *string* | :heavy_minus_sign: | N/A | 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 | -| `subscriptionActive` | *boolean* | :heavy_minus_sign: | N/A | | -| `subscriptionState` | *string* | :heavy_minus_sign: | N/A | Active | \ No newline at end of file diff --git a/docs/sdk/models/operations/one.md b/docs/sdk/models/operations/one.md deleted file mode 100644 index 8b1d1ec4..00000000 --- a/docs/sdk/models/operations/one.md +++ /dev/null @@ -1,16 +0,0 @@ -# One - -## Example Usage - -```typescript -import { One } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: One = One.Zero; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/onlytransient.md b/docs/sdk/models/operations/onlytransient.md deleted file mode 100644 index 9a63275e..00000000 --- a/docs/sdk/models/operations/onlytransient.md +++ /dev/null @@ -1,18 +0,0 @@ -# OnlyTransient - -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). - -## Example Usage - -```typescript -import { OnlyTransient } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: OnlyTransient = OnlyTransient.Zero; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/operator.md b/docs/sdk/models/operations/operator.md deleted file mode 100644 index a354bc7c..00000000 --- a/docs/sdk/models/operations/operator.md +++ /dev/null @@ -1,19 +0,0 @@ -# Operator - -## Example Usage - -```typescript -import { Operator } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Operator = { - key: "=", - title: "is", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `key` | *string* | :heavy_check_mark: | N/A | = | -| `title` | *string* | :heavy_check_mark: | N/A | is | \ No newline at end of file diff --git a/docs/sdk/models/operations/optimizedatabaseglobals.md b/docs/sdk/models/operations/optimizedatabaseglobals.md new file mode 100644 index 00000000..b27077fd --- /dev/null +++ b/docs/sdk/models/operations/optimizedatabaseglobals.md @@ -0,0 +1,35 @@ +# OptimizeDatabaseGlobals + +## Example Usage + +```typescript +import { OptimizeDatabaseGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: OptimizeDatabaseGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/optimizedatabaserequest.md b/docs/sdk/models/operations/optimizedatabaserequest.md new file mode 100644 index 00000000..38050594 --- /dev/null +++ b/docs/sdk/models/operations/optimizedatabaserequest.md @@ -0,0 +1,28 @@ +# OptimizeDatabaseRequest + +## Example Usage + +```typescript +import { OptimizeDatabaseRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: OptimizeDatabaseRequest = { + async: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `async` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | If set, don't wait for completion but return an activity | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/optimizedatabaseresponse.md b/docs/sdk/models/operations/optimizedatabaseresponse.md new file mode 100644 index 00000000..1c8d9ac1 --- /dev/null +++ b/docs/sdk/models/operations/optimizedatabaseresponse.md @@ -0,0 +1,20 @@ +# OptimizeDatabaseResponse + +## Example Usage + +```typescript +import { OptimizeDatabaseResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: OptimizeDatabaseResponse = { + contentType: "", + statusCode: 79993, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/optimizedforstreaming.md b/docs/sdk/models/operations/optimizedforstreaming.md deleted file mode 100644 index 937192ec..00000000 --- a/docs/sdk/models/operations/optimizedforstreaming.md +++ /dev/null @@ -1,19 +0,0 @@ -# OptimizedForStreaming - -Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - - -## Supported Types - -### `operations.One` - -```typescript -const value: operations.One = One.One; -``` - -### `boolean` - -```typescript -const value: boolean = true; -``` - diff --git a/docs/sdk/models/operations/optimizedforstreaming1.md b/docs/sdk/models/operations/optimizedforstreaming1.md deleted file mode 100644 index 02900e40..00000000 --- a/docs/sdk/models/operations/optimizedforstreaming1.md +++ /dev/null @@ -1,16 +0,0 @@ -# OptimizedForStreaming1 - -## Example Usage - -```typescript -import { OptimizedForStreaming1 } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: OptimizedForStreaming1 = OptimizedForStreaming1.Zero; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/owned.md b/docs/sdk/models/operations/owned.md deleted file mode 100644 index 752c1432..00000000 --- a/docs/sdk/models/operations/owned.md +++ /dev/null @@ -1,18 +0,0 @@ -# Owned - -Indicates if the user owns the server. - -## Example Usage - -```typescript -import { Owned } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Owned = Owned.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/params.md b/docs/sdk/models/operations/params.md new file mode 100644 index 00000000..9e07dede --- /dev/null +++ b/docs/sdk/models/operations/params.md @@ -0,0 +1,19 @@ +# Params + +Subscription parameters. + - `mediaProviderID`: Required for downloads to indicate which MP the subscription will download into + - `source`: Required for downloads to indicate the source of the downloaded content. + + +## Example Usage + +```typescript +import { Params } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: Params = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdk/models/operations/part.md b/docs/sdk/models/operations/part.md deleted file mode 100644 index 801ff212..00000000 --- a/docs/sdk/models/operations/part.md +++ /dev/null @@ -1,99 +0,0 @@ -# Part - -## Example Usage - -```typescript -import { HasThumbnail, Part } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Part = { - accessible: true, - exists: true, - id: 418385, - key: "/library/parts/418385/1735864239/file.mkv", - indexes: "sd", - duration: 9610350, - file: "/mnt/Movies_1/W/Wicked (2024).mkv", - size: 30649952104, - packetLength: 188, - container: "mkv", - videoProfile: "main 10", - audioProfile: "dts", - has64bitOffsets: false, - hasThumbnail: HasThumbnail.True, - stream: [ - { - id: 1002625, - format: "srt", - default: true, - codec: "hevc", - index: 0, - bitrate: 24743, - language: "English", - languageTag: "en", - languageCode: "eng", - headerCompression: true, - doviblCompatID: 1, - doviblPresent: true, - dovielPresent: false, - doviLevel: 6, - doviPresent: true, - doviProfile: 8, - dovirpuPresent: true, - doviVersion: "1.0", - bitDepth: 10, - chromaLocation: "topleft", - chromaSubsampling: "4:2:0", - codedHeight: 1608, - codedWidth: 3840, - closedCaptions: true, - colorPrimaries: "bt2020", - colorRange: "tv", - colorSpace: "bt2020nc", - colorTrc: "smpte2084", - frameRate: 23.976, - key: "/library/streams/216389", - height: 1602, - level: 150, - original: true, - hasScalingMatrix: false, - profile: "main 10", - scanType: "progressive", - embeddedInVideo: "progressive", - refFrames: 1, - width: 3840, - displayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - extendedDisplayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - selected: true, - forced: true, - channels: 6, - audioChannelLayout: "5.1(side)", - samplingRate: 48000, - canAutoSync: false, - hearingImpaired: true, - dub: true, - title: "SDH", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `accessible` | *boolean* | :heavy_minus_sign: | Indicates if the part is accessible. | true | -| `exists` | *boolean* | :heavy_minus_sign: | Indicates if the part exists. | true | -| `id` | *number* | :heavy_check_mark: | Unique part identifier. | 418385 | -| `key` | *string* | :heavy_check_mark: | Key to access this part. | /library/parts/418385/1735864239/file.mkv | -| `indexes` | *string* | :heavy_minus_sign: | N/A | sd | -| `duration` | *number* | :heavy_minus_sign: | Duration of the part in milliseconds. | 9610350 | -| `file` | *string* | :heavy_check_mark: | File path for the part. | /mnt/Movies_1/W/Wicked (2024).mkv | -| `size` | *number* | :heavy_check_mark: | File size in bytes. | 30649952104 | -| `packetLength` | *number* | :heavy_minus_sign: | N/A | 188 | -| `container` | *string* | :heavy_minus_sign: | Container format of the part. | mkv | -| `videoProfile` | *string* | :heavy_minus_sign: | Video profile for the part. | main 10 | -| `audioProfile` | *string* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | -| `optimizedForStreaming` | *operations.GetRecentlyAddedOptimizedForStreaming* | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | -| `hasThumbnail` | [operations.HasThumbnail](../../../sdk/models/operations/hasthumbnail.md) | :heavy_minus_sign: | N/A | 1 | -| `stream` | [operations.Stream](../../../sdk/models/operations/stream.md)[] | :heavy_minus_sign: | An array of streams for this part. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/pastsubscription.md b/docs/sdk/models/operations/pastsubscription.md deleted file mode 100644 index a6648cb1..00000000 --- a/docs/sdk/models/operations/pastsubscription.md +++ /dev/null @@ -1,41 +0,0 @@ -# PastSubscription - -## Example Usage - -```typescript -import { PastSubscription, PostUsersSignInDataState } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PastSubscription = { - id: "", - mode: "", - renewsAt: 1556281940, - endsAt: 1556281940, - type: "plexpass", - transfer: "", - state: PostUsersSignInDataState.Ended, - billing: { - internalPaymentMethod: {}, - paymentMethodId: 793427, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | N/A | | -| `mode` | *string* | :heavy_check_mark: | N/A | | -| `renewsAt` | *number* | :heavy_check_mark: | N/A | 1556281940 | -| `endsAt` | *number* | :heavy_check_mark: | N/A | 1556281940 | -| `canceled` | *boolean* | :heavy_minus_sign: | N/A | false | -| `gracePeriod` | *boolean* | :heavy_minus_sign: | N/A | false | -| `onHold` | *boolean* | :heavy_minus_sign: | N/A | false | -| `canReactivate` | *boolean* | :heavy_minus_sign: | N/A | false | -| `canUpgrade` | *boolean* | :heavy_minus_sign: | N/A | false | -| `canDowngrade` | *boolean* | :heavy_minus_sign: | N/A | false | -| `canConvert` | *boolean* | :heavy_minus_sign: | N/A | false | -| `type` | *string* | :heavy_check_mark: | N/A | plexpass | -| `transfer` | *string* | :heavy_check_mark: | N/A | | -| `state` | [operations.PostUsersSignInDataState](../../../sdk/models/operations/postuserssignindatastate.md) | :heavy_check_mark: | N/A | ended | -| `billing` | [operations.Billing](../../../sdk/models/operations/billing.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/pathparamtaskname.md b/docs/sdk/models/operations/pathparamtaskname.md deleted file mode 100644 index 975fbe3b..00000000 --- a/docs/sdk/models/operations/pathparamtaskname.md +++ /dev/null @@ -1,33 +0,0 @@ -# PathParamTaskName - -The name of the task to be started. - -## Example Usage - -```typescript -import { PathParamTaskName } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PathParamTaskName = PathParamTaskName.RefreshPeriodicMetadata; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| --------------------------- | --------------------------- | -| `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 | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/pending.md b/docs/sdk/models/operations/pending.md deleted file mode 100644 index df06536b..00000000 --- a/docs/sdk/models/operations/pending.md +++ /dev/null @@ -1,18 +0,0 @@ -# Pending - -Indicates if the server is pending approval. - -## Example Usage - -```typescript -import { Pending } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Pending = Pending.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/performsearchrequest.md b/docs/sdk/models/operations/performsearchrequest.md deleted file mode 100644 index 07836d5f..00000000 --- a/docs/sdk/models/operations/performsearchrequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# PerformSearchRequest - -## Example Usage - -```typescript -import { PerformSearchRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PerformSearchRequest = { - query: "arnold", - limit: 5, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `query` | *string* | :heavy_check_mark: | The query term | arnold | -| `sectionId` | *number* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs | | -| `limit` | *number* | :heavy_minus_sign: | The number of items to return per hub | 5 | \ No newline at end of file diff --git a/docs/sdk/models/operations/performsearchresponse.md b/docs/sdk/models/operations/performsearchresponse.md deleted file mode 100644 index 6c413190..00000000 --- a/docs/sdk/models/operations/performsearchresponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# PerformSearchResponse - -## Example Usage - -```typescript -import { PerformSearchResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PerformSearchResponse = { - contentType: "", - statusCode: 673019, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/performvoicesearchrequest.md b/docs/sdk/models/operations/performvoicesearchrequest.md deleted file mode 100644 index 84fbd8c5..00000000 --- a/docs/sdk/models/operations/performvoicesearchrequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# PerformVoiceSearchRequest - -## Example Usage - -```typescript -import { PerformVoiceSearchRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PerformVoiceSearchRequest = { - query: "dead+poop", - limit: 5, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `query` | *string* | :heavy_check_mark: | The query term | dead+poop | -| `sectionId` | *number* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs | | -| `limit` | *number* | :heavy_minus_sign: | The number of items to return per hub | 5 | \ No newline at end of file diff --git a/docs/sdk/models/operations/performvoicesearchresponse.md b/docs/sdk/models/operations/performvoicesearchresponse.md deleted file mode 100644 index 003940ee..00000000 --- a/docs/sdk/models/operations/performvoicesearchresponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# PerformVoiceSearchResponse - -## Example Usage - -```typescript -import { PerformVoiceSearchResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PerformVoiceSearchResponse = { - contentType: "", - statusCode: 944456, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/pivot.md b/docs/sdk/models/operations/pivot.md deleted file mode 100644 index 2a53ce75..00000000 --- a/docs/sdk/models/operations/pivot.md +++ /dev/null @@ -1,20 +0,0 @@ -# Pivot - -## Example Usage - -```typescript -import { Pivot } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Pivot = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `key` | *string* | :heavy_minus_sign: | N/A | -| `type` | *string* | :heavy_minus_sign: | N/A | -| `title` | *string* | :heavy_minus_sign: | N/A | -| `context` | *string* | :heavy_minus_sign: | N/A | -| `symbol` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/player.md b/docs/sdk/models/operations/player.md deleted file mode 100644 index 1272720e..00000000 --- a/docs/sdk/models/operations/player.md +++ /dev/null @@ -1,45 +0,0 @@ -# Player - -## Example Usage - -```typescript -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, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | -| `address` | *string* | :heavy_minus_sign: | N/A | 10.10.10.171 | -| `machineIdentifier` | *string* | :heavy_minus_sign: | N/A | 3tsdzir85m2onc3qyr255aq1 | -| `model` | *string* | :heavy_minus_sign: | N/A | standalone | -| `platform` | *string* | :heavy_minus_sign: | N/A | windows | -| `platformVersion` | *string* | :heavy_minus_sign: | N/A | 10.0.22621 | -| `product` | *string* | :heavy_minus_sign: | N/A | Plex for Windows | -| `profile` | *string* | :heavy_minus_sign: | N/A | Plex Desktop | -| `remotePublicAddress` | *string* | :heavy_minus_sign: | N/A | 68.248.140.20 | -| `state` | *string* | :heavy_minus_sign: | N/A | playing | -| `title` | *string* | :heavy_minus_sign: | N/A | DESKTOP-BL80MTD | -| `version` | *string* | :heavy_minus_sign: | N/A | 1.85.0.4071-21128b56 | -| `local` | *boolean* | :heavy_minus_sign: | N/A | true | -| `relayed` | *boolean* | :heavy_minus_sign: | N/A | false | -| `secure` | *boolean* | :heavy_minus_sign: | N/A | true | -| `userID` | *number* | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/playlisttype.md b/docs/sdk/models/operations/playlisttype.md index ad3e2862..8534d3d6 100644 --- a/docs/sdk/models/operations/playlisttype.md +++ b/docs/sdk/models/operations/playlisttype.md @@ -1,6 +1,6 @@ # PlaylistType -limit to a type of playlist. +Limit to a type of playlist ## Example Usage @@ -12,11 +12,8 @@ let value: PlaylistType = PlaylistType.Video; ## Values -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Audio` | audio | -| `Video` | video | -| `Photo` | photo | -| - | `Unrecognized` | \ No newline at end of file +| Name | Value | +| ------- | ------- | +| `Audio` | audio | +| `Video` | video | +| `Photo` | photo | \ No newline at end of file diff --git a/docs/sdk/models/operations/playqueuegenerator.md b/docs/sdk/models/operations/playqueuegenerator.md new file mode 100644 index 00000000..63466f3a --- /dev/null +++ b/docs/sdk/models/operations/playqueuegenerator.md @@ -0,0 +1,21 @@ +# PlayQueueGenerator + +## Example Usage + +```typescript +import { PlayQueueGenerator } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: PlayQueueGenerator = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `changedAt` | *number* | :heavy_minus_sign: | N/A | +| `createdAt` | *number* | :heavy_minus_sign: | N/A | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `playlistID` | *number* | :heavy_minus_sign: | N/A | +| `type` | [operations.GetPlaylistGeneratorsType](../../../sdk/models/operations/getplaylistgeneratorstype.md) | :heavy_minus_sign: | The type of playlist generator.

- -1: A smart playlist generator
- 42: A optimized version generator
| +| `updatedAt` | *number* | :heavy_minus_sign: | N/A | +| `uri` | *string* | :heavy_minus_sign: | The URI indicating the search for this generator | \ No newline at end of file diff --git a/docs/sdk/models/operations/plexdevice.md b/docs/sdk/models/operations/plexdevice.md deleted file mode 100644 index a789d288..00000000 --- a/docs/sdk/models/operations/plexdevice.md +++ /dev/null @@ -1,73 +0,0 @@ -# PlexDevice - -## Example Usage - -```typescript -import { PlexDevice, Protocol } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PlexDevice = { - name: "", - product: "Incredible Steel Chair", - productVersion: "", - platform: "", - platformVersion: "", - device: "Desktop", - clientIdentifier: "", - createdAt: new Date("2019-06-24T11:38:02Z"), - lastSeenAt: new Date("2019-06-24T11:38:02Z"), - provides: "", - ownerId: null, - sourceTitle: "", - publicAddress: "", - accessToken: "", - owned: false, - home: false, - synced: false, - relay: false, - presence: false, - httpsRequired: false, - publicAddressMatches: false, - dnsRebindingProtection: true, - natLoopbackSupported: true, - connections: [ - { - protocol: Protocol.Http, - address: "84577 W 9th Street", - port: 610910, - uri: "https://dearest-custom.net", - local: true, - relay: true, - iPv6: true, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | N/A | | -| `product` | *string* | :heavy_check_mark: | N/A | | -| `productVersion` | *string* | :heavy_check_mark: | N/A | | -| `platform` | *string* | :heavy_check_mark: | N/A | | -| `platformVersion` | *string* | :heavy_check_mark: | N/A | | -| `device` | *string* | :heavy_check_mark: | N/A | | -| `clientIdentifier` | *string* | :heavy_check_mark: | N/A | | -| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | N/A | 2019-06-24T11:38:02Z | -| `lastSeenAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | N/A | 2019-06-24T11:38:02Z | -| `provides` | *string* | :heavy_check_mark: | N/A | | -| `ownerId` | *number* | :heavy_check_mark: | ownerId is null when the device is owned by the token used to send the request | | -| `sourceTitle` | *string* | :heavy_check_mark: | N/A | | -| `publicAddress` | *string* | :heavy_check_mark: | N/A | | -| `accessToken` | *string* | :heavy_check_mark: | N/A | | -| `owned` | *boolean* | :heavy_check_mark: | N/A | | -| `home` | *boolean* | :heavy_check_mark: | N/A | | -| `synced` | *boolean* | :heavy_check_mark: | N/A | | -| `relay` | *boolean* | :heavy_check_mark: | N/A | | -| `presence` | *boolean* | :heavy_check_mark: | N/A | | -| `httpsRequired` | *boolean* | :heavy_check_mark: | N/A | | -| `publicAddressMatches` | *boolean* | :heavy_check_mark: | N/A | | -| `dnsRebindingProtection` | *boolean* | :heavy_check_mark: | N/A | | -| `natLoopbackSupported` | *boolean* | :heavy_check_mark: | N/A | | -| `connections` | [operations.Connections](../../../sdk/models/operations/connections.md)[] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/postmediaartsrequest.md b/docs/sdk/models/operations/postmediaartsrequest.md deleted file mode 100644 index 935bf701..00000000 --- a/docs/sdk/models/operations/postmediaartsrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# PostMediaArtsRequest - -## Example Usage - -```typescript -import { PostMediaArtsRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 | -| `url` | *string* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b | -| `requestBody` | *ReadableStream* | :heavy_minus_sign: | The contents of the image, if uploading a local file | | \ No newline at end of file diff --git a/docs/sdk/models/operations/postmediaartsresponse.md b/docs/sdk/models/operations/postmediaartsresponse.md deleted file mode 100644 index f85c3236..00000000 --- a/docs/sdk/models/operations/postmediaartsresponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# PostMediaArtsResponse - -## Example Usage - -```typescript -import { PostMediaArtsResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PostMediaArtsResponse = { - contentType: "", - statusCode: 230593, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/postmediaposterrequest.md b/docs/sdk/models/operations/postmediaposterrequest.md deleted file mode 100644 index e256f858..00000000 --- a/docs/sdk/models/operations/postmediaposterrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# PostMediaPosterRequest - -## Example Usage - -```typescript -import { PostMediaPosterRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 | -| `url` | *string* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b | -| `requestBody` | *ReadableStream* | :heavy_minus_sign: | The contents of the image, if uploading a local file | | \ No newline at end of file diff --git a/docs/sdk/models/operations/postmediaposterresponse.md b/docs/sdk/models/operations/postmediaposterresponse.md deleted file mode 100644 index cb3d101a..00000000 --- a/docs/sdk/models/operations/postmediaposterresponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# PostMediaPosterResponse - -## Example Usage - -```typescript -import { PostMediaPosterResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PostMediaPosterResponse = { - contentType: "", - statusCode: 227530, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/postuserssignindataauthenticationresponsestatus.md b/docs/sdk/models/operations/postuserssignindataauthenticationresponsestatus.md deleted file mode 100644 index e2953287..00000000 --- a/docs/sdk/models/operations/postuserssignindataauthenticationresponsestatus.md +++ /dev/null @@ -1,22 +0,0 @@ -# PostUsersSignInDataAuthenticationResponseStatus - -String representation of subscriptionActive - -## Example Usage - -```typescript -import { PostUsersSignInDataAuthenticationResponseStatus } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PostUsersSignInDataAuthenticationResponseStatus = - PostUsersSignInDataAuthenticationResponseStatus.Inactive; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Inactive` | Inactive | -| `Active` | Active | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/postuserssignindataauthenticationstatus.md b/docs/sdk/models/operations/postuserssignindataauthenticationstatus.md deleted file mode 100644 index 7575c3f0..00000000 --- a/docs/sdk/models/operations/postuserssignindataauthenticationstatus.md +++ /dev/null @@ -1,22 +0,0 @@ -# PostUsersSignInDataAuthenticationStatus - -String representation of subscriptionActive - -## Example Usage - -```typescript -import { PostUsersSignInDataAuthenticationStatus } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PostUsersSignInDataAuthenticationStatus = - PostUsersSignInDataAuthenticationStatus.Inactive; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Inactive` | Inactive | -| `Active` | Active | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/postuserssignindataauthenticationsubscription.md b/docs/sdk/models/operations/postuserssignindataauthenticationsubscription.md deleted file mode 100644 index 6148797b..00000000 --- a/docs/sdk/models/operations/postuserssignindataauthenticationsubscription.md +++ /dev/null @@ -1,27 +0,0 @@ -# PostUsersSignInDataAuthenticationSubscription - -## Example Usage - -```typescript -import { - PostUsersSignInDataAuthenticationResponseStatus, - PostUsersSignInDataAuthenticationSubscription, -} from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PostUsersSignInDataAuthenticationSubscription = { - active: true, - subscribedAt: "2021-04-12T18:21:12Z", - status: PostUsersSignInDataAuthenticationResponseStatus.Inactive, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -| `features` | *string*[] | :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.PostUsersSignInDataAuthenticationResponseStatus](../../../sdk/models/operations/postuserssignindataauthenticationresponsestatus.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/postuserssignindataautoselectsubtitle.md b/docs/sdk/models/operations/postuserssignindataautoselectsubtitle.md deleted file mode 100644 index d694d0cc..00000000 --- a/docs/sdk/models/operations/postuserssignindataautoselectsubtitle.md +++ /dev/null @@ -1,19 +0,0 @@ -# PostUsersSignInDataAutoSelectSubtitle - -The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) - -## Example Usage - -```typescript -import { PostUsersSignInDataAutoSelectSubtitle } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PostUsersSignInDataAutoSelectSubtitle = - PostUsersSignInDataAutoSelectSubtitle.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/postuserssignindatadefaultsubtitleaccessibility.md b/docs/sdk/models/operations/postuserssignindatadefaultsubtitleaccessibility.md deleted file mode 100644 index 4fea1fbe..00000000 --- a/docs/sdk/models/operations/postuserssignindatadefaultsubtitleaccessibility.md +++ /dev/null @@ -1,19 +0,0 @@ -# PostUsersSignInDataDefaultSubtitleAccessibility - -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 show non-SDH subtitles) - -## Example Usage - -```typescript -import { PostUsersSignInDataDefaultSubtitleAccessibility } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PostUsersSignInDataDefaultSubtitleAccessibility = - PostUsersSignInDataDefaultSubtitleAccessibility.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/postuserssignindatadefaultsubtitleforced.md b/docs/sdk/models/operations/postuserssignindatadefaultsubtitleforced.md deleted file mode 100644 index 790d4a95..00000000 --- a/docs/sdk/models/operations/postuserssignindatadefaultsubtitleforced.md +++ /dev/null @@ -1,19 +0,0 @@ -# PostUsersSignInDataDefaultSubtitleForced - -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) - -## Example Usage - -```typescript -import { PostUsersSignInDataDefaultSubtitleForced } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PostUsersSignInDataDefaultSubtitleForced = - PostUsersSignInDataDefaultSubtitleForced.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/postuserssignindatamailingliststatus.md b/docs/sdk/models/operations/postuserssignindatamailingliststatus.md deleted file mode 100644 index 6ca8c57f..00000000 --- a/docs/sdk/models/operations/postuserssignindatamailingliststatus.md +++ /dev/null @@ -1,22 +0,0 @@ -# PostUsersSignInDataMailingListStatus - -Your current mailing list status (active or unsubscribed) - -## Example Usage - -```typescript -import { PostUsersSignInDataMailingListStatus } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PostUsersSignInDataMailingListStatus = - PostUsersSignInDataMailingListStatus.Active; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Active` | active | -| `Unsubscribed` | unsubscribed | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/postuserssignindatamediareviewsvisibility.md b/docs/sdk/models/operations/postuserssignindatamediareviewsvisibility.md deleted file mode 100644 index 6a222670..00000000 --- a/docs/sdk/models/operations/postuserssignindatamediareviewsvisibility.md +++ /dev/null @@ -1,19 +0,0 @@ -# PostUsersSignInDataMediaReviewsVisibility - -Whether or not the account has media reviews visibility enabled - -## Example Usage - -```typescript -import { PostUsersSignInDataMediaReviewsVisibility } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PostUsersSignInDataMediaReviewsVisibility = - PostUsersSignInDataMediaReviewsVisibility.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/postuserssignindatarequest.md b/docs/sdk/models/operations/postuserssignindatarequest.md deleted file mode 100644 index 8108aeb9..00000000 --- a/docs/sdk/models/operations/postuserssignindatarequest.md +++ /dev/null @@ -1,26 +0,0 @@ -# PostUsersSignInDataRequest - -## Example Usage - -```typescript -import { PostUsersSignInDataRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PostUsersSignInDataRequest = { - clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", - clientName: "Plex for Roku", - deviceNickname: "Roku 3", - clientVersion: "2.4.1", - platform: "Roku", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `clientID` | *string* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | -| `clientName` | *string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku | -| `deviceNickname` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | -| `clientVersion` | *string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 | -| `platform` | *string* | :heavy_minus_sign: | The platform of the client application. | Roku | -| `requestBody` | [operations.PostUsersSignInDataRequestBody](../../../sdk/models/operations/postuserssignindatarequestbody.md) | :heavy_minus_sign: | Login credentials | | \ No newline at end of file diff --git a/docs/sdk/models/operations/postuserssignindatarequestbody.md b/docs/sdk/models/operations/postuserssignindatarequestbody.md deleted file mode 100644 index 2cdb434b..00000000 --- a/docs/sdk/models/operations/postuserssignindatarequestbody.md +++ /dev/null @@ -1,24 +0,0 @@ -# PostUsersSignInDataRequestBody - -Login credentials - -## Example Usage - -```typescript -import { PostUsersSignInDataRequestBody } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PostUsersSignInDataRequestBody = { - login: "username@email.com", - password: "password123", - verificationCode: "123456", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `login` | *string* | :heavy_check_mark: | N/A | username@email.com | -| `password` | *string* | :heavy_check_mark: | N/A | password123 | -| `rememberMe` | *boolean* | :heavy_minus_sign: | N/A | | -| `verificationCode` | *string* | :heavy_minus_sign: | N/A | 123456 | \ No newline at end of file diff --git a/docs/sdk/models/operations/postuserssignindataresponse.md b/docs/sdk/models/operations/postuserssignindataresponse.md deleted file mode 100644 index 07935ca9..00000000 --- a/docs/sdk/models/operations/postuserssignindataresponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# PostUsersSignInDataResponse - -## Example Usage - -```typescript -import { PostUsersSignInDataResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PostUsersSignInDataResponse = { - contentType: "", - statusCode: 43555, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `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.PostUsersSignInDataUserPlexAccount](../../../sdk/models/operations/postuserssignindatauserplexaccount.md) | :heavy_minus_sign: | Returns the user account data with a valid auth token | \ No newline at end of file diff --git a/docs/sdk/models/operations/postuserssignindataservices.md b/docs/sdk/models/operations/postuserssignindataservices.md deleted file mode 100644 index c5787945..00000000 --- a/docs/sdk/models/operations/postuserssignindataservices.md +++ /dev/null @@ -1,25 +0,0 @@ -# PostUsersSignInDataServices - -## Example Usage - -```typescript -import { PostUsersSignInDataServices, PostUsersSignInDataStatus } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PostUsersSignInDataServices = { - identifier: "metadata-dev", - endpoint: "https://epg.provider.plex.tv", - token: "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", - secret: null, - status: PostUsersSignInDataStatus.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.PostUsersSignInDataStatus](../../../sdk/models/operations/postuserssignindatastatus.md) | :heavy_check_mark: | N/A | online | \ No newline at end of file diff --git a/docs/sdk/models/operations/postuserssignindatastate.md b/docs/sdk/models/operations/postuserssignindatastate.md deleted file mode 100644 index 33aed12a..00000000 --- a/docs/sdk/models/operations/postuserssignindatastate.md +++ /dev/null @@ -1,18 +0,0 @@ -# PostUsersSignInDataState - -## Example Usage - -```typescript -import { PostUsersSignInDataState } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PostUsersSignInDataState = PostUsersSignInDataState.Ended; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Ended` | ended | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/postuserssignindatastatus.md b/docs/sdk/models/operations/postuserssignindatastatus.md deleted file mode 100644 index 7251b6e0..00000000 --- a/docs/sdk/models/operations/postuserssignindatastatus.md +++ /dev/null @@ -1,19 +0,0 @@ -# PostUsersSignInDataStatus - -## Example Usage - -```typescript -import { PostUsersSignInDataStatus } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PostUsersSignInDataStatus = PostUsersSignInDataStatus.Online; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Online` | online | -| `Offline` | offline | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/postuserssignindatasubscription.md b/docs/sdk/models/operations/postuserssignindatasubscription.md deleted file mode 100644 index d1e6b79c..00000000 --- a/docs/sdk/models/operations/postuserssignindatasubscription.md +++ /dev/null @@ -1,26 +0,0 @@ -# PostUsersSignInDataSubscription - -If the account’s Plex Pass subscription is active - -## Example Usage - -```typescript -import { PostUsersSignInDataAuthenticationStatus, PostUsersSignInDataSubscription } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PostUsersSignInDataSubscription = { - active: true, - subscribedAt: "2021-04-12T18:21:12Z", - status: PostUsersSignInDataAuthenticationStatus.Inactive, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -| `features` | *string*[] | :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.PostUsersSignInDataAuthenticationStatus](../../../sdk/models/operations/postuserssignindataauthenticationstatus.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/postuserssignindatauserplexaccount.md b/docs/sdk/models/operations/postuserssignindatauserplexaccount.md deleted file mode 100644 index 10ce3b94..00000000 --- a/docs/sdk/models/operations/postuserssignindatauserplexaccount.md +++ /dev/null @@ -1,121 +0,0 @@ -# PostUsersSignInDataUserPlexAccount - -Returns the user account data with a valid auth token - -## Example Usage - -```typescript -import { - PostUsersSignInDataAuthenticationResponseStatus, - PostUsersSignInDataAuthenticationStatus, - PostUsersSignInDataAutoSelectSubtitle, - PostUsersSignInDataDefaultSubtitleAccessibility, - PostUsersSignInDataDefaultSubtitleForced, - PostUsersSignInDataMailingListStatus, - PostUsersSignInDataMediaReviewsVisibility, - PostUsersSignInDataUserPlexAccount, - PostUsersSignInDataWatchedIndicator, -} from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PostUsersSignInDataUserPlexAccount = { - adsConsent: true, - adsConsentReminderAt: 1556281940, - adsConsentSetAt: 1556281940, - authToken: "CxoUzBTSV5hsxjTpFKaf", - country: "US", - email: "username@email.com", - friendlyName: "friendlyUsername", - entitlements: [ - "[]", - ], - homeSize: 1, - id: 13692262, - joinedAt: 1556281940, - locale: "zh", - mailingListStatus: PostUsersSignInDataMailingListStatus.Active, - maxHomeSize: 15, - profile: { - defaultAudioLanguage: "ja", - defaultSubtitleLanguage: "en", - autoSelectSubtitle: PostUsersSignInDataAutoSelectSubtitle.Enable, - defaultSubtitleAccessibility: - PostUsersSignInDataDefaultSubtitleAccessibility.Enable, - defaultSubtitleForced: PostUsersSignInDataDefaultSubtitleForced.Enable, - watchedIndicator: PostUsersSignInDataWatchedIndicator.Enable, - mediaReviewsVisibility: PostUsersSignInDataMediaReviewsVisibility.Enable, - }, - rememberExpiresAt: 1556281940, - scrobbleTypes: "", - services: [], - subscription: { - active: true, - subscribedAt: "2021-04-12T18:21:12Z", - status: PostUsersSignInDataAuthenticationStatus.Inactive, - }, - subscriptionDescription: "", - subscriptions: [ - { - active: true, - subscribedAt: "2021-04-12T18:21:12Z", - status: PostUsersSignInDataAuthenticationResponseStatus.Inactive, - }, - ], - thumb: "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", - title: "UsernameTitle", - username: "Username", - uuid: "dae343c1f45beb4f", - attributionPartner: null, - pastSubscriptions: [], - trials: [ - {}, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `adsConsent` | *boolean* | :heavy_check_mark: | Unknown | | -| `adsConsentReminderAt` | *number* | :heavy_check_mark: | N/A | 1556281940 | -| `adsConsentSetAt` | *number* | :heavy_check_mark: | N/A | 1556281940 | -| `anonymous` | *boolean* | :heavy_minus_sign: | Unknown | | -| `authToken` | *string* | :heavy_check_mark: | The account token | CxoUzBTSV5hsxjTpFKaf | -| `backupCodesCreated` | *boolean* | :heavy_minus_sign: | If the two-factor authentication backup codes have been created | | -| `confirmed` | *boolean* | :heavy_minus_sign: | If the account has been confirmed | | -| `country` | *string* | :heavy_check_mark: | The account country | US | -| `email` | *string* | :heavy_check_mark: | The account email address | username@email.com | -| `emailOnlyAuth` | *boolean* | :heavy_minus_sign: | If login with email only is enabled | | -| `experimentalFeatures` | *boolean* | :heavy_minus_sign: | If experimental features are enabled | | -| `friendlyName` | *string* | :heavy_check_mark: | Your account full name | friendlyUsername | -| `entitlements` | *string*[] | :heavy_check_mark: | List of devices your allowed to use with this account | | -| `guest` | *boolean* | :heavy_minus_sign: | If the account is a Plex Home guest user | | -| `hasPassword` | *boolean* | :heavy_minus_sign: | If the account has a password | | -| `home` | *boolean* | :heavy_minus_sign: | If the account is a Plex Home user | | -| `homeAdmin` | *boolean* | :heavy_minus_sign: | If the account is the Plex Home admin | | -| `homeSize` | *number* | :heavy_check_mark: | The number of accounts in the Plex Home | 1 | -| `id` | *number* | :heavy_check_mark: | The Plex account ID | 13692262 | -| `joinedAt` | *number* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | -| `locale` | *string* | :heavy_check_mark: | The account locale | | -| `mailingListActive` | *boolean* | :heavy_minus_sign: | If you are subscribed to the Plex newsletter | | -| `mailingListStatus` | [operations.PostUsersSignInDataMailingListStatus](../../../sdk/models/operations/postuserssignindatamailingliststatus.md) | :heavy_check_mark: | Your current mailing list status (active or unsubscribed) | active | -| `maxHomeSize` | *number* | :heavy_check_mark: | The maximum number of accounts allowed in the Plex Home | 15 | -| ~~`pin`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

[Might be removed] The hashed Plex Home PIN | | -| `profile` | [operations.PostUsersSignInDataUserProfile](../../../sdk/models/operations/postuserssignindatauserprofile.md) | :heavy_check_mark: | N/A | | -| `protected` | *boolean* | :heavy_minus_sign: | If the account has a Plex Home PIN enabled | | -| `rememberExpiresAt` | *number* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | -| `restricted` | *boolean* | :heavy_minus_sign: | If the account is a Plex Home managed user | | -| `roles` | *string*[] | :heavy_minus_sign: | [Might be removed] List of account roles. Plexpass membership listed here | | -| `scrobbleTypes` | *string* | :heavy_check_mark: | Unknown | | -| `services` | [operations.PostUsersSignInDataServices](../../../sdk/models/operations/postuserssignindataservices.md)[] | :heavy_check_mark: | N/A | | -| `subscription` | [operations.PostUsersSignInDataSubscription](../../../sdk/models/operations/postuserssignindatasubscription.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.PostUsersSignInDataAuthenticationSubscription](../../../sdk/models/operations/postuserssignindataauthenticationsubscription.md)[] | :heavy_minus_sign: | 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 | | -| `username` | *string* | :heavy_check_mark: | The account username | Username | -| `uuid` | *string* | :heavy_check_mark: | The account UUID | dae343c1f45beb4f | -| `attributionPartner` | *string* | :heavy_check_mark: | N/A | | -| `pastSubscriptions` | [operations.PastSubscription](../../../sdk/models/operations/pastsubscription.md)[] | :heavy_check_mark: | N/A | | -| `trials` | [operations.Trials](../../../sdk/models/operations/trials.md)[] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/postuserssignindatauserprofile.md b/docs/sdk/models/operations/postuserssignindatauserprofile.md deleted file mode 100644 index ce9ae4e2..00000000 --- a/docs/sdk/models/operations/postuserssignindatauserprofile.md +++ /dev/null @@ -1,38 +0,0 @@ -# PostUsersSignInDataUserProfile - -## Example Usage - -```typescript -import { - PostUsersSignInDataAutoSelectSubtitle, - PostUsersSignInDataDefaultSubtitleAccessibility, - PostUsersSignInDataDefaultSubtitleForced, - PostUsersSignInDataMediaReviewsVisibility, - PostUsersSignInDataUserProfile, - PostUsersSignInDataWatchedIndicator, -} from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PostUsersSignInDataUserProfile = { - defaultAudioLanguage: "ja", - defaultSubtitleLanguage: "en", - autoSelectSubtitle: PostUsersSignInDataAutoSelectSubtitle.Enable, - defaultSubtitleAccessibility: - PostUsersSignInDataDefaultSubtitleAccessibility.Enable, - defaultSubtitleForced: PostUsersSignInDataDefaultSubtitleForced.Enable, - watchedIndicator: PostUsersSignInDataWatchedIndicator.Enable, - mediaReviewsVisibility: PostUsersSignInDataMediaReviewsVisibility.Enable, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -| `autoSelectAudio` | *boolean* | :heavy_minus_sign: | If the account has automatically select audio and subtitle tracks enabled | true | -| `defaultAudioLanguage` | *string* | :heavy_check_mark: | The preferred audio language for the account | ja | -| `defaultSubtitleLanguage` | *string* | :heavy_check_mark: | The preferred subtitle language for the account | en | -| `autoSelectSubtitle` | [operations.PostUsersSignInDataAutoSelectSubtitle](../../../sdk/models/operations/postuserssignindataautoselectsubtitle.md) | :heavy_minus_sign: | N/A | 1 | -| `defaultSubtitleAccessibility` | [operations.PostUsersSignInDataDefaultSubtitleAccessibility](../../../sdk/models/operations/postuserssignindatadefaultsubtitleaccessibility.md) | :heavy_minus_sign: | N/A | 1 | -| `defaultSubtitleForced` | [operations.PostUsersSignInDataDefaultSubtitleForced](../../../sdk/models/operations/postuserssignindatadefaultsubtitleforced.md) | :heavy_minus_sign: | N/A | 1 | -| `watchedIndicator` | [operations.PostUsersSignInDataWatchedIndicator](../../../sdk/models/operations/postuserssignindatawatchedindicator.md) | :heavy_minus_sign: | N/A | 1 | -| `mediaReviewsVisibility` | [operations.PostUsersSignInDataMediaReviewsVisibility](../../../sdk/models/operations/postuserssignindatamediareviewsvisibility.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/postuserssignindatawatchedindicator.md b/docs/sdk/models/operations/postuserssignindatawatchedindicator.md deleted file mode 100644 index fbaf4d1b..00000000 --- a/docs/sdk/models/operations/postuserssignindatawatchedindicator.md +++ /dev/null @@ -1,19 +0,0 @@ -# PostUsersSignInDataWatchedIndicator - -Whether or not media watched indicators are enabled (little orange dot on media) - -## Example Usage - -```typescript -import { PostUsersSignInDataWatchedIndicator } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: PostUsersSignInDataWatchedIndicator = - PostUsersSignInDataWatchedIndicator.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/processingstate.md b/docs/sdk/models/operations/processingstate.md new file mode 100644 index 00000000..aa17d3ea --- /dev/null +++ b/docs/sdk/models/operations/processingstate.md @@ -0,0 +1,22 @@ +# ProcessingState + +The state of processing if this generator is part of an optimizer playlist + +## Example Usage + +```typescript +import { ProcessingState } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ProcessingState = ProcessingState.Disabled; +``` + +## Values + +| Name | Value | +| ------------ | ------------ | +| `Processed` | processed | +| `Completed` | completed | +| `Tombstoned` | tombstoned | +| `Disabled` | disabled | +| `Error` | error | +| `Pending` | pending | \ No newline at end of file diff --git a/docs/sdk/models/operations/processingstatecontext.md b/docs/sdk/models/operations/processingstatecontext.md new file mode 100644 index 00000000..1c477779 --- /dev/null +++ b/docs/sdk/models/operations/processingstatecontext.md @@ -0,0 +1,28 @@ +# ProcessingStateContext + +The error which could have occurred (or `good`) + +## Example Usage + +```typescript +import { ProcessingStateContext } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ProcessingStateContext = ProcessingStateContext.Good; +``` + +## Values + +| Name | Value | +| ------------------------- | ------------------------- | +| `Good` | good | +| `SourceFileUnavailable` | sourceFileUnavailable | +| `SourceFileMetadataError` | sourceFileMetadataError | +| `ClientProfileError` | clientProfileError | +| `IoError` | ioError | +| `TranscoderError` | transcoderError | +| `UnknownError` | unknownError | +| `MediaAnalysisError` | mediaAnalysisError | +| `DownloadFailed` | downloadFailed | +| `AccessDenied` | accessDenied | +| `CannotTranscode` | cannotTranscode | +| `CodecInstallError` | codecInstallError | \ No newline at end of file diff --git a/docs/sdk/models/operations/processsubscriptionsresponse.md b/docs/sdk/models/operations/processsubscriptionsresponse.md new file mode 100644 index 00000000..c2c7bb55 --- /dev/null +++ b/docs/sdk/models/operations/processsubscriptionsresponse.md @@ -0,0 +1,32 @@ +# ProcessSubscriptionsResponse + +## Example Usage + +```typescript +import { ProcessSubscriptionsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ProcessSubscriptionsResponse = { + contentType: "", + statusCode: 88834, + headers: { + "key": [ + "", + "", + ], + "key1": [ + "", + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/producer.md b/docs/sdk/models/operations/producer.md deleted file mode 100644 index 57089724..00000000 --- a/docs/sdk/models/operations/producer.md +++ /dev/null @@ -1,26 +0,0 @@ -# Producer - -## Example Usage - -```typescript -import { Producer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Producer = { - id: 126522, - filter: "producer=126522", - tag: "Amelia Knapp", - tagKey: "5d77683d85719b001f3a535e", - thumb: - "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `id` | *number* | :heavy_check_mark: | Unique identifier for the producer. | 126522 | -| `filter` | *string* | :heavy_check_mark: | The filter string used to query this producer. | producer=126522 | -| `tag` | *string* | :heavy_check_mark: | The name of the producer | Amelia Knapp | -| `tagKey` | *string* | :heavy_check_mark: | A 24-character hexadecimal unique key associated with the producer's tag, used for internal identification.
| 5d77683d85719b001f3a535e | -| `thumb` | *string* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the producer. | https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg | \ No newline at end of file diff --git a/docs/sdk/models/operations/protected.md b/docs/sdk/models/operations/protected.md deleted file mode 100644 index db456484..00000000 --- a/docs/sdk/models/operations/protected.md +++ /dev/null @@ -1,18 +0,0 @@ -# Protected - -Indicates whether the account is protected. - -## Example Usage - -```typescript -import { Protected } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Protected = Protected.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/protocol.md b/docs/sdk/models/operations/protocol.md deleted file mode 100644 index 02a9c95c..00000000 --- a/docs/sdk/models/operations/protocol.md +++ /dev/null @@ -1,18 +0,0 @@ -# Protocol - -The protocol used for the connection (http, https, etc) - -## Example Usage - -```typescript -import { Protocol } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Protocol = Protocol.Http; -``` - -## Values - -| Name | Value | -| ------- | ------- | -| `Http` | http | -| `Https` | https | \ No newline at end of file diff --git a/docs/sdk/models/operations/provider.md b/docs/sdk/models/operations/provider.md deleted file mode 100644 index 97b25949..00000000 --- a/docs/sdk/models/operations/provider.md +++ /dev/null @@ -1,21 +0,0 @@ -# Provider - -## Example Usage - -```typescript -import { Provider } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Provider = { - key: "/system/search", - title: "Local Network", - type: "mixed", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `key` | *string* | :heavy_minus_sign: | N/A | /system/search | -| `title` | *string* | :heavy_minus_sign: | N/A | Local Network | -| `type` | *string* | :heavy_minus_sign: | N/A | mixed | \ No newline at end of file diff --git a/docs/sdk/models/operations/queryparamfilter.md b/docs/sdk/models/operations/queryparamfilter.md deleted file mode 100644 index 844ae64a..00000000 --- a/docs/sdk/models/operations/queryparamfilter.md +++ /dev/null @@ -1,18 +0,0 @@ -# QueryParamFilter - -Filters content by field and direction/equality -(Unknown if viewedAt is the only supported column) - - -## Example Usage - -```typescript -import { QueryParamFilter } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: QueryParamFilter = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdk/models/operations/queryparamforce.md b/docs/sdk/models/operations/queryparamforce.md deleted file mode 100644 index 8c0c39c0..00000000 --- a/docs/sdk/models/operations/queryparamforce.md +++ /dev/null @@ -1,22 +0,0 @@ -# QueryParamForce - -Force overwriting of duplicate playlists. -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. - - -## Example Usage - -```typescript -import { QueryParamForce } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: QueryParamForce = QueryParamForce.One; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/queryparamincludecollections.md b/docs/sdk/models/operations/queryparamincludecollections.md deleted file mode 100644 index 81b8fb39..00000000 --- a/docs/sdk/models/operations/queryparamincludecollections.md +++ /dev/null @@ -1,16 +0,0 @@ -# QueryParamIncludeCollections - -## Example Usage - -```typescript -import { QueryParamIncludeCollections } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: QueryParamIncludeCollections = QueryParamIncludeCollections.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/queryparamincludeexternalmedia.md b/docs/sdk/models/operations/queryparamincludeexternalmedia.md deleted file mode 100644 index b120ac3c..00000000 --- a/docs/sdk/models/operations/queryparamincludeexternalmedia.md +++ /dev/null @@ -1,17 +0,0 @@ -# QueryParamIncludeExternalMedia - -## Example Usage - -```typescript -import { QueryParamIncludeExternalMedia } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: QueryParamIncludeExternalMedia = - QueryParamIncludeExternalMedia.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/queryparamincludeguids.md b/docs/sdk/models/operations/queryparamincludeguids.md deleted file mode 100644 index 0f737ce1..00000000 --- a/docs/sdk/models/operations/queryparamincludeguids.md +++ /dev/null @@ -1,19 +0,0 @@ -# QueryParamIncludeGuids - -Adds the Guid object to the response - - -## Example Usage - -```typescript -import { QueryParamIncludeGuids } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: QueryParamIncludeGuids = QueryParamIncludeGuids.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/queryparamincludemeta.md b/docs/sdk/models/operations/queryparamincludemeta.md deleted file mode 100644 index 3e59c78a..00000000 --- a/docs/sdk/models/operations/queryparamincludemeta.md +++ /dev/null @@ -1,19 +0,0 @@ -# QueryParamIncludeMeta - -Adds the Meta object to the response - - -## Example Usage - -```typescript -import { QueryParamIncludeMeta } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: QueryParamIncludeMeta = QueryParamIncludeMeta.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/queryparamonlytransient.md b/docs/sdk/models/operations/queryparamonlytransient.md deleted file mode 100644 index fb6039e8..00000000 --- a/docs/sdk/models/operations/queryparamonlytransient.md +++ /dev/null @@ -1,18 +0,0 @@ -# QueryParamOnlyTransient - -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). - -## Example Usage - -```typescript -import { QueryParamOnlyTransient } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: QueryParamOnlyTransient = QueryParamOnlyTransient.Zero; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/queryparamsmart.md b/docs/sdk/models/operations/queryparamsmart.md deleted file mode 100644 index 14485e75..00000000 --- a/docs/sdk/models/operations/queryparamsmart.md +++ /dev/null @@ -1,21 +0,0 @@ -# QueryParamSmart - -type of playlists to return (default is all). - -## Example Usage - -```typescript -import { QueryParamSmart } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: QueryParamSmart = QueryParamSmart.Zero; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Zero` | 0 | -| `One` | 1 | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/queryparamtype.md b/docs/sdk/models/operations/queryparamtype.md deleted file mode 100644 index 0f757727..00000000 --- a/docs/sdk/models/operations/queryparamtype.md +++ /dev/null @@ -1,34 +0,0 @@ -# QueryParamType - -The type of media to retrieve or filter by. -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 - - -## Example Usage - -```typescript -import { QueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: QueryParamType = QueryParamType.TvShow; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Artist` | 5 | -| `Album` | 6 | -| `Track` | 7 | -| `PhotoAlbum` | 8 | -| `Photo` | 9 | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/rating.md b/docs/sdk/models/operations/rating.md deleted file mode 100644 index 0883325b..00000000 --- a/docs/sdk/models/operations/rating.md +++ /dev/null @@ -1,23 +0,0 @@ -# Rating - -The type of rating, for example 'audience' or 'critic'. - -## Example Usage - -```typescript -import { Rating } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Rating = { - image: "imdb://image.rating", - value: 5.1, - type: "audience", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `image` | *string* | :heavy_check_mark: | The URL for the rating image, for example from IMDb. | imdb://image.rating | -| `value` | *number* | :heavy_check_mark: | N/A | 5.1 | -| `type` | *string* | :heavy_check_mark: | N/A | audience | \ No newline at end of file diff --git a/docs/sdk/models/operations/ratings.md b/docs/sdk/models/operations/ratings.md deleted file mode 100644 index ce6b866e..00000000 --- a/docs/sdk/models/operations/ratings.md +++ /dev/null @@ -1,21 +0,0 @@ -# Ratings - -## Example Usage - -```typescript -import { Ratings } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Ratings = { - image: "imdb://image.rating", - value: 9, - type: "audience", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `image` | *string* | :heavy_check_mark: | The image or reference for the rating. | imdb://image.rating | -| `value` | *number* | :heavy_check_mark: | The rating value. | 9 | -| `type` | *string* | :heavy_check_mark: | The type of rating (e.g., audience, critic). | audience | \ No newline at end of file diff --git a/docs/sdk/models/operations/recommendationsvisibility.md b/docs/sdk/models/operations/recommendationsvisibility.md new file mode 100644 index 00000000..d0597e61 --- /dev/null +++ b/docs/sdk/models/operations/recommendationsvisibility.md @@ -0,0 +1,25 @@ +# RecommendationsVisibility + +The visibility of this hub in recommendations: + - all: Visible to all users + - none: Visible to no users + - admin: Visible to only admin users + - shared: Visible to shared users + + +## Example Usage + +```typescript +import { RecommendationsVisibility } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RecommendationsVisibility = RecommendationsVisibility.Admin; +``` + +## Values + +| Name | Value | +| -------- | -------- | +| `All` | all | +| `None` | none | +| `Admin` | admin | +| `Shared` | shared | \ No newline at end of file diff --git a/docs/sdk/models/operations/refreshitemsmetadataglobals.md b/docs/sdk/models/operations/refreshitemsmetadataglobals.md new file mode 100644 index 00000000..05616d33 --- /dev/null +++ b/docs/sdk/models/operations/refreshitemsmetadataglobals.md @@ -0,0 +1,35 @@ +# RefreshItemsMetadataGlobals + +## Example Usage + +```typescript +import { RefreshItemsMetadataGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RefreshItemsMetadataGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/refreshitemsmetadatarequest.md b/docs/sdk/models/operations/refreshitemsmetadatarequest.md new file mode 100644 index 00000000..5b8366f5 --- /dev/null +++ b/docs/sdk/models/operations/refreshitemsmetadatarequest.md @@ -0,0 +1,31 @@ +# RefreshItemsMetadataRequest + +## Example Usage + +```typescript +import { RefreshItemsMetadataRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: RefreshItemsMetadataRequest = { + ids: "", + markUpdated: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `agent` | *string* | :heavy_minus_sign: | N/A | | +| `markUpdated` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/refreshitemsmetadataresponse.md b/docs/sdk/models/operations/refreshitemsmetadataresponse.md new file mode 100644 index 00000000..8336559f --- /dev/null +++ b/docs/sdk/models/operations/refreshitemsmetadataresponse.md @@ -0,0 +1,20 @@ +# RefreshItemsMetadataResponse + +## Example Usage + +```typescript +import { RefreshItemsMetadataResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RefreshItemsMetadataResponse = { + contentType: "", + statusCode: 127292, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/refreshplaylistglobals.md b/docs/sdk/models/operations/refreshplaylistglobals.md new file mode 100644 index 00000000..3680ff1f --- /dev/null +++ b/docs/sdk/models/operations/refreshplaylistglobals.md @@ -0,0 +1,35 @@ +# RefreshPlaylistGlobals + +## Example Usage + +```typescript +import { RefreshPlaylistGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RefreshPlaylistGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/refreshplaylistrequest.md b/docs/sdk/models/operations/refreshplaylistrequest.md new file mode 100644 index 00000000..5dba41b6 --- /dev/null +++ b/docs/sdk/models/operations/refreshplaylistrequest.md @@ -0,0 +1,33 @@ +# RefreshPlaylistRequest + +## Example Usage + +```typescript +import { Action, RefreshPlaylistRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RefreshPlaylistRequest = { + playlistId: 711896, + generatorId: 824064, + metadataId: 526557, + action: Action.Reprocess, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *number* | :heavy_check_mark: | The ID of the playlist | | +| `generatorId` | *number* | :heavy_check_mark: | The generator item ID to act on | | +| `metadataId` | *number* | :heavy_check_mark: | The metadata item ID to act on | | +| `action` | [operations.Action](../../../sdk/models/operations/action.md) | :heavy_check_mark: | The action to perform for this item on this optimizer queue | | \ No newline at end of file diff --git a/docs/sdk/models/operations/refreshplaylistresponse.md b/docs/sdk/models/operations/refreshplaylistresponse.md new file mode 100644 index 00000000..68c5994a --- /dev/null +++ b/docs/sdk/models/operations/refreshplaylistresponse.md @@ -0,0 +1,20 @@ +# RefreshPlaylistResponse + +## Example Usage + +```typescript +import { RefreshPlaylistResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RefreshPlaylistResponse = { + contentType: "", + statusCode: 518336, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/refreshprovidersresponse.md b/docs/sdk/models/operations/refreshprovidersresponse.md new file mode 100644 index 00000000..8409648a --- /dev/null +++ b/docs/sdk/models/operations/refreshprovidersresponse.md @@ -0,0 +1,20 @@ +# RefreshProvidersResponse + +## Example Usage + +```typescript +import { RefreshProvidersResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RefreshProvidersResponse = { + contentType: "", + statusCode: 821737, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/refreshsectionglobals.md b/docs/sdk/models/operations/refreshsectionglobals.md new file mode 100644 index 00000000..2c787018 --- /dev/null +++ b/docs/sdk/models/operations/refreshsectionglobals.md @@ -0,0 +1,35 @@ +# RefreshSectionGlobals + +## Example Usage + +```typescript +import { RefreshSectionGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RefreshSectionGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/refreshsectionrequest.md b/docs/sdk/models/operations/refreshsectionrequest.md new file mode 100644 index 00000000..f53c145a --- /dev/null +++ b/docs/sdk/models/operations/refreshsectionrequest.md @@ -0,0 +1,31 @@ +# RefreshSectionRequest + +## Example Usage + +```typescript +import { RefreshSectionRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: RefreshSectionRequest = { + sectionId: 201663, + force: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | +| `force` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Whether the update of metadata and items should be performed even if modification dates indicate the items have not change | 1 | +| `path` | *string* | :heavy_minus_sign: | Restrict refresh to the specified path | | \ No newline at end of file diff --git a/docs/sdk/models/operations/refreshsectionresponse.md b/docs/sdk/models/operations/refreshsectionresponse.md new file mode 100644 index 00000000..c99bdb0b --- /dev/null +++ b/docs/sdk/models/operations/refreshsectionresponse.md @@ -0,0 +1,20 @@ +# RefreshSectionResponse + +## Example Usage + +```typescript +import { RefreshSectionResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RefreshSectionResponse = { + contentType: "", + statusCode: 396908, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/refreshsectionsmetadataglobals.md b/docs/sdk/models/operations/refreshsectionsmetadataglobals.md new file mode 100644 index 00000000..e267f383 --- /dev/null +++ b/docs/sdk/models/operations/refreshsectionsmetadataglobals.md @@ -0,0 +1,35 @@ +# RefreshSectionsMetadataGlobals + +## Example Usage + +```typescript +import { RefreshSectionsMetadataGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RefreshSectionsMetadataGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/refreshsectionsmetadatarequest.md b/docs/sdk/models/operations/refreshsectionsmetadatarequest.md new file mode 100644 index 00000000..9ad5faed --- /dev/null +++ b/docs/sdk/models/operations/refreshsectionsmetadatarequest.md @@ -0,0 +1,25 @@ +# RefreshSectionsMetadataRequest + +## Example Usage + +```typescript +import { RefreshSectionsMetadataRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RefreshSectionsMetadataRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `force` | *boolean* | :heavy_minus_sign: | Force refresh of metadata | | \ No newline at end of file diff --git a/docs/sdk/models/operations/refreshsectionsmetadataresponse.md b/docs/sdk/models/operations/refreshsectionsmetadataresponse.md new file mode 100644 index 00000000..66768418 --- /dev/null +++ b/docs/sdk/models/operations/refreshsectionsmetadataresponse.md @@ -0,0 +1,20 @@ +# RefreshSectionsMetadataResponse + +## Example Usage + +```typescript +import { RefreshSectionsMetadataResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RefreshSectionsMetadataResponse = { + contentType: "", + statusCode: 384835, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/release.md b/docs/sdk/models/operations/release.md index 30fc763c..478d2869 100644 --- a/docs/sdk/models/operations/release.md +++ b/docs/sdk/models/operations/release.md @@ -5,41 +5,16 @@ ```typescript 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", -}; +let value: Release = {}; ``` ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `key` | *string* | :heavy_minus_sign: | N/A | https://plex.tv/updater/releases/5136 | -| `version` | *string* | :heavy_minus_sign: | N/A | 1.40.0.7775-456fbaf97 | -| `added` | *string* | :heavy_minus_sign: | N/A | (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.
(Collections) Items added to a collection from the item context menu will now lock the collection field on the items (#12793)
(Music) Store track genres and add filtering options (#14653)
(Music) Support ID3v2.4 null-separated tags for genres and release type (#14653)
(View History) No longer create a view history entry for items marked as played (#10888)
(Web) Updated to 4.118.0 | -| `fixed` | *string* | :heavy_minus_sign: | N/A | (Agents) Changing a 'Other Videos' type library to the modern movie agent would fail (#14483)
(Agents) It is possible that agents are not initialised during startup on rare occasions (#14654)
(Agents) Remove the legacy OpenSubtitles agent which is no longer supported upstream (#14667)
(Collection) Server could become unresponsive when collection membership changes (#14612)
(DVR) Previously watched recordings could be deleted without being watched again (#13779)
(Libraries) When performing fix match on items from certain music libraries the language would default to Arabic (#14501)
(Library) The Content Rating not equal to None filter does not work (#14620)
(Search) Album search results could contain all the album's tracks too (#14486)
(Subtitles) In some circumstances, sidecar subtitles can show up for media when they're no longer available (#14674)
(Transcoder) HW encoding would fail on devices with no rate control (#14222)
(Transcoder) Software transcoding on Ubuntu could cause unexpected behavior (#14605) | -| `downloadURL` | *string* | :heavy_minus_sign: | N/A | https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx | -| `state` | *string* | :heavy_minus_sign: | N/A | notify | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `added` | *string* | :heavy_minus_sign: | A list of what has been added in this version | +| `downloadURL` | *string* | :heavy_minus_sign: | The URL of where this update is available | +| `fixed` | *string* | :heavy_minus_sign: | A list of what has been fixed in this version | +| `key` | *string* | :heavy_minus_sign: | The URL key of the update | +| `state` | [operations.GetUpdatesStatusState](../../../sdk/models/operations/getupdatesstatusstate.md) | :heavy_minus_sign: | The status of this update.

- available - This release is available
- downloading - This release is downloading
- downloaded - This release has been downloaded
- installing - This release is installing
- tonight - This release will be installed tonight
- skipped - This release has been skipped
- error - This release has an error
- notify - This release is only notifying it is available (typically because it cannot be installed on this setup)
- done - This release is complete
| +| `version` | *string* | :heavy_minus_sign: | The version available | \ No newline at end of file diff --git a/docs/sdk/models/operations/reloadguideglobals.md b/docs/sdk/models/operations/reloadguideglobals.md new file mode 100644 index 00000000..04882ed2 --- /dev/null +++ b/docs/sdk/models/operations/reloadguideglobals.md @@ -0,0 +1,35 @@ +# ReloadGuideGlobals + +## Example Usage + +```typescript +import { ReloadGuideGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ReloadGuideGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/reloadguiderequest.md b/docs/sdk/models/operations/reloadguiderequest.md new file mode 100644 index 00000000..b629949b --- /dev/null +++ b/docs/sdk/models/operations/reloadguiderequest.md @@ -0,0 +1,27 @@ +# ReloadGuideRequest + +## Example Usage + +```typescript +import { ReloadGuideRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ReloadGuideRequest = { + dvrId: 734107, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `dvrId` | *number* | :heavy_check_mark: | The ID of the DVR. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/reloadguideresponse.md b/docs/sdk/models/operations/reloadguideresponse.md new file mode 100644 index 00000000..fa63da97 --- /dev/null +++ b/docs/sdk/models/operations/reloadguideresponse.md @@ -0,0 +1,22 @@ +# ReloadGuideResponse + +## Example Usage + +```typescript +import { ReloadGuideResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ReloadGuideResponse = { + contentType: "", + statusCode: 244734, + headers: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/removedevicefromdvrdvr.md b/docs/sdk/models/operations/removedevicefromdvrdvr.md new file mode 100644 index 00000000..0adde1a5 --- /dev/null +++ b/docs/sdk/models/operations/removedevicefromdvrdvr.md @@ -0,0 +1,19 @@ +# RemoveDeviceFromDVRDVR + +## Example Usage + +```typescript +import { RemoveDeviceFromDVRDVR } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RemoveDeviceFromDVRDVR = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `device` | [shared.Device](../../../sdk/models/shared/device.md)[] | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `language` | *string* | :heavy_minus_sign: | N/A | +| `lineup` | *string* | :heavy_minus_sign: | N/A | +| `uuid` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/removedevicefromdvrglobals.md b/docs/sdk/models/operations/removedevicefromdvrglobals.md new file mode 100644 index 00000000..b4970e42 --- /dev/null +++ b/docs/sdk/models/operations/removedevicefromdvrglobals.md @@ -0,0 +1,35 @@ +# RemoveDeviceFromDVRGlobals + +## Example Usage + +```typescript +import { RemoveDeviceFromDVRGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RemoveDeviceFromDVRGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/removedevicefromdvrmediacontainer.md b/docs/sdk/models/operations/removedevicefromdvrmediacontainer.md new file mode 100644 index 00000000..e0bd3a4e --- /dev/null +++ b/docs/sdk/models/operations/removedevicefromdvrmediacontainer.md @@ -0,0 +1,16 @@ +# RemoveDeviceFromDVRMediaContainer + +## Example Usage + +```typescript +import { RemoveDeviceFromDVRMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RemoveDeviceFromDVRMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.RemoveDeviceFromDVRMediaContainerMediaContainer](../../../sdk/models/operations/removedevicefromdvrmediacontainermediacontainer.md) | :heavy_minus_sign: | N/A | +| `dvr` | [operations.RemoveDeviceFromDVRDVR](../../../sdk/models/operations/removedevicefromdvrdvr.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/removedevicefromdvrmediacontainermediacontainer.md b/docs/sdk/models/operations/removedevicefromdvrmediacontainermediacontainer.md new file mode 100644 index 00000000..39ac2dd6 --- /dev/null +++ b/docs/sdk/models/operations/removedevicefromdvrmediacontainermediacontainer.md @@ -0,0 +1,24 @@ +# RemoveDeviceFromDVRMediaContainerMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { RemoveDeviceFromDVRMediaContainerMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RemoveDeviceFromDVRMediaContainerMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `status` | *number* | :heavy_minus_sign: | A status indicator. If present and non-zero, indicates an error | \ No newline at end of file diff --git a/docs/sdk/models/operations/removedevicefromdvrrequest.md b/docs/sdk/models/operations/removedevicefromdvrrequest.md new file mode 100644 index 00000000..ad121907 --- /dev/null +++ b/docs/sdk/models/operations/removedevicefromdvrrequest.md @@ -0,0 +1,29 @@ +# RemoveDeviceFromDVRRequest + +## Example Usage + +```typescript +import { RemoveDeviceFromDVRRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RemoveDeviceFromDVRRequest = { + dvrId: 754262, + deviceId: 779261, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `dvrId` | *number* | :heavy_check_mark: | The ID of the DVR. | | +| `deviceId` | *number* | :heavy_check_mark: | The ID of the device to add. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/removedevicefromdvrresponse.md b/docs/sdk/models/operations/removedevicefromdvrresponse.md new file mode 100644 index 00000000..b3ec03fa --- /dev/null +++ b/docs/sdk/models/operations/removedevicefromdvrresponse.md @@ -0,0 +1,23 @@ +# RemoveDeviceFromDVRResponse + +## Example Usage + +```typescript +import { RemoveDeviceFromDVRResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RemoveDeviceFromDVRResponse = { + contentType: "", + statusCode: 264961, + headers: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.RemoveDeviceFromDVRResponseBody](../../../sdk/models/operations/removedevicefromdvrresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/removedevicefromdvrresponsebody.md b/docs/sdk/models/operations/removedevicefromdvrresponsebody.md new file mode 100644 index 00000000..16977164 --- /dev/null +++ b/docs/sdk/models/operations/removedevicefromdvrresponsebody.md @@ -0,0 +1,17 @@ +# RemoveDeviceFromDVRResponseBody + +OK + +## Example Usage + +```typescript +import { RemoveDeviceFromDVRResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RemoveDeviceFromDVRResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.RemoveDeviceFromDVRMediaContainer](../../../sdk/models/operations/removedevicefromdvrmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/removedeviceglobals.md b/docs/sdk/models/operations/removedeviceglobals.md new file mode 100644 index 00000000..f14edeb4 --- /dev/null +++ b/docs/sdk/models/operations/removedeviceglobals.md @@ -0,0 +1,35 @@ +# RemoveDeviceGlobals + +## Example Usage + +```typescript +import { RemoveDeviceGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RemoveDeviceGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/removedevicemediacontainer.md b/docs/sdk/models/operations/removedevicemediacontainer.md new file mode 100644 index 00000000..338c190e --- /dev/null +++ b/docs/sdk/models/operations/removedevicemediacontainer.md @@ -0,0 +1,25 @@ +# RemoveDeviceMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { RemoveDeviceMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RemoveDeviceMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `message` | *string* | :heavy_minus_sign: | N/A | +| `status` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/removedevicerequest.md b/docs/sdk/models/operations/removedevicerequest.md new file mode 100644 index 00000000..0a775963 --- /dev/null +++ b/docs/sdk/models/operations/removedevicerequest.md @@ -0,0 +1,27 @@ +# RemoveDeviceRequest + +## Example Usage + +```typescript +import { RemoveDeviceRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RemoveDeviceRequest = { + deviceId: 671967, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `deviceId` | *number* | :heavy_check_mark: | The ID of the device. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/removedeviceresponse.md b/docs/sdk/models/operations/removedeviceresponse.md new file mode 100644 index 00000000..0f6d00c1 --- /dev/null +++ b/docs/sdk/models/operations/removedeviceresponse.md @@ -0,0 +1,31 @@ +# RemoveDeviceResponse + +## Example Usage + +```typescript +import { RemoveDeviceResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RemoveDeviceResponse = { + contentType: "", + statusCode: 118218, + headers: { + "key": [ + "", + "", + ], + "key1": [ + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.RemoveDeviceResponseBody](../../../sdk/models/operations/removedeviceresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/removedeviceresponsebody.md b/docs/sdk/models/operations/removedeviceresponsebody.md new file mode 100644 index 00000000..01f44991 --- /dev/null +++ b/docs/sdk/models/operations/removedeviceresponsebody.md @@ -0,0 +1,17 @@ +# RemoveDeviceResponseBody + +OK + +## Example Usage + +```typescript +import { RemoveDeviceResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RemoveDeviceResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.RemoveDeviceMediaContainer](../../../sdk/models/operations/removedevicemediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/removedownloadqueueitemsglobals.md b/docs/sdk/models/operations/removedownloadqueueitemsglobals.md new file mode 100644 index 00000000..657dbb5c --- /dev/null +++ b/docs/sdk/models/operations/removedownloadqueueitemsglobals.md @@ -0,0 +1,35 @@ +# RemoveDownloadQueueItemsGlobals + +## Example Usage + +```typescript +import { RemoveDownloadQueueItemsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RemoveDownloadQueueItemsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/removedownloadqueueitemsrequest.md b/docs/sdk/models/operations/removedownloadqueueitemsrequest.md new file mode 100644 index 00000000..7fb9ac74 --- /dev/null +++ b/docs/sdk/models/operations/removedownloadqueueitemsrequest.md @@ -0,0 +1,33 @@ +# RemoveDownloadQueueItemsRequest + +## Example Usage + +```typescript +import { RemoveDownloadQueueItemsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RemoveDownloadQueueItemsRequest = { + queueId: 666393, + itemId: [ + 32, + 345, + 23, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `queueId` | *number* | :heavy_check_mark: | The queue id | | +| `itemId` | *number*[] | :heavy_check_mark: | The item id | [
32,
345,
23
] | \ No newline at end of file diff --git a/docs/sdk/models/operations/removedownloadqueueitemsresponse.md b/docs/sdk/models/operations/removedownloadqueueitemsresponse.md new file mode 100644 index 00000000..d6cd3500 --- /dev/null +++ b/docs/sdk/models/operations/removedownloadqueueitemsresponse.md @@ -0,0 +1,20 @@ +# RemoveDownloadQueueItemsResponse + +## Example Usage + +```typescript +import { RemoveDownloadQueueItemsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RemoveDownloadQueueItemsResponse = { + contentType: "", + statusCode: 665826, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/reordersubscriptionglobals.md b/docs/sdk/models/operations/reordersubscriptionglobals.md new file mode 100644 index 00000000..f9aa9714 --- /dev/null +++ b/docs/sdk/models/operations/reordersubscriptionglobals.md @@ -0,0 +1,35 @@ +# ReorderSubscriptionGlobals + +## Example Usage + +```typescript +import { ReorderSubscriptionGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ReorderSubscriptionGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/reordersubscriptionrequest.md b/docs/sdk/models/operations/reordersubscriptionrequest.md new file mode 100644 index 00000000..0452adec --- /dev/null +++ b/docs/sdk/models/operations/reordersubscriptionrequest.md @@ -0,0 +1,28 @@ +# ReorderSubscriptionRequest + +## Example Usage + +```typescript +import { ReorderSubscriptionRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ReorderSubscriptionRequest = { + subscriptionId: 473541, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `subscriptionId` | *number* | :heavy_check_mark: | N/A | | +| `after` | *number* | :heavy_minus_sign: | The subscription to move this sub after. If missing will insert at the beginning of the list | | \ No newline at end of file diff --git a/docs/sdk/models/operations/reordersubscriptionresponse.md b/docs/sdk/models/operations/reordersubscriptionresponse.md new file mode 100644 index 00000000..719101c4 --- /dev/null +++ b/docs/sdk/models/operations/reordersubscriptionresponse.md @@ -0,0 +1,21 @@ +# ReorderSubscriptionResponse + +## Example Usage + +```typescript +import { ReorderSubscriptionResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ReorderSubscriptionResponse = { + contentType: "", + statusCode: 881712, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithSubscription` | [shared.MediaContainerWithSubscription](../../../sdk/models/shared/mediacontainerwithsubscription.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/reportglobals.md b/docs/sdk/models/operations/reportglobals.md new file mode 100644 index 00000000..6a2a0dbd --- /dev/null +++ b/docs/sdk/models/operations/reportglobals.md @@ -0,0 +1,35 @@ +# ReportGlobals + +## Example Usage + +```typescript +import { ReportGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ReportGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/reportmediacontainer.md b/docs/sdk/models/operations/reportmediacontainer.md new file mode 100644 index 00000000..cdbc7f0b --- /dev/null +++ b/docs/sdk/models/operations/reportmediacontainer.md @@ -0,0 +1,81 @@ +# ReportMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { ReportMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ReportMediaContainer = { + livetv: 7, + machineIdentifier: "0123456789abcdef0123456789abcdef012345678", + musicAnalysis: 2, + myPlexMappingState: "mapped", + myPlexSigninState: "ok", + offlineTranscode: 1, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| | +| `size` | *number* | :heavy_minus_sign: | N/A | | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| | +| `allowCameraUpload` | *boolean* | :heavy_minus_sign: | N/A | | +| `allowChannelAccess` | *boolean* | :heavy_minus_sign: | N/A | | +| `allowMediaDeletion` | *boolean* | :heavy_minus_sign: | N/A | | +| `allowSharing` | *boolean* | :heavy_minus_sign: | N/A | | +| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | | +| `allowTuners` | *boolean* | :heavy_minus_sign: | N/A | | +| `backgroundProcessing` | *boolean* | :heavy_minus_sign: | N/A | | +| `certificate` | *boolean* | :heavy_minus_sign: | N/A | | +| `companionProxy` | *boolean* | :heavy_minus_sign: | N/A | | +| `countryCode` | *string* | :heavy_minus_sign: | N/A | | +| `diagnostics` | *string* | :heavy_minus_sign: | N/A | | +| `eventStream` | *boolean* | :heavy_minus_sign: | N/A | | +| `friendlyName` | *string* | :heavy_minus_sign: | N/A | | +| `hubSearch` | *boolean* | :heavy_minus_sign: | N/A | | +| `itemClusters` | *boolean* | :heavy_minus_sign: | N/A | | +| `livetv` | *number* | :heavy_minus_sign: | N/A | 7 | +| `machineIdentifier` | *any* | :heavy_minus_sign: | N/A | 0123456789abcdef0123456789abcdef012345678 | +| `mediaProviders` | *boolean* | :heavy_minus_sign: | N/A | | +| `multiuser` | *boolean* | :heavy_minus_sign: | N/A | | +| `musicAnalysis` | *number* | :heavy_minus_sign: | N/A | 2 | +| `myPlex` | *boolean* | :heavy_minus_sign: | N/A | | +| `myPlexMappingState` | *any* | :heavy_minus_sign: | N/A | mapped | +| `myPlexSigninState` | *any* | :heavy_minus_sign: | N/A | ok | +| `myPlexSubscription` | *boolean* | :heavy_minus_sign: | N/A | | +| `myPlexUsername` | *string* | :heavy_minus_sign: | N/A | | +| `offlineTranscode` | *any* | :heavy_minus_sign: | N/A | 1 | +| `ownerFeatures` | *string* | :heavy_minus_sign: | A comma-separated list of features which are enabled for the server owner | | +| `platform` | *string* | :heavy_minus_sign: | N/A | | +| `platformVersion` | *string* | :heavy_minus_sign: | N/A | | +| `pluginHost` | *boolean* | :heavy_minus_sign: | N/A | | +| `pushNotifications` | *boolean* | :heavy_minus_sign: | N/A | | +| `readOnlyLibraries` | *boolean* | :heavy_minus_sign: | N/A | | +| `streamingBrainABRVersion` | *number* | :heavy_minus_sign: | N/A | | +| `streamingBrainVersion` | *number* | :heavy_minus_sign: | N/A | | +| `sync` | *boolean* | :heavy_minus_sign: | N/A | | +| `transcoderActiveVideoSessions` | *number* | :heavy_minus_sign: | N/A | | +| `transcoderAudio` | *boolean* | :heavy_minus_sign: | N/A | | +| `transcoderLyrics` | *boolean* | :heavy_minus_sign: | N/A | | +| `transcoderPhoto` | *boolean* | :heavy_minus_sign: | N/A | | +| `transcoderSubtitles` | *boolean* | :heavy_minus_sign: | N/A | | +| `transcoderVideo` | *boolean* | :heavy_minus_sign: | N/A | | +| `transcoderVideoBitrates` | *any* | :heavy_minus_sign: | The suggested video quality bitrates to present to the user | | +| `transcoderVideoQualities` | *string* | :heavy_minus_sign: | N/A | | +| `transcoderVideoResolutions` | *any* | :heavy_minus_sign: | The suggested video resolutions to the above quality bitrates | | +| `updatedAt` | *number* | :heavy_minus_sign: | N/A | | +| `updater` | *boolean* | :heavy_minus_sign: | N/A | | +| `version` | *string* | :heavy_minus_sign: | N/A | | +| `voiceSearch` | *boolean* | :heavy_minus_sign: | N/A | | +| `bandwidths` | [operations.Bandwidths](../../../sdk/models/operations/bandwidths.md) | :heavy_minus_sign: | A list of media times and bandwidths when trascoding is using with auto adjustment of bandwidth | | +| `terminationCode` | *number* | :heavy_minus_sign: | A code describing why the session was terminated by the server. | | +| `terminationText` | *string* | :heavy_minus_sign: | A user friendly and localized text describing why the session was terminated by the server. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/reportrequest.md b/docs/sdk/models/operations/reportrequest.md new file mode 100644 index 00000000..97679ad2 --- /dev/null +++ b/docs/sdk/models/operations/reportrequest.md @@ -0,0 +1,55 @@ +# ReportRequest + +## Example Usage + +```typescript +import { ReportRequest, ReportState } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: ReportRequest = { + key: "/foo", + ratingKey: "xyz", + state: ReportState.Playing, + playQueueItemID: "123", + time: 0, + duration: 10000, + continuing: BoolInt.One, + updated: 14200000, + offline: BoolInt.One, + timeToFirstFrame: 1000, + timeStalled: 1000, + bandwidth: 100, + bufferedTime: 100, + bufferedSize: 1024, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `key` | *string* | :heavy_minus_sign: | The details key for the item. | /foo | +| `ratingKey` | *string* | :heavy_minus_sign: | The rating key attribute for the item. | xyz | +| `state` | [operations.ReportState](../../../sdk/models/operations/reportstate.md) | :heavy_minus_sign: | The current state of the media. | playing | +| `playQueueItemID` | *string* | :heavy_minus_sign: | If playing media from a play queue, the play queue's ID. | 123 | +| `time` | *number* | :heavy_minus_sign: | The current time offset of playback in ms. | 0 | +| `duration` | *number* | :heavy_minus_sign: | The total duration of the item in ms. | 10000 | +| `continuing` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | When state is `stopped`, a flag indicating whether or not the client is going to continue playing anothe item. | 1 | +| `updated` | *number* | :heavy_minus_sign: | Used when a sync client comes online and is syncing media timelines, holds the time at which the playback state was last updated. | 14200000 | +| `offline` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Also used by sync clients, used to indicate that a timeline is being synced from being offline, as opposed to being "live". | 1 | +| `timeToFirstFrame` | *number* | :heavy_minus_sign: | Time in seconds till first frame is displayed. Sent only on the first playing timeline request. | 1000 | +| `timeStalled` | *number* | :heavy_minus_sign: | Time in seconds spent buffering since last request. | 1000 | +| `bandwidth` | *number* | :heavy_minus_sign: | Bandwidth in kbps as estimated by the client. | 100 | +| `bufferedTime` | *number* | :heavy_minus_sign: | Amount of time in seconds buffered by client. Omit if computed by `bufferedSize` below. | 100 | +| `bufferedSize` | *number* | :heavy_minus_sign: | Size in kilobytes of data buffered by client. Omit if computed by `bufferedTime` above | 1024 | +| `xPlexSessionIdentifier` | *string* | :heavy_minus_sign: | Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) | | \ No newline at end of file diff --git a/docs/sdk/models/operations/reportresponse.md b/docs/sdk/models/operations/reportresponse.md new file mode 100644 index 00000000..93616be3 --- /dev/null +++ b/docs/sdk/models/operations/reportresponse.md @@ -0,0 +1,21 @@ +# ReportResponse + +## Example Usage + +```typescript +import { ReportResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ReportResponse = { + contentType: "", + statusCode: 654732, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.ReportResponseBody](../../../sdk/models/operations/reportresponsebody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/reportresponsebody.md b/docs/sdk/models/operations/reportresponsebody.md new file mode 100644 index 00000000..e411dca6 --- /dev/null +++ b/docs/sdk/models/operations/reportresponsebody.md @@ -0,0 +1,26 @@ +# ReportResponseBody + +OK + +## Example Usage + +```typescript +import { ReportResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ReportResponseBody = { + mediaContainer: { + livetv: 7, + machineIdentifier: "0123456789abcdef0123456789abcdef012345678", + musicAnalysis: 2, + myPlexMappingState: "mapped", + myPlexSigninState: "ok", + offlineTranscode: 1, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.ReportMediaContainer](../../../sdk/models/operations/reportmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/reportstate.md b/docs/sdk/models/operations/reportstate.md new file mode 100644 index 00000000..2e1bb05a --- /dev/null +++ b/docs/sdk/models/operations/reportstate.md @@ -0,0 +1,20 @@ +# ReportState + +The current state of the media. + +## Example Usage + +```typescript +import { ReportState } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ReportState = ReportState.Playing; +``` + +## Values + +| Name | Value | +| ----------- | ----------- | +| `Stopped` | stopped | +| `Buffering` | buffering | +| `Playing` | playing | +| `Paused` | paused | \ No newline at end of file diff --git a/docs/sdk/models/operations/resetplayqueueglobals.md b/docs/sdk/models/operations/resetplayqueueglobals.md new file mode 100644 index 00000000..27434134 --- /dev/null +++ b/docs/sdk/models/operations/resetplayqueueglobals.md @@ -0,0 +1,35 @@ +# ResetPlayQueueGlobals + +## Example Usage + +```typescript +import { ResetPlayQueueGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ResetPlayQueueGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/resetplayqueuerequest.md b/docs/sdk/models/operations/resetplayqueuerequest.md new file mode 100644 index 00000000..39defe01 --- /dev/null +++ b/docs/sdk/models/operations/resetplayqueuerequest.md @@ -0,0 +1,27 @@ +# ResetPlayQueueRequest + +## Example Usage + +```typescript +import { ResetPlayQueueRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ResetPlayQueueRequest = { + playQueueId: 916973, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playQueueId` | *number* | :heavy_check_mark: | The ID of the play queue. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/resetplayqueueresponse.md b/docs/sdk/models/operations/resetplayqueueresponse.md new file mode 100644 index 00000000..1cb4ca2a --- /dev/null +++ b/docs/sdk/models/operations/resetplayqueueresponse.md @@ -0,0 +1,21 @@ +# ResetPlayQueueResponse + +## Example Usage + +```typescript +import { ResetPlayQueueResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ResetPlayQueueResponse = { + contentType: "", + statusCode: 901228, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithPlaylistMetadata` | [shared.MediaContainerWithPlaylistMetadata](../../../sdk/models/shared/mediacontainerwithplaylistmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/resetsectiondefaultsglobals.md b/docs/sdk/models/operations/resetsectiondefaultsglobals.md new file mode 100644 index 00000000..88db07ad --- /dev/null +++ b/docs/sdk/models/operations/resetsectiondefaultsglobals.md @@ -0,0 +1,35 @@ +# ResetSectionDefaultsGlobals + +## Example Usage + +```typescript +import { ResetSectionDefaultsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ResetSectionDefaultsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/resetsectiondefaultsrequest.md b/docs/sdk/models/operations/resetsectiondefaultsrequest.md new file mode 100644 index 00000000..801f3d6e --- /dev/null +++ b/docs/sdk/models/operations/resetsectiondefaultsrequest.md @@ -0,0 +1,27 @@ +# ResetSectionDefaultsRequest + +## Example Usage + +```typescript +import { ResetSectionDefaultsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ResetSectionDefaultsRequest = { + sectionId: 506157, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | The section ID for the hubs to reorder | | \ No newline at end of file diff --git a/docs/sdk/models/operations/resetsectiondefaultsresponse.md b/docs/sdk/models/operations/resetsectiondefaultsresponse.md new file mode 100644 index 00000000..dd8fa627 --- /dev/null +++ b/docs/sdk/models/operations/resetsectiondefaultsresponse.md @@ -0,0 +1,20 @@ +# ResetSectionDefaultsResponse + +## Example Usage + +```typescript +import { ResetSectionDefaultsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ResetSectionDefaultsResponse = { + contentType: "", + statusCode: 48571, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/responsebody.md b/docs/sdk/models/operations/responsebody.md deleted file mode 100644 index ea355efb..00000000 --- a/docs/sdk/models/operations/responsebody.md +++ /dev/null @@ -1,27 +0,0 @@ -# ResponseBody - -## Example Usage - -```typescript -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: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `identifier` | *string* | :heavy_check_mark: | N/A | tv.plex.sonos | -| `baseURL` | *string* | :heavy_check_mark: | N/A | https://sonos.plex.tv | -| `title` | *string* | :heavy_check_mark: | N/A | Sonos | -| `linkURL` | *string* | :heavy_check_mark: | N/A | https://sonos.plex.tv/link | -| `provides` | *string* | :heavy_check_mark: | N/A | client,player | -| `token` | *string* | :heavy_check_mark: | The plex authtoken used to identify with | | \ No newline at end of file diff --git a/docs/sdk/models/operations/restartprocessingdownloadqueueitemsglobals.md b/docs/sdk/models/operations/restartprocessingdownloadqueueitemsglobals.md new file mode 100644 index 00000000..ba170d27 --- /dev/null +++ b/docs/sdk/models/operations/restartprocessingdownloadqueueitemsglobals.md @@ -0,0 +1,35 @@ +# RestartProcessingDownloadQueueItemsGlobals + +## Example Usage + +```typescript +import { RestartProcessingDownloadQueueItemsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RestartProcessingDownloadQueueItemsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/restartprocessingdownloadqueueitemsrequest.md b/docs/sdk/models/operations/restartprocessingdownloadqueueitemsrequest.md new file mode 100644 index 00000000..a675ddae --- /dev/null +++ b/docs/sdk/models/operations/restartprocessingdownloadqueueitemsrequest.md @@ -0,0 +1,33 @@ +# RestartProcessingDownloadQueueItemsRequest + +## Example Usage + +```typescript +import { RestartProcessingDownloadQueueItemsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RestartProcessingDownloadQueueItemsRequest = { + queueId: 578962, + itemId: [ + 32, + 345, + 23, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `queueId` | *number* | :heavy_check_mark: | The queue id | | +| `itemId` | *number*[] | :heavy_check_mark: | The item ids | [
32,
345,
23
] | \ No newline at end of file diff --git a/docs/sdk/models/operations/restartprocessingdownloadqueueitemsresponse.md b/docs/sdk/models/operations/restartprocessingdownloadqueueitemsresponse.md new file mode 100644 index 00000000..c7f4e8c2 --- /dev/null +++ b/docs/sdk/models/operations/restartprocessingdownloadqueueitemsresponse.md @@ -0,0 +1,20 @@ +# RestartProcessingDownloadQueueItemsResponse + +## Example Usage + +```typescript +import { RestartProcessingDownloadQueueItemsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: RestartProcessingDownloadQueueItemsResponse = { + contentType: "", + statusCode: 706298, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/restricted.md b/docs/sdk/models/operations/restricted.md deleted file mode 100644 index f149001b..00000000 --- a/docs/sdk/models/operations/restricted.md +++ /dev/null @@ -1,18 +0,0 @@ -# Restricted - -Indicates if the user has restricted access. - -## Example Usage - -```typescript -import { Restricted } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Restricted = Restricted.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/role.md b/docs/sdk/models/operations/role.md deleted file mode 100644 index ebffde92..00000000 --- a/docs/sdk/models/operations/role.md +++ /dev/null @@ -1,28 +0,0 @@ -# Role - -## Example Usage - -```typescript -import { Role } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Role = { - id: 126522, - filter: "actor=126522", - tag: "Teller", - tagKey: "5d77683d85719b001f3a535e", - role: "Self - Judge", - thumb: - "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | The unique identifier for the role.
NOTE: This is different for each Plex server and is not globally unique.
| 126522 | -| `filter` | *string* | :heavy_check_mark: | The filter string used to query this actor. For example, it may indicate that this is an actor with a given key. | actor=126522 | -| `tag` | *string* | :heavy_check_mark: | The display tag for the actor (typically the actor's name). | Teller | -| `tagKey` | *string* | :heavy_check_mark: | A 24-character hexadecimal unique key associated with the actor's tag, used for internal identification.
NOTE: This is globally unique across all Plex Servers.
| 5d77683d85719b001f3a535e | -| `role` | *string* | :heavy_minus_sign: | The role played by the actor in the media item. | Self - Judge | -| `thumb` | *string* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the actor. | https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg | \ No newline at end of file diff --git a/docs/sdk/models/operations/scanglobals.md b/docs/sdk/models/operations/scanglobals.md new file mode 100644 index 00000000..4ef3f0ca --- /dev/null +++ b/docs/sdk/models/operations/scanglobals.md @@ -0,0 +1,35 @@ +# ScanGlobals + +## Example Usage + +```typescript +import { ScanGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ScanGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/scanrequest.md b/docs/sdk/models/operations/scanrequest.md new file mode 100644 index 00000000..f2387a8c --- /dev/null +++ b/docs/sdk/models/operations/scanrequest.md @@ -0,0 +1,29 @@ +# ScanRequest + +## Example Usage + +```typescript +import { ScanRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ScanRequest = { + deviceId: 137776, + source: "Cable", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `deviceId` | *number* | :heavy_check_mark: | The ID of the device. | | +| `source` | *string* | :heavy_minus_sign: | A valid source for the scan | Cable | \ No newline at end of file diff --git a/docs/sdk/models/operations/scanresponse.md b/docs/sdk/models/operations/scanresponse.md new file mode 100644 index 00000000..bdf424ff --- /dev/null +++ b/docs/sdk/models/operations/scanresponse.md @@ -0,0 +1,36 @@ +# ScanResponse + +## Example Usage + +```typescript +import { ScanResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ScanResponse = { + contentType: "", + statusCode: 173594, + headers: { + "key": [ + "", + "", + ], + "key1": [ + "", + ], + "key2": [ + "", + "", + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithDevice` | [shared.MediaContainerWithDevice](../../../sdk/models/shared/mediacontainerwithdevice.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/scope.md b/docs/sdk/models/operations/scope.md deleted file mode 100644 index 732bb304..00000000 --- a/docs/sdk/models/operations/scope.md +++ /dev/null @@ -1,17 +0,0 @@ -# Scope - -`all` - This is the only supported `scope` parameter. - -## Example Usage - -```typescript -import { Scope } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Scope = Scope.All; -``` - -## Values - -| Name | Value | -| ----- | ----- | -| `All` | all | \ No newline at end of file diff --git a/docs/sdk/models/operations/searchhubsglobals.md b/docs/sdk/models/operations/searchhubsglobals.md new file mode 100644 index 00000000..5f0beace --- /dev/null +++ b/docs/sdk/models/operations/searchhubsglobals.md @@ -0,0 +1,35 @@ +# SearchHubsGlobals + +## Example Usage + +```typescript +import { SearchHubsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SearchHubsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/searchhubsmediacontainer.md b/docs/sdk/models/operations/searchhubsmediacontainer.md new file mode 100644 index 00000000..4ce58698 --- /dev/null +++ b/docs/sdk/models/operations/searchhubsmediacontainer.md @@ -0,0 +1,187 @@ +# SearchHubsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { SearchHubsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SearchHubsMediaContainer = { + hub: [ + { + type: "track", + context: "hub.home.onDeck", + hubIdentifier: "home.onDeck", + key: "/hubs/sections/home/onDeck", + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + size: 1, + subtype: "podcast", + totalSize: 8, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `hub` | [shared.Hub](../../../sdk/models/shared/hub.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/searchhubsrequest.md b/docs/sdk/models/operations/searchhubsrequest.md new file mode 100644 index 00000000..db38cf75 --- /dev/null +++ b/docs/sdk/models/operations/searchhubsrequest.md @@ -0,0 +1,30 @@ +# SearchHubsRequest + +## Example Usage + +```typescript +import { SearchHubsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SearchHubsRequest = { + query: "", + sectionId: 1, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `query` | *string* | :heavy_check_mark: | The query term | | +| `sectionId` | *number* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs. | 1 | +| `limit` | *number* | :heavy_minus_sign: | The number of items to return per hub. 3 if not specified | | \ No newline at end of file diff --git a/docs/sdk/models/operations/searchhubsresponse.md b/docs/sdk/models/operations/searchhubsresponse.md new file mode 100644 index 00000000..69d13ed9 --- /dev/null +++ b/docs/sdk/models/operations/searchhubsresponse.md @@ -0,0 +1,23 @@ +# SearchHubsResponse + +## Example Usage + +```typescript +import { SearchHubsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SearchHubsResponse = { + contentType: "", + statusCode: 711471, + headers: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.SearchHubsResponseBody](../../../sdk/models/operations/searchhubsresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/searchhubsresponsebody.md b/docs/sdk/models/operations/searchhubsresponsebody.md new file mode 100644 index 00000000..6d06dd32 --- /dev/null +++ b/docs/sdk/models/operations/searchhubsresponsebody.md @@ -0,0 +1,183 @@ +# SearchHubsResponseBody + +OK + +## Example Usage + +```typescript +import { SearchHubsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SearchHubsResponseBody = { + mediaContainer: { + hub: [ + { + type: "track", + context: "hub.home.onDeck", + hubIdentifier: "home.onDeck", + key: "/hubs/sections/home/onDeck", + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: + "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + size: 1, + subtype: "podcast", + totalSize: 8, + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.SearchHubsMediaContainer](../../../sdk/models/operations/searchhubsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/searchresult.md b/docs/sdk/models/operations/searchresult.md deleted file mode 100644 index 64b5a007..00000000 --- a/docs/sdk/models/operations/searchresult.md +++ /dev/null @@ -1,209 +0,0 @@ -# SearchResult - -## Example Usage - -```typescript -import { - GetSearchAllLibrariesFlattenSeasons, - GetSearchAllLibrariesHasThumbnail, - GetSearchAllLibrariesLibraryType, - GetSearchAllLibrariesShowOrdering, - GetSearchAllLibrariesType, - SearchResult, -} from "@lukehagar/plexjs/sdk/models/operations"; -import { RFCDate } from "@lukehagar/plexjs/sdk/types"; - -let value: SearchResult = { - score: 0.92, - directory: { - key: "/library/sections/3/all?actor=197429", - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - librarySectionTitle: "Movies", - type: "tag", - id: 197429, - filter: "actor=197429", - tag: "Ben Stiller", - tagKey: "5d776826999c64001ec2c606", - thumb: - "https://metadata-static.plex.tv/5/people/57bd7c7d6c5c9e2881251b30e5603d3d.jpg", - count: 10, - }, - metadata: { - ratingKey: "58683", - key: "/library/metadata/58683", - guid: "plex://movie/5d7768ba96b655001fdc0408", - slug: "4-for-texas", - studio: "20th Century Studios", - type: GetSearchAllLibrariesType.Movie, - title: "Avatar: The Way of Water", - banner: "/library/metadata/58683/banner/1703239236", - titleSort: "Whale", - contentRating: "PG-13", - summary: - "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\n" - + "Once a familiar threat returns to finish what was previously started, Jake must\n" - + "work with Neytiri and the army of the Na'vi race to protect their home.\n" - + "", - rating: 7.6, - audienceRating: 9.2, - year: 2022, - tagline: "Return to Pandora.", - thumb: "/library/metadata/58683/thumb/1703239236", - art: "/library/metadata/58683/art/1703239236", - theme: "/library/metadata/1/theme/1705636920", - index: 1, - leafCount: 14, - viewedLeafCount: 0, - childCount: 1, - seasonCount: 2022, - duration: 11558112, - originallyAvailableAt: new RFCDate("2022-12-14"), - addedAt: 1556281940, - updatedAt: 1556281940, - parentYear: 2010, - audienceRatingImage: "rottentomatoes://image.rating.upright", - chapterSource: "media", - primaryExtraKey: "/library/metadata/58684", - originalTitle: "映画 ブラッククローバー 魔法帝の剣", - parentRatingKey: "66", - grandparentRatingKey: "66", - parentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentSlug: "alice-in-borderland-2020", - grandparentKey: "/library/metadata/66", - parentKey: "/library/metadata/66", - grandparentTitle: "Caprica", - grandparentThumb: "/library/metadata/66/thumb/1705716261", - grandparentTheme: "/library/metadata/66/theme/1705716261", - grandparentArt: "/library/metadata/66/art/1705716261", - parentTitle: "Caprica", - parentIndex: 1, - parentThumb: "/library/metadata/66/thumb/1705716261", - ratingImage: "rottentomatoes://image.rating.ripe", - viewCount: 1, - viewOffset: 5222500, - skipCount: 1, - subtype: "clip", - lastRatedAt: 1721813113, - createdAtAccuracy: "epoch,local", - createdAtTZOffset: "0", - lastViewedAt: 1682752242, - userRating: 10, - image: [ - { - alt: "Episode 1", - type: GetSearchAllLibrariesLibraryType.Background, - url: "/library/metadata/45521/thumb/1644710589", - }, - ], - ultraBlurColors: { - topLeft: "11333b", - topRight: "0a232d", - bottomRight: "73958", - bottomLeft: "1f5066", - }, - guids: [ - { - id: - "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}", - }, - ], - librarySectionID: 1, - librarySectionTitle: "Movies", - librarySectionKey: "/library/sections/1", - showOrdering: GetSearchAllLibrariesShowOrdering.TvdbAbsolute, - flattenSeasons: GetSearchAllLibrariesFlattenSeasons.Show, - skipChildren: false, - media: [ - { - id: 387322, - duration: 9610350, - bitrate: 25512, - width: 3840, - height: 1602, - aspectRatio: 2.35, - audioChannels: 6, - displayOffset: 50, - audioCodec: "aac", - videoCodec: "hevc", - videoResolution: "4k", - container: "mp4", - videoFrameRate: "24p", - videoProfile: "main 10", - hasVoiceActivity: false, - audioProfile: "dts", - has64bitOffsets: false, - part: [ - { - accessible: true, - exists: true, - id: 418385, - key: "/library/parts/418385/1735864239/file.mkv", - indexes: "sd", - duration: 9610350, - file: "/mnt/Movies_1/W/Wicked (2024).mkv", - size: 30649952104, - packetLength: 188, - container: "mkv", - videoProfile: "main 10", - audioProfile: "dts", - has64bitOffsets: false, - hasThumbnail: GetSearchAllLibrariesHasThumbnail.True, - }, - ], - }, - ], - genre: [ - { - id: 259, - tag: "Crime", - }, - ], - country: [ - { - id: 259, - tag: "United States of America", - }, - ], - director: [ - { - id: 126522, - tag: "Danny Boyle", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", - }, - ], - writer: [ - { - id: 126522, - tag: "Jamie P. Hanson", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", - }, - ], - role: [ - { - id: 126522, - tag: "Teller", - role: "Self - Judge", - thumb: - "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg", - }, - ], - location: [ - { - path: "/TV Shows/Clarkson's Farm", - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `score` | *number* | :heavy_check_mark: | The score of the search result, typically a float value between 0 and 1. | 0.92 | -| `directory` | [operations.GetSearchAllLibrariesDirectory](../../../sdk/models/operations/getsearchalllibrariesdirectory.md) | :heavy_minus_sign: | N/A | | -| `metadata` | [operations.GetSearchAllLibrariesMetadata](../../../sdk/models/operations/getsearchalllibrariesmetadata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/searchtypes.md b/docs/sdk/models/operations/searchtypes.md deleted file mode 100644 index dd2a7ac3..00000000 --- a/docs/sdk/models/operations/searchtypes.md +++ /dev/null @@ -1,22 +0,0 @@ -# SearchTypes - -## Example Usage - -```typescript -import { SearchTypes } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: SearchTypes = SearchTypes.Tv; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Movies` | movies | -| `Music` | music | -| `OtherVideos` | otherVideos | -| `People` | people | -| `Tv` | tv | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/server.md b/docs/sdk/models/operations/server.md deleted file mode 100644 index 8a60ab5a..00000000 --- a/docs/sdk/models/operations/server.md +++ /dev/null @@ -1,37 +0,0 @@ -# Server - -## Example Usage - -```typescript -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", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | N/A | iPad | -| `host` | *string* | :heavy_minus_sign: | N/A | 10.10.10.102 | -| `address` | *string* | :heavy_minus_sign: | N/A | 10.10.10.102 | -| `port` | *number* | :heavy_minus_sign: | N/A | 32500 | -| `machineIdentifier` | *string* | :heavy_minus_sign: | N/A | A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05 | -| `version` | *string* | :heavy_minus_sign: | N/A | 8.17 | -| `protocol` | *string* | :heavy_minus_sign: | N/A | plex | -| `product` | *string* | :heavy_minus_sign: | N/A | Plex for iOS | -| `deviceClass` | *string* | :heavy_minus_sign: | N/A | tablet | -| `protocolVersion` | *number* | :heavy_minus_sign: | N/A | 2 | -| `protocolCapabilities` | *string* | :heavy_minus_sign: | N/A | playback,playqueues,timeline,provider-playback | \ No newline at end of file diff --git a/docs/sdk/models/operations/services.md b/docs/sdk/models/operations/services.md deleted file mode 100644 index 69fdd8d1..00000000 --- a/docs/sdk/models/operations/services.md +++ /dev/null @@ -1,25 +0,0 @@ -# Services - -## Example Usage - -```typescript -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: 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.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 deleted file mode 100644 index 45a19405..00000000 --- a/docs/sdk/models/operations/session.md +++ /dev/null @@ -1,21 +0,0 @@ -# Session - -## Example Usage - -```typescript -import { Session } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Session = { - id: "93h7e00ncblxncqw9lkfaoxi", - bandwidth: 1050, - location: "lan", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | -| `id` | *string* | :heavy_minus_sign: | N/A | 93h7e00ncblxncqw9lkfaoxi | -| `bandwidth` | *number* | :heavy_minus_sign: | N/A | 1050 | -| `location` | *string* | :heavy_minus_sign: | N/A | lan | \ No newline at end of file diff --git a/docs/sdk/models/operations/setchannelmapchannelmapping.md b/docs/sdk/models/operations/setchannelmapchannelmapping.md new file mode 100644 index 00000000..6a022075 --- /dev/null +++ b/docs/sdk/models/operations/setchannelmapchannelmapping.md @@ -0,0 +1,16 @@ +# SetChannelmapChannelMapping + +The mapping of changes, passed as a map of device channel to lineup VCN. + +## Example Usage + +```typescript +import { SetChannelmapChannelMapping } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetChannelmapChannelMapping = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdk/models/operations/setchannelmapglobals.md b/docs/sdk/models/operations/setchannelmapglobals.md new file mode 100644 index 00000000..627183e8 --- /dev/null +++ b/docs/sdk/models/operations/setchannelmapglobals.md @@ -0,0 +1,35 @@ +# SetChannelmapGlobals + +## Example Usage + +```typescript +import { SetChannelmapGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetChannelmapGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/setchannelmaprequest.md b/docs/sdk/models/operations/setchannelmaprequest.md new file mode 100644 index 00000000..7c81d249 --- /dev/null +++ b/docs/sdk/models/operations/setchannelmaprequest.md @@ -0,0 +1,35 @@ +# SetChannelmapRequest + +## Example Usage + +```typescript +import { SetChannelmapRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetChannelmapRequest = { + deviceId: 185948, + channelMapping: {}, + channelMappingByKey: {}, + channelsEnabled: [ + "46.1,44.1,45.1", + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `deviceId` | *number* | :heavy_check_mark: | The ID of the device. | | +| `channelMapping` | [operations.SetChannelmapChannelMapping](../../../sdk/models/operations/setchannelmapchannelmapping.md) | :heavy_minus_sign: | The mapping of changes, passed as a map of device channel to lineup VCN. | {
"46.3": 2,
"48.9": 4
} | +| `channelMappingByKey` | [operations.ChannelMappingByKey](../../../sdk/models/operations/channelmappingbykey.md) | :heavy_minus_sign: | The mapping of changes, passed as a map of device channel to lineup key. | {
"46.3": "5cc83d73af4a72001e9b16d7-5cab3c634df507001fefcad0",
"48.9": "5cc83d73af4a72001e9b16d7-5cab3c63ec158a001d32db8d"
} | +| `channelsEnabled` | *string*[] | :heavy_minus_sign: | The channels which are enabled. | 46.1,44.1,45.1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/setchannelmapresponse.md b/docs/sdk/models/operations/setchannelmapresponse.md new file mode 100644 index 00000000..6d208133 --- /dev/null +++ b/docs/sdk/models/operations/setchannelmapresponse.md @@ -0,0 +1,21 @@ +# SetChannelmapResponse + +## Example Usage + +```typescript +import { SetChannelmapResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetChannelmapResponse = { + contentType: "", + statusCode: 721204, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithDevice` | [shared.MediaContainerWithDevice](../../../sdk/models/shared/mediacontainerwithdevice.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/setdevicepreferencesglobals.md b/docs/sdk/models/operations/setdevicepreferencesglobals.md new file mode 100644 index 00000000..44498cf5 --- /dev/null +++ b/docs/sdk/models/operations/setdevicepreferencesglobals.md @@ -0,0 +1,35 @@ +# SetDevicePreferencesGlobals + +## Example Usage + +```typescript +import { SetDevicePreferencesGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetDevicePreferencesGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/setdevicepreferencesrequest.md b/docs/sdk/models/operations/setdevicepreferencesrequest.md new file mode 100644 index 00000000..2baff2c2 --- /dev/null +++ b/docs/sdk/models/operations/setdevicepreferencesrequest.md @@ -0,0 +1,28 @@ +# SetDevicePreferencesRequest + +## Example Usage + +```typescript +import { SetDevicePreferencesRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetDevicePreferencesRequest = { + deviceId: 413939, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `deviceId` | *number* | :heavy_check_mark: | The ID of the device. | | +| `name` | *string* | :heavy_minus_sign: | The preference names and values. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/setdevicepreferencesresponse.md b/docs/sdk/models/operations/setdevicepreferencesresponse.md new file mode 100644 index 00000000..82c54dd4 --- /dev/null +++ b/docs/sdk/models/operations/setdevicepreferencesresponse.md @@ -0,0 +1,20 @@ +# SetDevicePreferencesResponse + +## Example Usage + +```typescript +import { SetDevicePreferencesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetDevicePreferencesResponse = { + contentType: "", + statusCode: 577724, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/setdvrpreferencesdvr.md b/docs/sdk/models/operations/setdvrpreferencesdvr.md new file mode 100644 index 00000000..490ed8df --- /dev/null +++ b/docs/sdk/models/operations/setdvrpreferencesdvr.md @@ -0,0 +1,19 @@ +# SetDVRPreferencesDVR + +## Example Usage + +```typescript +import { SetDVRPreferencesDVR } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetDVRPreferencesDVR = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `device` | [shared.Device](../../../sdk/models/shared/device.md)[] | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `language` | *string* | :heavy_minus_sign: | N/A | +| `lineup` | *string* | :heavy_minus_sign: | N/A | +| `uuid` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/setdvrpreferencesglobals.md b/docs/sdk/models/operations/setdvrpreferencesglobals.md new file mode 100644 index 00000000..274b9152 --- /dev/null +++ b/docs/sdk/models/operations/setdvrpreferencesglobals.md @@ -0,0 +1,35 @@ +# SetDVRPreferencesGlobals + +## Example Usage + +```typescript +import { SetDVRPreferencesGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetDVRPreferencesGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/setdvrpreferencesmediacontainer.md b/docs/sdk/models/operations/setdvrpreferencesmediacontainer.md new file mode 100644 index 00000000..2064c81f --- /dev/null +++ b/docs/sdk/models/operations/setdvrpreferencesmediacontainer.md @@ -0,0 +1,16 @@ +# SetDVRPreferencesMediaContainer + +## Example Usage + +```typescript +import { SetDVRPreferencesMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetDVRPreferencesMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.SetDVRPreferencesMediaContainerMediaContainer](../../../sdk/models/operations/setdvrpreferencesmediacontainermediacontainer.md) | :heavy_minus_sign: | N/A | +| `dvr` | [operations.SetDVRPreferencesDVR](../../../sdk/models/operations/setdvrpreferencesdvr.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/setdvrpreferencesmediacontainermediacontainer.md b/docs/sdk/models/operations/setdvrpreferencesmediacontainermediacontainer.md new file mode 100644 index 00000000..1acdfbdd --- /dev/null +++ b/docs/sdk/models/operations/setdvrpreferencesmediacontainermediacontainer.md @@ -0,0 +1,24 @@ +# SetDVRPreferencesMediaContainerMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { SetDVRPreferencesMediaContainerMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetDVRPreferencesMediaContainerMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `status` | *number* | :heavy_minus_sign: | A status indicator. If present and non-zero, indicates an error | \ No newline at end of file diff --git a/docs/sdk/models/operations/setdvrpreferencesrequest.md b/docs/sdk/models/operations/setdvrpreferencesrequest.md new file mode 100644 index 00000000..efb1efdf --- /dev/null +++ b/docs/sdk/models/operations/setdvrpreferencesrequest.md @@ -0,0 +1,28 @@ +# SetDVRPreferencesRequest + +## Example Usage + +```typescript +import { SetDVRPreferencesRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetDVRPreferencesRequest = { + dvrId: 740002, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `dvrId` | *number* | :heavy_check_mark: | The ID of the DVR. | | +| `name` | *string* | :heavy_minus_sign: | Set the `name` preference to the provided value | | \ No newline at end of file diff --git a/docs/sdk/models/operations/setdvrpreferencesresponse.md b/docs/sdk/models/operations/setdvrpreferencesresponse.md new file mode 100644 index 00000000..21dae05a --- /dev/null +++ b/docs/sdk/models/operations/setdvrpreferencesresponse.md @@ -0,0 +1,25 @@ +# SetDVRPreferencesResponse + +## Example Usage + +```typescript +import { SetDVRPreferencesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetDVRPreferencesResponse = { + contentType: "", + statusCode: 256366, + headers: { + "key": [], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.SetDVRPreferencesResponseBody](../../../sdk/models/operations/setdvrpreferencesresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/setdvrpreferencesresponsebody.md b/docs/sdk/models/operations/setdvrpreferencesresponsebody.md new file mode 100644 index 00000000..4bfeea43 --- /dev/null +++ b/docs/sdk/models/operations/setdvrpreferencesresponsebody.md @@ -0,0 +1,17 @@ +# SetDVRPreferencesResponseBody + +OK + +## Example Usage + +```typescript +import { SetDVRPreferencesResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetDVRPreferencesResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.SetDVRPreferencesMediaContainer](../../../sdk/models/operations/setdvrpreferencesmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/setitemartworkelement.md b/docs/sdk/models/operations/setitemartworkelement.md new file mode 100644 index 00000000..f6e2fd30 --- /dev/null +++ b/docs/sdk/models/operations/setitemartworkelement.md @@ -0,0 +1,20 @@ +# SetItemArtworkElement + +## Example Usage + +```typescript +import { SetItemArtworkElement } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetItemArtworkElement = SetItemArtworkElement.Banner; +``` + +## Values + +| Name | Value | +| ----------- | ----------- | +| `Thumb` | thumb | +| `Art` | art | +| `ClearLogo` | clearLogo | +| `Banner` | banner | +| `Poster` | poster | +| `Theme` | theme | \ No newline at end of file diff --git a/docs/sdk/models/operations/setitemartworkglobals.md b/docs/sdk/models/operations/setitemartworkglobals.md new file mode 100644 index 00000000..129b3938 --- /dev/null +++ b/docs/sdk/models/operations/setitemartworkglobals.md @@ -0,0 +1,35 @@ +# SetItemArtworkGlobals + +## Example Usage + +```typescript +import { SetItemArtworkGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetItemArtworkGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/setitemartworkrequest.md b/docs/sdk/models/operations/setitemartworkrequest.md new file mode 100644 index 00000000..e49e0852 --- /dev/null +++ b/docs/sdk/models/operations/setitemartworkrequest.md @@ -0,0 +1,30 @@ +# SetItemArtworkRequest + +## Example Usage + +```typescript +import { SetItemArtworkElement, SetItemArtworkRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetItemArtworkRequest = { + ids: "", + element: SetItemArtworkElement.Thumb, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `element` | [operations.SetItemArtworkElement](../../../sdk/models/operations/setitemartworkelement.md) | :heavy_check_mark: | N/A | | +| `url` | *string* | :heavy_minus_sign: | The url of the new asset. If not provided, the binary of the asset must be provided in the post body. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/setitemartworkresponse.md b/docs/sdk/models/operations/setitemartworkresponse.md new file mode 100644 index 00000000..45e36ca0 --- /dev/null +++ b/docs/sdk/models/operations/setitemartworkresponse.md @@ -0,0 +1,20 @@ +# SetItemArtworkResponse + +## Example Usage + +```typescript +import { SetItemArtworkResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetItemArtworkResponse = { + contentType: "", + statusCode: 728377, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/setitempreferencesargs.md b/docs/sdk/models/operations/setitempreferencesargs.md new file mode 100644 index 00000000..3cbaf5b7 --- /dev/null +++ b/docs/sdk/models/operations/setitempreferencesargs.md @@ -0,0 +1,14 @@ +# SetItemPreferencesArgs + +## Example Usage + +```typescript +import { SetItemPreferencesArgs } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetItemPreferencesArgs = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdk/models/operations/setitempreferencesglobals.md b/docs/sdk/models/operations/setitempreferencesglobals.md new file mode 100644 index 00000000..7f487fbf --- /dev/null +++ b/docs/sdk/models/operations/setitempreferencesglobals.md @@ -0,0 +1,35 @@ +# SetItemPreferencesGlobals + +## Example Usage + +```typescript +import { SetItemPreferencesGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetItemPreferencesGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/setitempreferencesrequest.md b/docs/sdk/models/operations/setitempreferencesrequest.md new file mode 100644 index 00000000..f137a341 --- /dev/null +++ b/docs/sdk/models/operations/setitempreferencesrequest.md @@ -0,0 +1,28 @@ +# SetItemPreferencesRequest + +## Example Usage + +```typescript +import { SetItemPreferencesRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetItemPreferencesRequest = { + ids: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `args` | [operations.SetItemPreferencesArgs](../../../sdk/models/operations/setitempreferencesargs.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/setitempreferencesresponse.md b/docs/sdk/models/operations/setitempreferencesresponse.md new file mode 100644 index 00000000..201f0ba4 --- /dev/null +++ b/docs/sdk/models/operations/setitempreferencesresponse.md @@ -0,0 +1,20 @@ +# SetItemPreferencesResponse + +## Example Usage + +```typescript +import { SetItemPreferencesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetItemPreferencesResponse = { + contentType: "", + statusCode: 170701, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/setpreferencesglobals.md b/docs/sdk/models/operations/setpreferencesglobals.md new file mode 100644 index 00000000..dfbe9c76 --- /dev/null +++ b/docs/sdk/models/operations/setpreferencesglobals.md @@ -0,0 +1,35 @@ +# SetPreferencesGlobals + +## Example Usage + +```typescript +import { SetPreferencesGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetPreferencesGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/setpreferencesprefs.md b/docs/sdk/models/operations/setpreferencesprefs.md new file mode 100644 index 00000000..81650a8c --- /dev/null +++ b/docs/sdk/models/operations/setpreferencesprefs.md @@ -0,0 +1,14 @@ +# SetPreferencesPrefs + +## Example Usage + +```typescript +import { SetPreferencesPrefs } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetPreferencesPrefs = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdk/models/operations/setpreferencesrequest.md b/docs/sdk/models/operations/setpreferencesrequest.md new file mode 100644 index 00000000..ac99d3d6 --- /dev/null +++ b/docs/sdk/models/operations/setpreferencesrequest.md @@ -0,0 +1,27 @@ +# SetPreferencesRequest + +## Example Usage + +```typescript +import { SetPreferencesRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetPreferencesRequest = { + prefs: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `prefs` | [operations.SetPreferencesPrefs](../../../sdk/models/operations/setpreferencesprefs.md) | :heavy_check_mark: | N/A | {
"FriendlyName": "My Server",
"ScheduledLibraryUpdateInterval": 3600,
"sendCrashReports": 1
} | \ No newline at end of file diff --git a/docs/sdk/models/operations/setpreferencesresponse.md b/docs/sdk/models/operations/setpreferencesresponse.md new file mode 100644 index 00000000..86ebac0b --- /dev/null +++ b/docs/sdk/models/operations/setpreferencesresponse.md @@ -0,0 +1,20 @@ +# SetPreferencesResponse + +## Example Usage + +```typescript +import { SetPreferencesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetPreferencesResponse = { + contentType: "", + statusCode: 741361, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/setratingglobals.md b/docs/sdk/models/operations/setratingglobals.md new file mode 100644 index 00000000..47557096 --- /dev/null +++ b/docs/sdk/models/operations/setratingglobals.md @@ -0,0 +1,35 @@ +# SetRatingGlobals + +## Example Usage + +```typescript +import { SetRatingGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetRatingGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/setratingrequest.md b/docs/sdk/models/operations/setratingrequest.md new file mode 100644 index 00000000..6022b6c3 --- /dev/null +++ b/docs/sdk/models/operations/setratingrequest.md @@ -0,0 +1,32 @@ +# SetRatingRequest + +## Example Usage + +```typescript +import { SetRatingRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetRatingRequest = { + identifier: "", + key: "", + rating: 8174.23, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `identifier` | *string* | :heavy_check_mark: | The identifier of the media provider containing the media to rate. Typically `com.plexapp.plugins.library` | | +| `key` | *string* | :heavy_check_mark: | The key of the item to rate. This is the `ratingKey` found in metadata items | | +| `rating` | *number* | :heavy_check_mark: | The rating to give the item. | | +| `ratedAt` | *number* | :heavy_minus_sign: | The time when the rating occurred. If not present, interpreted as now. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/setratingresponse.md b/docs/sdk/models/operations/setratingresponse.md new file mode 100644 index 00000000..853661b8 --- /dev/null +++ b/docs/sdk/models/operations/setratingresponse.md @@ -0,0 +1,20 @@ +# SetRatingResponse + +## Example Usage + +```typescript +import { SetRatingResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetRatingResponse = { + contentType: "", + statusCode: 437958, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/setsectionpreferencesglobals.md b/docs/sdk/models/operations/setsectionpreferencesglobals.md new file mode 100644 index 00000000..b5b0ffd7 --- /dev/null +++ b/docs/sdk/models/operations/setsectionpreferencesglobals.md @@ -0,0 +1,35 @@ +# SetSectionPreferencesGlobals + +## Example Usage + +```typescript +import { SetSectionPreferencesGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetSectionPreferencesGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/setsectionpreferencesprefs.md b/docs/sdk/models/operations/setsectionpreferencesprefs.md new file mode 100644 index 00000000..f775781b --- /dev/null +++ b/docs/sdk/models/operations/setsectionpreferencesprefs.md @@ -0,0 +1,14 @@ +# SetSectionPreferencesPrefs + +## Example Usage + +```typescript +import { SetSectionPreferencesPrefs } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetSectionPreferencesPrefs = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdk/models/operations/setsectionpreferencesrequest.md b/docs/sdk/models/operations/setsectionpreferencesrequest.md new file mode 100644 index 00000000..1933d1ee --- /dev/null +++ b/docs/sdk/models/operations/setsectionpreferencesrequest.md @@ -0,0 +1,29 @@ +# SetSectionPreferencesRequest + +## Example Usage + +```typescript +import { SetSectionPreferencesRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetSectionPreferencesRequest = { + sectionId: 607596, + prefs: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | +| `prefs` | [operations.SetSectionPreferencesPrefs](../../../sdk/models/operations/setsectionpreferencesprefs.md) | :heavy_check_mark: | N/A | {
"enableCinemaTrailers": 1,
"hidden": 0
} | \ No newline at end of file diff --git a/docs/sdk/models/operations/setsectionpreferencesresponse.md b/docs/sdk/models/operations/setsectionpreferencesresponse.md new file mode 100644 index 00000000..a1f6d772 --- /dev/null +++ b/docs/sdk/models/operations/setsectionpreferencesresponse.md @@ -0,0 +1,20 @@ +# SetSectionPreferencesResponse + +## Example Usage + +```typescript +import { SetSectionPreferencesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetSectionPreferencesResponse = { + contentType: "", + statusCode: 497170, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/setstreamoffsetglobals.md b/docs/sdk/models/operations/setstreamoffsetglobals.md new file mode 100644 index 00000000..67ad2fe3 --- /dev/null +++ b/docs/sdk/models/operations/setstreamoffsetglobals.md @@ -0,0 +1,35 @@ +# SetStreamOffsetGlobals + +## Example Usage + +```typescript +import { SetStreamOffsetGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetStreamOffsetGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/setstreamoffsetrequest.md b/docs/sdk/models/operations/setstreamoffsetrequest.md new file mode 100644 index 00000000..93932ff8 --- /dev/null +++ b/docs/sdk/models/operations/setstreamoffsetrequest.md @@ -0,0 +1,30 @@ +# SetStreamOffsetRequest + +## Example Usage + +```typescript +import { SetStreamOffsetRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetStreamOffsetRequest = { + streamId: 848059, + ext: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `streamId` | *number* | :heavy_check_mark: | The id of the stream | | +| `ext` | *string* | :heavy_check_mark: | This is not a part of this endpoint but documented here to satisfy OpenAPI | | +| `offset` | *number* | :heavy_minus_sign: | The offest in ms | | \ No newline at end of file diff --git a/docs/sdk/models/operations/setstreamoffsetresponse.md b/docs/sdk/models/operations/setstreamoffsetresponse.md new file mode 100644 index 00000000..7d927bbb --- /dev/null +++ b/docs/sdk/models/operations/setstreamoffsetresponse.md @@ -0,0 +1,20 @@ +# SetStreamOffsetResponse + +## Example Usage + +```typescript +import { SetStreamOffsetResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetStreamOffsetResponse = { + contentType: "", + statusCode: 15869, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/setstreamselectionglobals.md b/docs/sdk/models/operations/setstreamselectionglobals.md new file mode 100644 index 00000000..1cf51113 --- /dev/null +++ b/docs/sdk/models/operations/setstreamselectionglobals.md @@ -0,0 +1,35 @@ +# SetStreamSelectionGlobals + +## Example Usage + +```typescript +import { SetStreamSelectionGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetStreamSelectionGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/setstreamselectionrequest.md b/docs/sdk/models/operations/setstreamselectionrequest.md new file mode 100644 index 00000000..70b0026c --- /dev/null +++ b/docs/sdk/models/operations/setstreamselectionrequest.md @@ -0,0 +1,32 @@ +# SetStreamSelectionRequest + +## Example Usage + +```typescript +import { SetStreamSelectionRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: SetStreamSelectionRequest = { + partId: 960612, + allParts: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `partId` | *number* | :heavy_check_mark: | The id of the part to select streams on | | +| `audioStreamID` | *number* | :heavy_minus_sign: | The id of the audio stream to select in this part | | +| `subtitleStreamID` | *number* | :heavy_minus_sign: | The id of the subtitle stream to select in this part. Specify 0 to select no subtitle | | +| `allParts` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Perform the same for all parts of this media selecting similar streams in each | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/setstreamselectionresponse.md b/docs/sdk/models/operations/setstreamselectionresponse.md new file mode 100644 index 00000000..0b64ec45 --- /dev/null +++ b/docs/sdk/models/operations/setstreamselectionresponse.md @@ -0,0 +1,20 @@ +# SetStreamSelectionResponse + +## Example Usage + +```typescript +import { SetStreamSelectionResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SetStreamSelectionResponse = { + contentType: "", + statusCode: 519273, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/setting.md b/docs/sdk/models/operations/setting.md deleted file mode 100644 index 633ef26a..00000000 --- a/docs/sdk/models/operations/setting.md +++ /dev/null @@ -1,35 +0,0 @@ -# Setting - -## Example Usage - -```typescript -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", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | EnableDatabaseTrace | -| `label` | *string* | :heavy_minus_sign: | N/A | | -| `summary` | *string* | :heavy_minus_sign: | N/A | | -| `type` | *string* | :heavy_minus_sign: | N/A | bool | -| `default` | *boolean* | :heavy_minus_sign: | N/A | false | -| `value` | *boolean* | :heavy_minus_sign: | N/A | false | -| `hidden` | *boolean* | :heavy_minus_sign: | N/A | true | -| `advanced` | *boolean* | :heavy_minus_sign: | N/A | false | -| `group` | *string* | :heavy_minus_sign: | N/A | | -| `enumValues` | *string* | :heavy_minus_sign: | N/A | 1:admin only\|2:everyone | \ No newline at end of file diff --git a/docs/sdk/models/operations/sharedservers.md b/docs/sdk/models/operations/sharedservers.md deleted file mode 100644 index 56c4246a..00000000 --- a/docs/sdk/models/operations/sharedservers.md +++ /dev/null @@ -1,14 +0,0 @@ -# SharedServers - -## Example Usage - -```typescript -import { SharedServers } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: SharedServers = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdk/models/operations/sharedsources.md b/docs/sdk/models/operations/sharedsources.md deleted file mode 100644 index 12f2492b..00000000 --- a/docs/sdk/models/operations/sharedsources.md +++ /dev/null @@ -1,14 +0,0 @@ -# SharedSources - -## Example Usage - -```typescript -import { SharedSources } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: SharedSources = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdk/models/operations/showordering.md b/docs/sdk/models/operations/showordering.md deleted file mode 100644 index a3778816..00000000 --- a/docs/sdk/models/operations/showordering.md +++ /dev/null @@ -1,31 +0,0 @@ -# ShowOrdering - -Setting that indicates the episode ordering for the show. -Options: - - None = Library default - - tmdbAiring = The Movie Database (Aired) - - aired = TheTVDB (Aired) - - dvd = TheTVDB (DVD) - - absolute = TheTVDB (Absolute) - - -## Example Usage - -```typescript -import { ShowOrdering } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: ShowOrdering = ShowOrdering.TvdbAbsolute; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `None` | None | -| `TmdbAiring` | tmdbAiring | -| `TvdbAired` | aired | -| `TvdbDvd` | dvd | -| `TvdbAbsolute` | absolute | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/shuffleglobals.md b/docs/sdk/models/operations/shuffleglobals.md new file mode 100644 index 00000000..5c38537b --- /dev/null +++ b/docs/sdk/models/operations/shuffleglobals.md @@ -0,0 +1,35 @@ +# ShuffleGlobals + +## Example Usage + +```typescript +import { ShuffleGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ShuffleGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/shufflerequest.md b/docs/sdk/models/operations/shufflerequest.md new file mode 100644 index 00000000..4ab673e8 --- /dev/null +++ b/docs/sdk/models/operations/shufflerequest.md @@ -0,0 +1,27 @@ +# ShuffleRequest + +## Example Usage + +```typescript +import { ShuffleRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ShuffleRequest = { + playQueueId: 307817, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playQueueId` | *number* | :heavy_check_mark: | The ID of the play queue. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/shuffleresponse.md b/docs/sdk/models/operations/shuffleresponse.md new file mode 100644 index 00000000..f0d8bac5 --- /dev/null +++ b/docs/sdk/models/operations/shuffleresponse.md @@ -0,0 +1,21 @@ +# ShuffleResponse + +## Example Usage + +```typescript +import { ShuffleResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: ShuffleResponse = { + contentType: "", + statusCode: 852610, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithPlaylistMetadata` | [shared.MediaContainerWithPlaylistMetadata](../../../sdk/models/shared/mediacontainerwithplaylistmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/similar.md b/docs/sdk/models/operations/similar.md deleted file mode 100644 index 3277fb08..00000000 --- a/docs/sdk/models/operations/similar.md +++ /dev/null @@ -1,23 +0,0 @@ -# Similar - -The display tag for the similar item, typically the title. - -## Example Usage - -```typescript -import { Similar } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Similar = { - id: 259, - filter: "similar=259", - tag: "Criss Angel Mindfreak", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------- | --------------------- | --------------------- | --------------------- | --------------------- | -| `id` | *number* | :heavy_check_mark: | N/A | 259 | -| `filter` | *string* | :heavy_check_mark: | N/A | similar=259 | -| `tag` | *string* | :heavy_check_mark: | N/A | Criss Angel Mindfreak | \ No newline at end of file diff --git a/docs/sdk/models/operations/skip.md b/docs/sdk/models/operations/skip.md deleted file mode 100644 index 61385834..00000000 --- a/docs/sdk/models/operations/skip.md +++ /dev/null @@ -1,18 +0,0 @@ -# Skip - -Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. - -## Example Usage - -```typescript -import { Skip } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Skip = Skip.One; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/smart.md b/docs/sdk/models/operations/smart.md deleted file mode 100644 index cfaf9932..00000000 --- a/docs/sdk/models/operations/smart.md +++ /dev/null @@ -1,18 +0,0 @@ -# Smart - -whether the playlist is smart or not - -## Example Usage - -```typescript -import { Smart } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Smart = Smart.One; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/sort.md b/docs/sdk/models/operations/sort.md deleted file mode 100644 index 0c793c14..00000000 --- a/docs/sdk/models/operations/sort.md +++ /dev/null @@ -1,29 +0,0 @@ -# Sort - -## Example Usage - -```typescript -import { Sort } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Sort = { - default: "asc", - active: false, - descKey: "titleSort:desc", - firstCharacterKey: "/library/sections/2/firstCharacter", - key: "titleSort", - title: "Title", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `default` | *string* | :heavy_minus_sign: | N/A | asc | -| `active` | *boolean* | :heavy_minus_sign: | N/A | false | -| `activeDirection` | [operations.ActiveDirection](../../../sdk/models/operations/activedirection.md) | :heavy_minus_sign: | The direction of the sort. Can be either `asc` or `desc`.
| asc | -| `defaultDirection` | [operations.DefaultDirection](../../../sdk/models/operations/defaultdirection.md) | :heavy_minus_sign: | The direction of the sort. Can be either `asc` or `desc`.
| asc | -| `descKey` | *string* | :heavy_minus_sign: | N/A | titleSort:desc | -| `firstCharacterKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/2/firstCharacter | -| `key` | *string* | :heavy_check_mark: | N/A | titleSort | -| `title` | *string* | :heavy_check_mark: | N/A | Title | \ No newline at end of file diff --git a/docs/sdk/models/operations/splititemglobals.md b/docs/sdk/models/operations/splititemglobals.md new file mode 100644 index 00000000..18e714f5 --- /dev/null +++ b/docs/sdk/models/operations/splititemglobals.md @@ -0,0 +1,35 @@ +# SplitItemGlobals + +## Example Usage + +```typescript +import { SplitItemGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SplitItemGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/splititemrequest.md b/docs/sdk/models/operations/splititemrequest.md new file mode 100644 index 00000000..cea6f06b --- /dev/null +++ b/docs/sdk/models/operations/splititemrequest.md @@ -0,0 +1,27 @@ +# SplitItemRequest + +## Example Usage + +```typescript +import { SplitItemRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SplitItemRequest = { + ids: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/splititemresponse.md b/docs/sdk/models/operations/splititemresponse.md new file mode 100644 index 00000000..5e88b1be --- /dev/null +++ b/docs/sdk/models/operations/splititemresponse.md @@ -0,0 +1,20 @@ +# SplitItemResponse + +## Example Usage + +```typescript +import { SplitItemResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SplitItemResponse = { + contentType: "", + statusCode: 584929, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/startalltasksresponse.md b/docs/sdk/models/operations/startalltasksresponse.md deleted file mode 100644 index 6b718bc3..00000000 --- a/docs/sdk/models/operations/startalltasksresponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# StartAllTasksResponse - -## Example Usage - -```typescript -import { StartAllTasksResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: StartAllTasksResponse = { - contentType: "", - statusCode: 165987, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/startanalysisglobals.md b/docs/sdk/models/operations/startanalysisglobals.md new file mode 100644 index 00000000..7243b0be --- /dev/null +++ b/docs/sdk/models/operations/startanalysisglobals.md @@ -0,0 +1,35 @@ +# StartAnalysisGlobals + +## Example Usage + +```typescript +import { StartAnalysisGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: StartAnalysisGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/startanalysisrequest.md b/docs/sdk/models/operations/startanalysisrequest.md new file mode 100644 index 00000000..77b1cfe4 --- /dev/null +++ b/docs/sdk/models/operations/startanalysisrequest.md @@ -0,0 +1,27 @@ +# StartAnalysisRequest + +## Example Usage + +```typescript +import { StartAnalysisRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: StartAnalysisRequest = { + sectionId: 986000, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | Section identifier | | \ No newline at end of file diff --git a/docs/sdk/models/operations/startanalysisresponse.md b/docs/sdk/models/operations/startanalysisresponse.md new file mode 100644 index 00000000..5c24cdbd --- /dev/null +++ b/docs/sdk/models/operations/startanalysisresponse.md @@ -0,0 +1,20 @@ +# StartAnalysisResponse + +## Example Usage + +```typescript +import { StartAnalysisResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: StartAnalysisResponse = { + contentType: "", + statusCode: 509329, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/startbifgenerationglobals.md b/docs/sdk/models/operations/startbifgenerationglobals.md new file mode 100644 index 00000000..569006dd --- /dev/null +++ b/docs/sdk/models/operations/startbifgenerationglobals.md @@ -0,0 +1,35 @@ +# StartBifGenerationGlobals + +## Example Usage + +```typescript +import { StartBifGenerationGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: StartBifGenerationGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/startbifgenerationrequest.md b/docs/sdk/models/operations/startbifgenerationrequest.md new file mode 100644 index 00000000..6697bf2b --- /dev/null +++ b/docs/sdk/models/operations/startbifgenerationrequest.md @@ -0,0 +1,30 @@ +# StartBifGenerationRequest + +## Example Usage + +```typescript +import { StartBifGenerationRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: StartBifGenerationRequest = { + ids: "", + force: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `force` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/startbifgenerationresponse.md b/docs/sdk/models/operations/startbifgenerationresponse.md new file mode 100644 index 00000000..75d2d659 --- /dev/null +++ b/docs/sdk/models/operations/startbifgenerationresponse.md @@ -0,0 +1,20 @@ +# StartBifGenerationResponse + +## Example Usage + +```typescript +import { StartBifGenerationResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: StartBifGenerationResponse = { + contentType: "", + statusCode: 866355, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/starttaskglobals.md b/docs/sdk/models/operations/starttaskglobals.md new file mode 100644 index 00000000..036c6a4b --- /dev/null +++ b/docs/sdk/models/operations/starttaskglobals.md @@ -0,0 +1,35 @@ +# StartTaskGlobals + +## Example Usage + +```typescript +import { StartTaskGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: StartTaskGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/starttaskrequest.md b/docs/sdk/models/operations/starttaskrequest.md index e6139839..0a18e187 100644 --- a/docs/sdk/models/operations/starttaskrequest.md +++ b/docs/sdk/models/operations/starttaskrequest.md @@ -3,15 +3,25 @@ ## Example Usage ```typescript -import { StartTaskRequest, TaskName } from "@lukehagar/plexjs/sdk/models/operations"; +import { StartTaskRequest, StartTaskTask } from "@lukehagar/plexjs/sdk/models/operations"; let value: StartTaskRequest = { - taskName: TaskName.CheckForUpdates, + task: StartTaskTask.ButlerTaskGenerateIntroMarkers, }; ``` ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `taskName` | [operations.TaskName](../../../sdk/models/operations/taskname.md) | :heavy_check_mark: | the name of the task to be started. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `task` | [operations.StartTaskTask](../../../sdk/models/operations/starttasktask.md) | :heavy_check_mark: | The task name | | \ No newline at end of file diff --git a/docs/sdk/models/operations/starttasksresponse.md b/docs/sdk/models/operations/starttasksresponse.md new file mode 100644 index 00000000..4fbe2e17 --- /dev/null +++ b/docs/sdk/models/operations/starttasksresponse.md @@ -0,0 +1,20 @@ +# StartTasksResponse + +## Example Usage + +```typescript +import { StartTasksResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: StartTasksResponse = { + contentType: "", + statusCode: 538030, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/starttasktask.md b/docs/sdk/models/operations/starttasktask.md new file mode 100644 index 00000000..62b5cea7 --- /dev/null +++ b/docs/sdk/models/operations/starttasktask.md @@ -0,0 +1,38 @@ +# StartTaskTask + +The task name + +## Example Usage + +```typescript +import { StartTaskTask } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: StartTaskTask = StartTaskTask.GenerateBlurHashes; +``` + +## Values + +| Name | Value | +| ---------------------------------- | ---------------------------------- | +| `AutomaticUpdates` | AutomaticUpdates | +| `BackupDatabase` | BackupDatabase | +| `ButlerTaskGenerateAdMarkers` | ButlerTaskGenerateAdMarkers | +| `ButlerTaskGenerateCreditsMarkers` | ButlerTaskGenerateCreditsMarkers | +| `ButlerTaskGenerateIntroMarkers` | ButlerTaskGenerateIntroMarkers | +| `ButlerTaskGenerateVoiceActivity` | ButlerTaskGenerateVoiceActivity | +| `CleanOldBundles` | CleanOldBundles | +| `CleanOldCacheFiles` | CleanOldCacheFiles | +| `DeepMediaAnalysis` | DeepMediaAnalysis | +| `GarbageCollectBlobs` | GarbageCollectBlobs | +| `GarbageCollectLibraryMedia` | GarbageCollectLibraryMedia | +| `GenerateBlurHashes` | GenerateBlurHashes | +| `GenerateChapterThumbs` | GenerateChapterThumbs | +| `GenerateMediaIndexFiles` | GenerateMediaIndexFiles | +| `LoudnessAnalysis` | LoudnessAnalysis | +| `MusicAnalysis` | MusicAnalysis | +| `OptimizeDatabase` | OptimizeDatabase | +| `RefreshEpgGuides` | RefreshEpgGuides | +| `RefreshLibraries` | RefreshLibraries | +| `RefreshLocalMedia` | RefreshLocalMedia | +| `RefreshPeriodicMetadata` | RefreshPeriodicMetadata | +| `UpgradeMediaAnalysis` | UpgradeMediaAnalysis | \ No newline at end of file diff --git a/docs/sdk/models/operations/starttranscodesessionglobals.md b/docs/sdk/models/operations/starttranscodesessionglobals.md new file mode 100644 index 00000000..611c25e8 --- /dev/null +++ b/docs/sdk/models/operations/starttranscodesessionglobals.md @@ -0,0 +1,35 @@ +# StartTranscodeSessionGlobals + +## Example Usage + +```typescript +import { StartTranscodeSessionGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: StartTranscodeSessionGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/starttranscodesessionlocation.md b/docs/sdk/models/operations/starttranscodesessionlocation.md new file mode 100644 index 00000000..d46bf9f2 --- /dev/null +++ b/docs/sdk/models/operations/starttranscodesessionlocation.md @@ -0,0 +1,19 @@ +# StartTranscodeSessionLocation + +Network type of the client, can be used to help determine target bitrate. + +## Example Usage + +```typescript +import { StartTranscodeSessionLocation } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: StartTranscodeSessionLocation = StartTranscodeSessionLocation.Wan; +``` + +## Values + +| Name | Value | +| ---------- | ---------- | +| `Lan` | lan | +| `Wan` | wan | +| `Cellular` | cellular | \ No newline at end of file diff --git a/docs/sdk/models/operations/starttranscodesessionprotocol.md b/docs/sdk/models/operations/starttranscodesessionprotocol.md new file mode 100644 index 00000000..0e1cdc97 --- /dev/null +++ b/docs/sdk/models/operations/starttranscodesessionprotocol.md @@ -0,0 +1,20 @@ +# StartTranscodeSessionProtocol + +Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + + +## Example Usage + +```typescript +import { StartTranscodeSessionProtocol } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: StartTranscodeSessionProtocol = StartTranscodeSessionProtocol.Dash; +``` + +## Values + +| Name | Value | +| ------ | ------ | +| `Http` | http | +| `Hls` | hls | +| `Dash` | dash | \ No newline at end of file diff --git a/docs/sdk/models/operations/starttranscodesessionrequest.md b/docs/sdk/models/operations/starttranscodesessionrequest.md new file mode 100644 index 00000000..3103af57 --- /dev/null +++ b/docs/sdk/models/operations/starttranscodesessionrequest.md @@ -0,0 +1,95 @@ +# StartTranscodeSessionRequest + +## Example Usage + +```typescript +import { + Extension, + StartTranscodeSessionLocation, + StartTranscodeSessionProtocol, + StartTranscodeSessionRequest, + StartTranscodeSessionSubtitles, +} from "@lukehagar/plexjs/sdk/models/operations"; +import { AdvancedSubtitles, BoolInt, TranscodeType } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: StartTranscodeSessionRequest = { + transcodeType: TranscodeType.Video, + extension: Extension.M3u8, + advancedSubtitles: AdvancedSubtitles.Burn, + audioBoost: 50, + audioChannelCount: 5, + autoAdjustQuality: BoolInt.One, + autoAdjustSubtitle: BoolInt.One, + directPlay: BoolInt.One, + directStream: BoolInt.One, + directStreamAudio: BoolInt.One, + disableResolutionRotation: BoolInt.One, + hasMDE: BoolInt.One, + location: StartTranscodeSessionLocation.Wan, + mediaBufferSize: 102400, + mediaIndex: 0, + musicBitrate: 5000, + offset: 90.5, + partIndex: 0, + path: "/library/metadata/151671", + peakBitrate: 12000, + photoResolution: "1080x1080", + protocol: StartTranscodeSessionProtocol.Dash, + secondsPerSegment: 5, + subtitleSize: 50, + subtitles: StartTranscodeSessionSubtitles.Segmented, + videoBitrate: 12000, + videoQuality: 50, + videoResolution: "1080x1080", + xPlexClientProfileExtra: + "add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)", + xPlexClientProfileName: "generic", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `transcodeType` | [shared.TranscodeType](../../../sdk/models/shared/transcodetype.md) | :heavy_check_mark: | Type of transcode media | | +| `transcodeSessionId` | *string* | :heavy_minus_sign: | Transcode session UUID | | +| `extension` | [operations.Extension](../../../sdk/models/operations/extension.md) | :heavy_check_mark: | Extension
| | +| `advancedSubtitles` | [shared.AdvancedSubtitles](../../../sdk/models/shared/advancedsubtitles.md) | :heavy_minus_sign: | Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost
| burn | +| `audioBoost` | *number* | :heavy_minus_sign: | Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) | 50 | +| `audioChannelCount` | *number* | :heavy_minus_sign: | Target video number of audio channels. | 5 | +| `autoAdjustQuality` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates the client supports ABR. | 1 | +| `autoAdjustSubtitle` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates if the server should adjust subtitles based on Voice Activity Data. | 1 | +| `directPlay` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates the client supports direct playing the indicated content. | 1 | +| `directStream` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates the client supports direct streaming the video of the indicated content. | 1 | +| `directStreamAudio` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates the client supports direct streaming the audio of the indicated content. | 1 | +| `disableResolutionRotation` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates if resolution should be adjusted for orientation. | 1 | +| `hasMDE` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 | 1 | +| `location` | [operations.StartTranscodeSessionLocation](../../../sdk/models/operations/starttranscodesessionlocation.md) | :heavy_minus_sign: | Network type of the client, can be used to help determine target bitrate. | wan | +| `mediaBufferSize` | *number* | :heavy_minus_sign: | Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. | 102400 | +| `mediaIndex` | *number* | :heavy_minus_sign: | Index of the media to transcode. -1 or not specified indicates let the server choose. | 0 | +| `musicBitrate` | *number* | :heavy_minus_sign: | Target bitrate for audio only files (in kbps, used to transcode). | 5000 | +| `offset` | *number* | :heavy_minus_sign: | Offset from the start of the media (in seconds). | 90.5 | +| `partIndex` | *number* | :heavy_minus_sign: | Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode | 0 | +| `path` | *string* | :heavy_minus_sign: | Internal PMS path of the media to transcode. | /library/metadata/151671 | +| `peakBitrate` | *number* | :heavy_minus_sign: | Maximum bitrate (in kbps) to use in ABR. | 12000 | +| `photoResolution` | *string* | :heavy_minus_sign: | Target photo resolution. | 1080x1080 | +| `protocol` | [operations.StartTranscodeSessionProtocol](../../../sdk/models/operations/starttranscodesessionprotocol.md) | :heavy_minus_sign: | Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022)
| dash | +| `secondsPerSegment` | *number* | :heavy_minus_sign: | Number of seconds to include in each transcoded segment | 5 | +| `subtitleSize` | *number* | :heavy_minus_sign: | Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) | 50 | +| `subtitles` | [operations.StartTranscodeSessionSubtitles](../../../sdk/models/operations/starttranscodesessionsubtitles.md) | :heavy_minus_sign: | Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream
| Burn | +| `videoBitrate` | *number* | :heavy_minus_sign: | Target video bitrate (in kbps). | 12000 | +| `videoQuality` | *number* | :heavy_minus_sign: | Target photo quality. | 50 | +| `videoResolution` | *string* | :heavy_minus_sign: | Target maximum video resolution. | 1080x1080 | +| `xPlexClientProfileExtra` | *string* | :heavy_minus_sign: | See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . | add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash) | +| `xPlexClientProfileName` | *string* | :heavy_minus_sign: | Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. | generic | +| `xPlexSessionIdentifier` | *string* | :heavy_minus_sign: | Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) | | \ No newline at end of file diff --git a/docs/sdk/models/operations/starttranscodesessionresponse.md b/docs/sdk/models/operations/starttranscodesessionresponse.md new file mode 100644 index 00000000..256da19d --- /dev/null +++ b/docs/sdk/models/operations/starttranscodesessionresponse.md @@ -0,0 +1,18 @@ +# StartTranscodeSessionResponse + +## Example Usage + +```typescript +import { StartTranscodeSessionResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `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 | +| `responseStream` | *ReadableStream* | :heavy_minus_sign: | MPD file (see ISO/IEC 23009-1:2022), m3u8 file (see RFC 8216), or binary http stream | \ No newline at end of file diff --git a/docs/sdk/models/operations/starttranscodesessionsubtitles.md b/docs/sdk/models/operations/starttranscodesessionsubtitles.md new file mode 100644 index 00000000..a67c5da6 --- /dev/null +++ b/docs/sdk/models/operations/starttranscodesessionsubtitles.md @@ -0,0 +1,25 @@ +# StartTranscodeSessionSubtitles + +Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + + +## Example Usage + +```typescript +import { StartTranscodeSessionSubtitles } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: StartTranscodeSessionSubtitles = + StartTranscodeSessionSubtitles.Segmented; +``` + +## Values + +| Name | Value | +| ----------- | ----------- | +| `Auto` | auto | +| `Burn` | burn | +| `None` | none | +| `Sidecar` | sidecar | +| `Embedded` | embedded | +| `Segmented` | segmented | +| `Unknown` | unknown | \ No newline at end of file diff --git a/docs/sdk/models/operations/startuniversaltranscoderequest.md b/docs/sdk/models/operations/startuniversaltranscoderequest.md deleted file mode 100644 index ee359105..00000000 --- a/docs/sdk/models/operations/startuniversaltranscoderequest.md +++ /dev/null @@ -1,47 +0,0 @@ -# StartUniversalTranscodeRequest - -## Example Usage - -```typescript -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, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| `hasMDE` | *number* | :heavy_check_mark: | Whether the media item has MDE | 1 | -| `path` | *string* | :heavy_check_mark: | The path to the media item to transcode | /library/metadata/23409 | -| `mediaIndex` | *number* | :heavy_check_mark: | The index of the media item to transcode | 0 | -| `partIndex` | *number* | :heavy_check_mark: | The index of the part to transcode | 0 | -| `protocol` | *string* | :heavy_check_mark: | The protocol to use for the transcode session | hls | -| `fastSeek` | *number* | :heavy_minus_sign: | Whether to use fast seek or not | 0 | -| `directPlay` | *number* | :heavy_minus_sign: | Whether to use direct play or not | 0 | -| `directStream` | *number* | :heavy_minus_sign: | Whether to use direct stream or not | 0 | -| `subtitleSize` | *number* | :heavy_minus_sign: | The size of the subtitles | 100 | -| `subtites` | *string* | :heavy_minus_sign: | The subtitles | burn | -| `audioBoost` | *number* | :heavy_minus_sign: | The audio boost | 100 | -| `location` | *string* | :heavy_minus_sign: | The location of the transcode session | lan | -| `mediaBufferSize` | *number* | :heavy_minus_sign: | The size of the media buffer | 102400 | -| `session` | *string* | :heavy_minus_sign: | The session ID | zvcage8b7rkioqcm8f4uns4c | -| `addDebugOverlay` | *number* | :heavy_minus_sign: | Whether to add a debug overlay or not | 0 | -| `autoAdjustQuality` | *number* | :heavy_minus_sign: | Whether to auto adjust quality or not | 0 | \ No newline at end of file diff --git a/docs/sdk/models/operations/startuniversaltranscoderesponse.md b/docs/sdk/models/operations/startuniversaltranscoderesponse.md deleted file mode 100644 index 94236fbf..00000000 --- a/docs/sdk/models/operations/startuniversaltranscoderesponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# StartUniversalTranscodeResponse - -## Example Usage - -```typescript -import { StartUniversalTranscodeResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: StartUniversalTranscodeResponse = { - contentType: "", - statusCode: 708111, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/state.md b/docs/sdk/models/operations/state.md deleted file mode 100644 index e43155d9..00000000 --- a/docs/sdk/models/operations/state.md +++ /dev/null @@ -1,22 +0,0 @@ -# State - -The state of the media item - -## Example Usage - -```typescript -import { State } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: State = State.Playing; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Playing` | playing | -| `Paused` | paused | -| `Stopped` | stopped | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/statisticsbandwidth.md b/docs/sdk/models/operations/statisticsbandwidth.md deleted file mode 100644 index e25ff6e8..00000000 --- a/docs/sdk/models/operations/statisticsbandwidth.md +++ /dev/null @@ -1,27 +0,0 @@ -# StatisticsBandwidth - -## Example Usage - -```typescript -import { StatisticsBandwidth } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: StatisticsBandwidth = { - accountID: 238960586, - deviceID: 208, - timespan: 6, - at: 1718387650, - lan: true, - bytes: 22, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `accountID` | *number* | :heavy_minus_sign: | N/A | 238960586 | -| `deviceID` | *number* | :heavy_minus_sign: | N/A | 208 | -| `timespan` | *number* | :heavy_minus_sign: | N/A | 6 | -| `at` | *number* | :heavy_minus_sign: | N/A | 1718387650 | -| `lan` | *boolean* | :heavy_minus_sign: | N/A | true | -| `bytes` | *number* | :heavy_minus_sign: | N/A | 22 | \ No newline at end of file diff --git a/docs/sdk/models/operations/statisticsmedia.md b/docs/sdk/models/operations/statisticsmedia.md deleted file mode 100644 index a46b580e..00000000 --- a/docs/sdk/models/operations/statisticsmedia.md +++ /dev/null @@ -1,29 +0,0 @@ -# StatisticsMedia - -## Example Usage - -```typescript -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, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `accountID` | *number* | :heavy_minus_sign: | N/A | 1 | -| `deviceID` | *number* | :heavy_minus_sign: | N/A | 13 | -| `timespan` | *number* | :heavy_minus_sign: | N/A | 4 | -| `at` | *number* | :heavy_minus_sign: | N/A | 1707141600 | -| `metadataType` | *number* | :heavy_minus_sign: | N/A | 4 | -| `count` | *number* | :heavy_minus_sign: | N/A | 1 | -| `duration` | *number* | :heavy_minus_sign: | N/A | 1555 | \ No newline at end of file diff --git a/docs/sdk/models/operations/statisticsresources.md b/docs/sdk/models/operations/statisticsresources.md deleted file mode 100644 index ec98ac8b..00000000 --- a/docs/sdk/models/operations/statisticsresources.md +++ /dev/null @@ -1,27 +0,0 @@ -# StatisticsResources - -## Example Usage - -```typescript -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, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------- | -------------------------- | -------------------------- | -------------------------- | -------------------------- | -| `timespan` | *number* | :heavy_minus_sign: | N/A | 6 | -| `at` | *number* | :heavy_minus_sign: | N/A | 1718384427 | -| `hostCpuUtilization` | *number* | :heavy_minus_sign: | N/A | 1.276 | -| `processCpuUtilization` | *number* | :heavy_minus_sign: | N/A | 0.025 | -| `hostMemoryUtilization` | *number* | :heavy_minus_sign: | N/A | 17.026 | -| `processMemoryUtilization` | *number* | :heavy_minus_sign: | N/A | 0.493 | \ No newline at end of file diff --git a/docs/sdk/models/operations/status.md b/docs/sdk/models/operations/status.md deleted file mode 100644 index a1f666da..00000000 --- a/docs/sdk/models/operations/status.md +++ /dev/null @@ -1,20 +0,0 @@ -# Status - -Current friend request status - -## Example Usage - -```typescript -import { Status } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Status = Status.Accepted; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Accepted` | accepted | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/stopallrefreshesresponse.md b/docs/sdk/models/operations/stopallrefreshesresponse.md new file mode 100644 index 00000000..e5e98437 --- /dev/null +++ b/docs/sdk/models/operations/stopallrefreshesresponse.md @@ -0,0 +1,21 @@ +# StopAllRefreshesResponse + +## Example Usage + +```typescript +import { StopAllRefreshesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: StopAllRefreshesResponse = { + contentType: "", + statusCode: 882197, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `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 | +| `requestHandlerSlashGetResponses200` | [shared.RequestHandlerSlashGetResponses200](../../../sdk/models/shared/requesthandlerslashgetresponses200.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/stopalltasksresponse.md b/docs/sdk/models/operations/stopalltasksresponse.md deleted file mode 100644 index 7bc6c648..00000000 --- a/docs/sdk/models/operations/stopalltasksresponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# StopAllTasksResponse - -## Example Usage - -```typescript -import { StopAllTasksResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: StopAllTasksResponse = { - contentType: "", - statusCode: 641040, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/stopdvrreloadglobals.md b/docs/sdk/models/operations/stopdvrreloadglobals.md new file mode 100644 index 00000000..f5d6f0e9 --- /dev/null +++ b/docs/sdk/models/operations/stopdvrreloadglobals.md @@ -0,0 +1,35 @@ +# StopDVRReloadGlobals + +## Example Usage + +```typescript +import { StopDVRReloadGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: StopDVRReloadGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/stopdvrreloadrequest.md b/docs/sdk/models/operations/stopdvrreloadrequest.md new file mode 100644 index 00000000..67751379 --- /dev/null +++ b/docs/sdk/models/operations/stopdvrreloadrequest.md @@ -0,0 +1,27 @@ +# StopDVRReloadRequest + +## Example Usage + +```typescript +import { StopDVRReloadRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: StopDVRReloadRequest = { + dvrId: 243259, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `dvrId` | *number* | :heavy_check_mark: | The ID of the DVR. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/stopdvrreloadresponse.md b/docs/sdk/models/operations/stopdvrreloadresponse.md new file mode 100644 index 00000000..7bec2441 --- /dev/null +++ b/docs/sdk/models/operations/stopdvrreloadresponse.md @@ -0,0 +1,20 @@ +# StopDVRReloadResponse + +## Example Usage + +```typescript +import { StopDVRReloadResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: StopDVRReloadResponse = { + contentType: "", + statusCode: 71569, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/stopscanglobals.md b/docs/sdk/models/operations/stopscanglobals.md new file mode 100644 index 00000000..46c78d2a --- /dev/null +++ b/docs/sdk/models/operations/stopscanglobals.md @@ -0,0 +1,35 @@ +# StopScanGlobals + +## Example Usage + +```typescript +import { StopScanGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: StopScanGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/stopscanrequest.md b/docs/sdk/models/operations/stopscanrequest.md new file mode 100644 index 00000000..ce7713a8 --- /dev/null +++ b/docs/sdk/models/operations/stopscanrequest.md @@ -0,0 +1,27 @@ +# StopScanRequest + +## Example Usage + +```typescript +import { StopScanRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: StopScanRequest = { + deviceId: 972435, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `deviceId` | *number* | :heavy_check_mark: | The ID of the device. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/stopscanresponse.md b/docs/sdk/models/operations/stopscanresponse.md new file mode 100644 index 00000000..c4a1d614 --- /dev/null +++ b/docs/sdk/models/operations/stopscanresponse.md @@ -0,0 +1,21 @@ +# StopScanResponse + +## Example Usage + +```typescript +import { StopScanResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: StopScanResponse = { + contentType: "", + statusCode: 263501, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithDevice` | [shared.MediaContainerWithDevice](../../../sdk/models/shared/mediacontainerwithdevice.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/stoptaskglobals.md b/docs/sdk/models/operations/stoptaskglobals.md new file mode 100644 index 00000000..56493fe7 --- /dev/null +++ b/docs/sdk/models/operations/stoptaskglobals.md @@ -0,0 +1,35 @@ +# StopTaskGlobals + +## Example Usage + +```typescript +import { StopTaskGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: StopTaskGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/stoptaskrequest.md b/docs/sdk/models/operations/stoptaskrequest.md index 9db8d986..7c0bd77c 100644 --- a/docs/sdk/models/operations/stoptaskrequest.md +++ b/docs/sdk/models/operations/stoptaskrequest.md @@ -3,15 +3,25 @@ ## Example Usage ```typescript -import { PathParamTaskName, StopTaskRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { StopTaskRequest, StopTaskTask } from "@lukehagar/plexjs/sdk/models/operations"; let value: StopTaskRequest = { - taskName: PathParamTaskName.RefreshPeriodicMetadata, + task: StopTaskTask.RefreshPeriodicMetadata, }; ``` ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `taskName` | [operations.PathParamTaskName](../../../sdk/models/operations/pathparamtaskname.md) | :heavy_check_mark: | The name of the task to be started. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `task` | [operations.StopTaskTask](../../../sdk/models/operations/stoptasktask.md) | :heavy_check_mark: | The task name | | \ No newline at end of file diff --git a/docs/sdk/models/operations/stoptasksresponse.md b/docs/sdk/models/operations/stoptasksresponse.md new file mode 100644 index 00000000..d6356a78 --- /dev/null +++ b/docs/sdk/models/operations/stoptasksresponse.md @@ -0,0 +1,20 @@ +# StopTasksResponse + +## Example Usage + +```typescript +import { StopTasksResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: StopTasksResponse = { + contentType: "", + statusCode: 469358, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/stoptasktask.md b/docs/sdk/models/operations/stoptasktask.md new file mode 100644 index 00000000..4617193b --- /dev/null +++ b/docs/sdk/models/operations/stoptasktask.md @@ -0,0 +1,38 @@ +# StopTaskTask + +The task name + +## Example Usage + +```typescript +import { StopTaskTask } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: StopTaskTask = StopTaskTask.RefreshLibraries; +``` + +## Values + +| Name | Value | +| ---------------------------------- | ---------------------------------- | +| `AutomaticUpdates` | AutomaticUpdates | +| `BackupDatabase` | BackupDatabase | +| `ButlerTaskGenerateAdMarkers` | ButlerTaskGenerateAdMarkers | +| `ButlerTaskGenerateCreditsMarkers` | ButlerTaskGenerateCreditsMarkers | +| `ButlerTaskGenerateIntroMarkers` | ButlerTaskGenerateIntroMarkers | +| `ButlerTaskGenerateVoiceActivity` | ButlerTaskGenerateVoiceActivity | +| `CleanOldBundles` | CleanOldBundles | +| `CleanOldCacheFiles` | CleanOldCacheFiles | +| `DeepMediaAnalysis` | DeepMediaAnalysis | +| `GarbageCollectBlobs` | GarbageCollectBlobs | +| `GarbageCollectLibraryMedia` | GarbageCollectLibraryMedia | +| `GenerateBlurHashes` | GenerateBlurHashes | +| `GenerateChapterThumbs` | GenerateChapterThumbs | +| `GenerateMediaIndexFiles` | GenerateMediaIndexFiles | +| `LoudnessAnalysis` | LoudnessAnalysis | +| `MusicAnalysis` | MusicAnalysis | +| `OptimizeDatabase` | OptimizeDatabase | +| `RefreshEpgGuides` | RefreshEpgGuides | +| `RefreshLibraries` | RefreshLibraries | +| `RefreshLocalMedia` | RefreshLocalMedia | +| `RefreshPeriodicMetadata` | RefreshPeriodicMetadata | +| `UpgradeMediaAnalysis` | UpgradeMediaAnalysis | \ No newline at end of file diff --git a/docs/sdk/models/operations/stoptranscodesessionrequest.md b/docs/sdk/models/operations/stoptranscodesessionrequest.md deleted file mode 100644 index ad9600cb..00000000 --- a/docs/sdk/models/operations/stoptranscodesessionrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# StopTranscodeSessionRequest - -## Example Usage - -```typescript -import { StopTranscodeSessionRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: StopTranscodeSessionRequest = { - sessionKey: "zz7llzqlx8w9vnrsbnwhbmep", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `sessionKey` | *string* | :heavy_check_mark: | the Key of the transcode session to stop | zz7llzqlx8w9vnrsbnwhbmep | \ No newline at end of file diff --git a/docs/sdk/models/operations/stoptranscodesessionresponse.md b/docs/sdk/models/operations/stoptranscodesessionresponse.md deleted file mode 100644 index 50054a6f..00000000 --- a/docs/sdk/models/operations/stoptranscodesessionresponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# StopTranscodeSessionResponse - -## Example Usage - -```typescript -import { StopTranscodeSessionResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: StopTranscodeSessionResponse = { - contentType: "", - statusCode: 527, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/stream.md b/docs/sdk/models/operations/stream.md deleted file mode 100644 index 3a2975aa..00000000 --- a/docs/sdk/models/operations/stream.md +++ /dev/null @@ -1,116 +0,0 @@ -# Stream - -## Example Usage - -```typescript -import { Stream } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Stream = { - id: 1002625, - format: "srt", - default: true, - codec: "hevc", - index: 0, - bitrate: 24743, - language: "English", - languageTag: "en", - languageCode: "eng", - headerCompression: true, - doviblCompatID: 1, - doviblPresent: true, - dovielPresent: false, - doviLevel: 6, - doviPresent: true, - doviProfile: 8, - dovirpuPresent: true, - doviVersion: "1.0", - bitDepth: 10, - chromaLocation: "topleft", - chromaSubsampling: "4:2:0", - codedHeight: 1608, - codedWidth: 3840, - closedCaptions: true, - colorPrimaries: "bt2020", - colorRange: "tv", - colorSpace: "bt2020nc", - colorTrc: "smpte2084", - frameRate: 23.976, - key: "/library/streams/216389", - height: 1602, - level: 150, - original: true, - hasScalingMatrix: false, - profile: "main 10", - scanType: "progressive", - embeddedInVideo: "progressive", - refFrames: 1, - width: 3840, - displayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - extendedDisplayTitle: "4K DoVi/HDR10 (HEVC Main 10)", - selected: true, - forced: true, - channels: 6, - audioChannelLayout: "5.1(side)", - samplingRate: 48000, - canAutoSync: false, - hearingImpaired: true, - dub: true, - title: "SDH", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | Unique stream identifier. | 1002625 | -| `streamType` | *number* | :heavy_check_mark: | Stream type:
- VIDEO = 1
- AUDIO = 2
- SUBTITLE = 3
| | -| `format` | *string* | :heavy_minus_sign: | Format of the stream (e.g., srt). | srt | -| `default` | *boolean* | :heavy_minus_sign: | Indicates if this stream is default. | true | -| `codec` | *string* | :heavy_check_mark: | Codec used by the stream. | hevc | -| `index` | *number* | :heavy_minus_sign: | Index of the stream. | 0 | -| `bitrate` | *number* | :heavy_minus_sign: | Bitrate of the stream. | 24743 | -| `language` | *string* | :heavy_minus_sign: | Language of the stream. | English | -| `languageTag` | *string* | :heavy_minus_sign: | Language tag (e.g., en). | en | -| `languageCode` | *string* | :heavy_minus_sign: | ISO language code. | eng | -| `headerCompression` | *boolean* | :heavy_minus_sign: | Indicates whether header compression is enabled. | true | -| `doviblCompatID` | *number* | :heavy_minus_sign: | Dolby Vision BL compatibility ID. | 1 | -| `doviblPresent` | *boolean* | :heavy_minus_sign: | Indicates if Dolby Vision BL is present. | true | -| `dovielPresent` | *boolean* | :heavy_minus_sign: | Indicates if Dolby Vision EL is present. | false | -| `doviLevel` | *number* | :heavy_minus_sign: | Dolby Vision level. | 6 | -| `doviPresent` | *boolean* | :heavy_minus_sign: | Indicates if Dolby Vision is present. | true | -| `doviProfile` | *number* | :heavy_minus_sign: | Dolby Vision profile. | 8 | -| `dovirpuPresent` | *boolean* | :heavy_minus_sign: | Indicates if Dolby Vision RPU is present. | true | -| `doviVersion` | *string* | :heavy_minus_sign: | Dolby Vision version. | 1.0 | -| `bitDepth` | *number* | :heavy_minus_sign: | Bit depth of the video stream. | 10 | -| `chromaLocation` | *string* | :heavy_minus_sign: | Chroma sample location. | topleft | -| `chromaSubsampling` | *string* | :heavy_minus_sign: | Chroma subsampling format. | 4:2:0 | -| `codedHeight` | *number* | :heavy_minus_sign: | Coded video height. | 1608 | -| `codedWidth` | *number* | :heavy_minus_sign: | Coded video width. | 3840 | -| `closedCaptions` | *boolean* | :heavy_minus_sign: | N/A | true | -| `colorPrimaries` | *string* | :heavy_minus_sign: | Color primaries used. | bt2020 | -| `colorRange` | *string* | :heavy_minus_sign: | Color range (e.g., tv). | tv | -| `colorSpace` | *string* | :heavy_minus_sign: | Color space. | bt2020nc | -| `colorTrc` | *string* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 | -| `frameRate` | *number* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 | -| `key` | *string* | :heavy_minus_sign: | Key to access this stream part. | /library/streams/216389 | -| `height` | *number* | :heavy_minus_sign: | Height of the video stream. | 1602 | -| `level` | *number* | :heavy_minus_sign: | Video level. | 150 | -| `original` | *boolean* | :heavy_minus_sign: | Indicates if this is the original stream. | true | -| `hasScalingMatrix` | *boolean* | :heavy_minus_sign: | N/A | false | -| `profile` | *string* | :heavy_minus_sign: | Video profile. | main 10 | -| `scanType` | *string* | :heavy_minus_sign: | N/A | progressive | -| `embeddedInVideo` | *string* | :heavy_minus_sign: | N/A | progressive | -| `refFrames` | *number* | :heavy_minus_sign: | Number of reference frames. | 1 | -| `width` | *number* | :heavy_minus_sign: | Width of the video stream. | 3840 | -| `displayTitle` | *string* | :heavy_check_mark: | Display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | -| `extendedDisplayTitle` | *string* | :heavy_check_mark: | Extended display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | -| `selected` | *boolean* | :heavy_minus_sign: | Indicates if this stream is selected (applicable for audio streams). | true | -| `forced` | *boolean* | :heavy_minus_sign: | N/A | true | -| `channels` | *number* | :heavy_minus_sign: | Number of audio channels (for audio streams). | 6 | -| `audioChannelLayout` | *string* | :heavy_minus_sign: | Audio channel layout. | 5.1(side) | -| `samplingRate` | *number* | :heavy_minus_sign: | Sampling rate for the audio stream. | 48000 | -| `canAutoSync` | *boolean* | :heavy_minus_sign: | Indicates if the stream can auto-sync. | false | -| `hearingImpaired` | *boolean* | :heavy_minus_sign: | Indicates if the stream is for the hearing impaired. | true | -| `dub` | *boolean* | :heavy_minus_sign: | Indicates if the stream is a dub. | true | -| `title` | *string* | :heavy_minus_sign: | Optional title for the stream (e.g., language variant). | SDH | \ No newline at end of file diff --git a/docs/sdk/models/operations/subscription.md b/docs/sdk/models/operations/subscription.md deleted file mode 100644 index 026570d2..00000000 --- a/docs/sdk/models/operations/subscription.md +++ /dev/null @@ -1,26 +0,0 @@ -# Subscription - -If the account’s Plex Pass subscription is active - -## Example Usage - -```typescript -import { GetTokenDetailsAuthenticationStatus, Subscription } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Subscription = { - active: true, - subscribedAt: "2021-04-12T18:21:12Z", - status: GetTokenDetailsAuthenticationStatus.Inactive, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `features` | *string*[] | :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/subscriptiontemplate.md b/docs/sdk/models/operations/subscriptiontemplate.md new file mode 100644 index 00000000..26d2f966 --- /dev/null +++ b/docs/sdk/models/operations/subscriptiontemplate.md @@ -0,0 +1,175 @@ +# SubscriptionTemplate + +## Example Usage + +```typescript +import { SubscriptionTemplate } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: SubscriptionTemplate = { + mediaSubscription: [ + { + title: "This Episode", + mediaGrabOperation: [ + { + metadata: { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: + "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + }, + ], + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `mediaSubscription` | [operations.MediaSubscription](../../../sdk/models/operations/mediasubscription.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/tag.md b/docs/sdk/models/operations/tag.md deleted file mode 100644 index 0f10c0fe..00000000 --- a/docs/sdk/models/operations/tag.md +++ /dev/null @@ -1,35 +0,0 @@ -# Tag - -A key representing a specific tag within the section. - -## Example Usage - -```typescript -import { Tag } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Tag = Tag.RecentlyViewed; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Unwatched` | unwatched | -| `Newest` | newest | -| `RecentlyAdded` | recentlyAdded | -| `RecentlyViewed` | recentlyViewed | -| `OnDeck` | onDeck | -| `Collection` | collection | -| `Edition` | edition | -| `Year` | year | -| `Decade` | decade | -| `Director` | director | -| `ContentRating` | contentRating | -| `Rating` | rating | -| `Resolution` | resolution | -| `FirstCharacter` | firstCharacter | -| `Folder` | folder | -| `Albums` | albums | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/taskname.md b/docs/sdk/models/operations/taskname.md deleted file mode 100644 index f6e3dabf..00000000 --- a/docs/sdk/models/operations/taskname.md +++ /dev/null @@ -1,33 +0,0 @@ -# TaskName - -the name of the task to be started. - -## Example Usage - -```typescript -import { TaskName } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: TaskName = TaskName.RefreshLocalMedia; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| --------------------------- | --------------------------- | -| `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 | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/terminatesessionglobals.md b/docs/sdk/models/operations/terminatesessionglobals.md new file mode 100644 index 00000000..0ede7d11 --- /dev/null +++ b/docs/sdk/models/operations/terminatesessionglobals.md @@ -0,0 +1,35 @@ +# TerminateSessionGlobals + +## Example Usage + +```typescript +import { TerminateSessionGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: TerminateSessionGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/terminatesessionrequest.md b/docs/sdk/models/operations/terminatesessionrequest.md new file mode 100644 index 00000000..3258a535 --- /dev/null +++ b/docs/sdk/models/operations/terminatesessionrequest.md @@ -0,0 +1,29 @@ +# TerminateSessionRequest + +## Example Usage + +```typescript +import { TerminateSessionRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: TerminateSessionRequest = { + sessionId: "cdefghijklmnopqrstuvwxyz", + reason: "Stop Playing", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sessionId` | *string* | :heavy_check_mark: | The session id (found in the `Session` element in [/status/sessions](#tag/Status/operation/statusGetSlash)) | cdefghijklmnopqrstuvwxyz | +| `reason` | *string* | :heavy_minus_sign: | The reason to give to the user (typically displayed in the client) | Stop Playing | \ No newline at end of file diff --git a/docs/sdk/models/operations/terminatesessionresponse.md b/docs/sdk/models/operations/terminatesessionresponse.md new file mode 100644 index 00000000..b0e90650 --- /dev/null +++ b/docs/sdk/models/operations/terminatesessionresponse.md @@ -0,0 +1,20 @@ +# TerminateSessionResponse + +## Example Usage + +```typescript +import { TerminateSessionResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: TerminateSessionResponse = { + contentType: "", + statusCode: 283983, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/tonight.md b/docs/sdk/models/operations/tonight.md deleted file mode 100644 index 638ea09d..00000000 --- a/docs/sdk/models/operations/tonight.md +++ /dev/null @@ -1,18 +0,0 @@ -# Tonight - -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 - -## Example Usage - -```typescript -import { Tonight } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Tonight = Tonight.One; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/transcodeimageglobals.md b/docs/sdk/models/operations/transcodeimageglobals.md new file mode 100644 index 00000000..f45634c2 --- /dev/null +++ b/docs/sdk/models/operations/transcodeimageglobals.md @@ -0,0 +1,35 @@ +# TranscodeImageGlobals + +## Example Usage + +```typescript +import { TranscodeImageGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: TranscodeImageGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/transcodeimagerequest.md b/docs/sdk/models/operations/transcodeimagerequest.md new file mode 100644 index 00000000..e67723e6 --- /dev/null +++ b/docs/sdk/models/operations/transcodeimagerequest.md @@ -0,0 +1,46 @@ +# TranscodeImageRequest + +## Example Usage + +```typescript +import { TranscodeImageRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: TranscodeImageRequest = { + url: "/library/metadata/265/thumb/1715112705", + background: "#ff5522", + upscale: BoolInt.One, + minSize: BoolInt.One, + rotate: BoolInt.One, + blendColor: "#ff5522", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `url` | *string* | :heavy_minus_sign: | The source URL for the image to transcode. Note, if this URL requires a token such as `X-Plex-Token`, it should be given as a query parameter to this url. | /library/metadata/265/thumb/1715112705 | +| `format` | [operations.Format](../../../sdk/models/operations/format.md) | :heavy_minus_sign: | The output format for the image; defaults to jpg | | +| `width` | *number* | :heavy_minus_sign: | The desired width of the output image | | +| `height` | *number* | :heavy_minus_sign: | The desired height of the output image | | +| `quality` | *number* | :heavy_minus_sign: | The desired quality of the output. -1 means the highest quality. Defaults to -1 | | +| `background` | *string* | :heavy_minus_sign: | The background color to apply before painting the image. Only really applicable if image has transparency. Defaults to none | #ff5522 | +| `upscale` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates if image should be upscaled to the desired width/height. Defaults to false | 1 | +| `minSize` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates if image should be scaled to fit the smaller dimension. By default (false) the image is scaled to fit within the width/height specified but if this parameter is true, it will allow overflowing one dimension to fit the other. Essentially it is making the width/height minimum sizes of the image or sizing the image to fill the entire width/height even if it overflows one dimension. | 1 | +| `rotate` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Obey the rotation values specified in EXIF data. Defaults to true. | 1 | +| `blur` | *number* | :heavy_minus_sign: | Apply a blur to the image, Defaults to 0 (none) | | +| `saturation` | *number* | :heavy_minus_sign: | Scale the image saturation by the specified percentage. Defaults to 100 | | +| `opacity` | *number* | :heavy_minus_sign: | Render the image at the specified opacity percentage. Defaults to 100 | | +| `chromaSubsampling` | [operations.ChromaSubsampling](../../../sdk/models/operations/chromasubsampling.md) | :heavy_minus_sign: | Use the specified chroma subsambling.
- 0: 411
- 1: 420
- 2: 422
- 3: 444
Defaults to 3 (444) | | +| `blendColor` | *string* | :heavy_minus_sign: | The color to blend with the image. Defaults to none | #ff5522 | \ No newline at end of file diff --git a/docs/sdk/models/operations/transcodeimageresponse.md b/docs/sdk/models/operations/transcodeimageresponse.md new file mode 100644 index 00000000..4dfd53d7 --- /dev/null +++ b/docs/sdk/models/operations/transcodeimageresponse.md @@ -0,0 +1,20 @@ +# TranscodeImageResponse + +## Example Usage + +```typescript +import { TranscodeImageResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | +| `twoHundredImageJpegResponseStream` | *ReadableStream* | :heavy_minus_sign: | The resulting image | +| `twoHundredImagePngResponseStream` | *ReadableStream* | :heavy_minus_sign: | The resulting image | +| `twoHundredImageXPortablePixmapResponseStream` | *ReadableStream* | :heavy_minus_sign: | The resulting image | \ No newline at end of file diff --git a/docs/sdk/models/operations/transcodejob.md b/docs/sdk/models/operations/transcodejob.md new file mode 100644 index 00000000..c8c62479 --- /dev/null +++ b/docs/sdk/models/operations/transcodejob.md @@ -0,0 +1,25 @@ +# TranscodeJob + +## Example Usage + +```typescript +import { TranscodeJob } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: TranscodeJob = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `generatorID` | *number* | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `progress` | *number* | :heavy_minus_sign: | N/A | +| `ratingKey` | *string* | :heavy_minus_sign: | N/A | +| `remaining` | *number* | :heavy_minus_sign: | The number of seconds remaining in this job | +| `size` | *number* | :heavy_minus_sign: | The size of the result so far | +| `speed` | *number* | :heavy_minus_sign: | The speed of the transcode; 1.0 means real-time | +| `targetTagID` | *number* | :heavy_minus_sign: | The tag associated with the job. This could be the tag containing the optimizer settings. | +| `thumb` | *string* | :heavy_minus_sign: | N/A | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `type` | [operations.GetBackgroundTasksType](../../../sdk/models/operations/getbackgroundtaskstype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/transcodesession.md b/docs/sdk/models/operations/transcodesession.md deleted file mode 100644 index 28bcf0ec..00000000 --- a/docs/sdk/models/operations/transcodesession.md +++ /dev/null @@ -1,63 +0,0 @@ -# TranscodeSession - -## Example Usage - -```typescript -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, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | -| `key` | *string* | :heavy_minus_sign: | N/A | vv3i2q2lax92qlzul1hbd4bx | -| `throttled` | *boolean* | :heavy_minus_sign: | N/A | false | -| `complete` | *boolean* | :heavy_minus_sign: | N/A | false | -| `progress` | *number* | :heavy_minus_sign: | N/A | 1.7999999523162842 | -| `size` | *number* | :heavy_minus_sign: | N/A | -22 | -| `speed` | *number* | :heavy_minus_sign: | N/A | 25.100000381469727 | -| `error` | *boolean* | :heavy_minus_sign: | N/A | false | -| `duration` | *number* | :heavy_minus_sign: | N/A | 1445695 | -| `remaining` | *number* | :heavy_minus_sign: | N/A | 53 | -| `context` | *string* | :heavy_minus_sign: | N/A | streaming | -| `sourceVideoCodec` | *string* | :heavy_minus_sign: | N/A | h264 | -| `sourceAudioCodec` | *string* | :heavy_minus_sign: | N/A | aac | -| `videoDecision` | *string* | :heavy_minus_sign: | N/A | transcode | -| `audioDecision` | *string* | :heavy_minus_sign: | N/A | transcode | -| `subtitleDecision` | *string* | :heavy_minus_sign: | N/A | burn | -| `protocol` | *string* | :heavy_minus_sign: | N/A | http | -| `container` | *string* | :heavy_minus_sign: | N/A | mkv | -| `videoCodec` | *string* | :heavy_minus_sign: | N/A | h264 | -| `audioCodec` | *string* | :heavy_minus_sign: | N/A | opus | -| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 1 | -| `transcodeHwRequested` | *boolean* | :heavy_minus_sign: | N/A | true | -| `timeStamp` | *number* | :heavy_minus_sign: | N/A | 1.7058958054919229e+09 | -| `maxOffsetAvailable` | *number* | :heavy_minus_sign: | N/A | 29.53 | -| `minOffsetAvailable` | *number* | :heavy_minus_sign: | N/A | 3.003000020980835 | \ No newline at end of file diff --git a/docs/sdk/models/operations/transcodesubtitlesglobals.md b/docs/sdk/models/operations/transcodesubtitlesglobals.md new file mode 100644 index 00000000..6d49e6d8 --- /dev/null +++ b/docs/sdk/models/operations/transcodesubtitlesglobals.md @@ -0,0 +1,35 @@ +# TranscodeSubtitlesGlobals + +## Example Usage + +```typescript +import { TranscodeSubtitlesGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: TranscodeSubtitlesGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/transcodesubtitleslocation.md b/docs/sdk/models/operations/transcodesubtitleslocation.md new file mode 100644 index 00000000..9cb862c8 --- /dev/null +++ b/docs/sdk/models/operations/transcodesubtitleslocation.md @@ -0,0 +1,19 @@ +# TranscodeSubtitlesLocation + +Network type of the client, can be used to help determine target bitrate. + +## Example Usage + +```typescript +import { TranscodeSubtitlesLocation } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: TranscodeSubtitlesLocation = TranscodeSubtitlesLocation.Wan; +``` + +## Values + +| Name | Value | +| ---------- | ---------- | +| `Lan` | lan | +| `Wan` | wan | +| `Cellular` | cellular | \ No newline at end of file diff --git a/docs/sdk/models/operations/transcodesubtitlesprotocol.md b/docs/sdk/models/operations/transcodesubtitlesprotocol.md new file mode 100644 index 00000000..f0c4991e --- /dev/null +++ b/docs/sdk/models/operations/transcodesubtitlesprotocol.md @@ -0,0 +1,20 @@ +# TranscodeSubtitlesProtocol + +Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + + +## Example Usage + +```typescript +import { TranscodeSubtitlesProtocol } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: TranscodeSubtitlesProtocol = TranscodeSubtitlesProtocol.Dash; +``` + +## Values + +| Name | Value | +| ------ | ------ | +| `Http` | http | +| `Hls` | hls | +| `Dash` | dash | \ No newline at end of file diff --git a/docs/sdk/models/operations/transcodesubtitlesrequest.md b/docs/sdk/models/operations/transcodesubtitlesrequest.md new file mode 100644 index 00000000..2ddc3d9a --- /dev/null +++ b/docs/sdk/models/operations/transcodesubtitlesrequest.md @@ -0,0 +1,92 @@ +# TranscodeSubtitlesRequest + +## Example Usage + +```typescript +import { + TranscodeSubtitlesLocation, + TranscodeSubtitlesProtocol, + TranscodeSubtitlesRequest, + TranscodeSubtitlesSubtitles, +} from "@lukehagar/plexjs/sdk/models/operations"; +import { AdvancedSubtitles, BoolInt, TranscodeType } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: TranscodeSubtitlesRequest = { + transcodeType: TranscodeType.Video, + advancedSubtitles: AdvancedSubtitles.Burn, + audioBoost: 50, + audioChannelCount: 5, + autoAdjustQuality: BoolInt.One, + autoAdjustSubtitle: BoolInt.One, + directPlay: BoolInt.One, + directStream: BoolInt.One, + directStreamAudio: BoolInt.One, + disableResolutionRotation: BoolInt.One, + hasMDE: BoolInt.One, + location: TranscodeSubtitlesLocation.Wan, + mediaBufferSize: 102400, + mediaIndex: 0, + musicBitrate: 5000, + offset: 90.5, + partIndex: 0, + path: "/library/metadata/151671", + peakBitrate: 12000, + photoResolution: "1080x1080", + protocol: TranscodeSubtitlesProtocol.Dash, + secondsPerSegment: 5, + subtitleSize: 50, + subtitles: TranscodeSubtitlesSubtitles.None, + videoBitrate: 12000, + videoQuality: 50, + videoResolution: "1080x1080", + xPlexClientProfileExtra: + "add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)", + xPlexClientProfileName: "generic", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `transcodeType` | [shared.TranscodeType](../../../sdk/models/shared/transcodetype.md) | :heavy_check_mark: | Type of transcode media | | +| `transcodeSessionId` | *string* | :heavy_minus_sign: | Transcode session UUID | | +| `advancedSubtitles` | [shared.AdvancedSubtitles](../../../sdk/models/shared/advancedsubtitles.md) | :heavy_minus_sign: | Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost
| burn | +| `audioBoost` | *number* | :heavy_minus_sign: | Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) | 50 | +| `audioChannelCount` | *number* | :heavy_minus_sign: | Target video number of audio channels. | 5 | +| `autoAdjustQuality` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates the client supports ABR. | 1 | +| `autoAdjustSubtitle` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates if the server should adjust subtitles based on Voice Activity Data. | 1 | +| `directPlay` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates the client supports direct playing the indicated content. | 1 | +| `directStream` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates the client supports direct streaming the video of the indicated content. | 1 | +| `directStreamAudio` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates the client supports direct streaming the audio of the indicated content. | 1 | +| `disableResolutionRotation` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Indicates if resolution should be adjusted for orientation. | 1 | +| `hasMDE` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 | 1 | +| `location` | [operations.TranscodeSubtitlesLocation](../../../sdk/models/operations/transcodesubtitleslocation.md) | :heavy_minus_sign: | Network type of the client, can be used to help determine target bitrate. | wan | +| `mediaBufferSize` | *number* | :heavy_minus_sign: | Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. | 102400 | +| `mediaIndex` | *number* | :heavy_minus_sign: | Index of the media to transcode. -1 or not specified indicates let the server choose. | 0 | +| `musicBitrate` | *number* | :heavy_minus_sign: | Target bitrate for audio only files (in kbps, used to transcode). | 5000 | +| `offset` | *number* | :heavy_minus_sign: | Offset from the start of the media (in seconds). | 90.5 | +| `partIndex` | *number* | :heavy_minus_sign: | Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode | 0 | +| `path` | *string* | :heavy_minus_sign: | Internal PMS path of the media to transcode. | /library/metadata/151671 | +| `peakBitrate` | *number* | :heavy_minus_sign: | Maximum bitrate (in kbps) to use in ABR. | 12000 | +| `photoResolution` | *string* | :heavy_minus_sign: | Target photo resolution. | 1080x1080 | +| `protocol` | [operations.TranscodeSubtitlesProtocol](../../../sdk/models/operations/transcodesubtitlesprotocol.md) | :heavy_minus_sign: | Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022)
| dash | +| `secondsPerSegment` | *number* | :heavy_minus_sign: | Number of seconds to include in each transcoded segment | 5 | +| `subtitleSize` | *number* | :heavy_minus_sign: | Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) | 50 | +| `subtitles` | [operations.TranscodeSubtitlesSubtitles](../../../sdk/models/operations/transcodesubtitlessubtitles.md) | :heavy_minus_sign: | Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream
| Burn | +| `videoBitrate` | *number* | :heavy_minus_sign: | Target video bitrate (in kbps). | 12000 | +| `videoQuality` | *number* | :heavy_minus_sign: | Target photo quality. | 50 | +| `videoResolution` | *string* | :heavy_minus_sign: | Target maximum video resolution. | 1080x1080 | +| `xPlexClientProfileExtra` | *string* | :heavy_minus_sign: | See [Profile Augmentations](#section/API-Info/Profile-Augmentations) . | add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash) | +| `xPlexClientProfileName` | *string* | :heavy_minus_sign: | Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. | generic | +| `xPlexSessionIdentifier` | *string* | :heavy_minus_sign: | Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) | | \ No newline at end of file diff --git a/docs/sdk/models/operations/transcodesubtitlesresponse.md b/docs/sdk/models/operations/transcodesubtitlesresponse.md new file mode 100644 index 00000000..13b12d34 --- /dev/null +++ b/docs/sdk/models/operations/transcodesubtitlesresponse.md @@ -0,0 +1,20 @@ +# TranscodeSubtitlesResponse + +## Example Usage + +```typescript +import { TranscodeSubtitlesResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: TranscodeSubtitlesResponse = { + contentType: "", + statusCode: 143280, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/transcodesubtitlessubtitles.md b/docs/sdk/models/operations/transcodesubtitlessubtitles.md new file mode 100644 index 00000000..efc9c100 --- /dev/null +++ b/docs/sdk/models/operations/transcodesubtitlessubtitles.md @@ -0,0 +1,24 @@ +# TranscodeSubtitlesSubtitles + +Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + + +## Example Usage + +```typescript +import { TranscodeSubtitlesSubtitles } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: TranscodeSubtitlesSubtitles = TranscodeSubtitlesSubtitles.Burn; +``` + +## Values + +| Name | Value | +| ----------- | ----------- | +| `Auto` | auto | +| `Burn` | burn | +| `None` | none | +| `Sidecar` | sidecar | +| `Embedded` | embedded | +| `Segmented` | segmented | +| `Unknown` | unknown | \ No newline at end of file diff --git a/docs/sdk/models/operations/trials.md b/docs/sdk/models/operations/trials.md deleted file mode 100644 index 76260f29..00000000 --- a/docs/sdk/models/operations/trials.md +++ /dev/null @@ -1,14 +0,0 @@ -# Trials - -## Example Usage - -```typescript -import { Trials } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Trials = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdk/models/operations/triggerfallbackglobals.md b/docs/sdk/models/operations/triggerfallbackglobals.md new file mode 100644 index 00000000..d0678c29 --- /dev/null +++ b/docs/sdk/models/operations/triggerfallbackglobals.md @@ -0,0 +1,35 @@ +# TriggerFallbackGlobals + +## Example Usage + +```typescript +import { TriggerFallbackGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: TriggerFallbackGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/triggerfallbackrequest.md b/docs/sdk/models/operations/triggerfallbackrequest.md new file mode 100644 index 00000000..7eef22e8 --- /dev/null +++ b/docs/sdk/models/operations/triggerfallbackrequest.md @@ -0,0 +1,29 @@ +# TriggerFallbackRequest + +## Example Usage + +```typescript +import { TriggerFallbackRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { TranscodeType } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: TriggerFallbackRequest = { + transcodeType: TranscodeType.Video, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `transcodeType` | [shared.TranscodeType](../../../sdk/models/shared/transcodetype.md) | :heavy_check_mark: | Type of transcode media | | +| `transcodeSessionId` | *string* | :heavy_minus_sign: | Transcode session UUID | | \ No newline at end of file diff --git a/docs/sdk/models/operations/triggerfallbackresponse.md b/docs/sdk/models/operations/triggerfallbackresponse.md new file mode 100644 index 00000000..0dd705d0 --- /dev/null +++ b/docs/sdk/models/operations/triggerfallbackresponse.md @@ -0,0 +1,20 @@ +# TriggerFallbackResponse + +## Example Usage + +```typescript +import { TriggerFallbackResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: TriggerFallbackResponse = { + contentType: "", + statusCode: 241633, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/tunechannelglobals.md b/docs/sdk/models/operations/tunechannelglobals.md new file mode 100644 index 00000000..824ae979 --- /dev/null +++ b/docs/sdk/models/operations/tunechannelglobals.md @@ -0,0 +1,35 @@ +# TuneChannelGlobals + +## Example Usage + +```typescript +import { TuneChannelGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: TuneChannelGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/tunechannelrequest.md b/docs/sdk/models/operations/tunechannelrequest.md new file mode 100644 index 00000000..90308b88 --- /dev/null +++ b/docs/sdk/models/operations/tunechannelrequest.md @@ -0,0 +1,29 @@ +# TuneChannelRequest + +## Example Usage + +```typescript +import { TuneChannelRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: TuneChannelRequest = { + dvrId: 557918, + channel: "2.1", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `dvrId` | *number* | :heavy_check_mark: | The ID of the DVR. | | +| `channel` | *string* | :heavy_check_mark: | The channel ID to tune | 2.1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/tunechannelresponse.md b/docs/sdk/models/operations/tunechannelresponse.md new file mode 100644 index 00000000..e8762dfd --- /dev/null +++ b/docs/sdk/models/operations/tunechannelresponse.md @@ -0,0 +1,31 @@ +# TuneChannelResponse + +## Example Usage + +```typescript +import { TuneChannelResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: TuneChannelResponse = { + contentType: "", + statusCode: 231608, + headers: { + "key": [], + "key1": [ + "", + "", + "", + ], + "key2": [], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithMetadata` | [shared.MediaContainerWithMetadata](../../../sdk/models/shared/mediacontainerwithmetadata.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/type.md b/docs/sdk/models/operations/type.md deleted file mode 100644 index 3273c2b3..00000000 --- a/docs/sdk/models/operations/type.md +++ /dev/null @@ -1,34 +0,0 @@ -# Type - -The type of media to retrieve or filter by. -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 - - -## Example Usage - -```typescript -import { Type } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Type = Type.TvShow; -``` - -## Values - -This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. - -| Name | Value | -| ---------------------- | ---------------------- | -| `Movie` | 1 | -| `TvShow` | 2 | -| `Season` | 3 | -| `Episode` | 4 | -| `Artist` | 5 | -| `Album` | 6 | -| `Track` | 7 | -| `PhotoAlbum` | 8 | -| `Photo` | 9 | -| - | `Unrecognized` | \ No newline at end of file diff --git a/docs/sdk/models/operations/ultrablurcolor.md b/docs/sdk/models/operations/ultrablurcolor.md new file mode 100644 index 00000000..f9a96424 --- /dev/null +++ b/docs/sdk/models/operations/ultrablurcolor.md @@ -0,0 +1,18 @@ +# UltraBlurColor + +## Example Usage + +```typescript +import { UltraBlurColor } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: UltraBlurColor = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `bottomLeft` | *string* | :heavy_minus_sign: | The color (hex) for the bottom left quadrant. | +| `bottomRight` | *string* | :heavy_minus_sign: | The color (hex) for the bottom right quadrant. | +| `topLeft` | *string* | :heavy_minus_sign: | The color (hex) for the top left quadrant. | +| `topRight` | *string* | :heavy_minus_sign: | The color (hex) for the top right quadrant. | \ No newline at end of file diff --git a/docs/sdk/models/operations/ultrablurcolors.md b/docs/sdk/models/operations/ultrablurcolors.md deleted file mode 100644 index c63973a4..00000000 --- a/docs/sdk/models/operations/ultrablurcolors.md +++ /dev/null @@ -1,23 +0,0 @@ -# UltraBlurColors - -## Example Usage - -```typescript -import { UltraBlurColors } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: UltraBlurColors = { - topLeft: "11333b", - topRight: "0a232d", - bottomRight: "73958", - bottomLeft: "1f5066", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `topLeft` | *string* | :heavy_check_mark: | N/A | 11333b | -| `topRight` | *string* | :heavy_check_mark: | N/A | 0a232d | -| `bottomRight` | *string* | :heavy_check_mark: | N/A | 73958 | -| `bottomLeft` | *string* | :heavy_check_mark: | N/A | 1f5066 | \ No newline at end of file diff --git a/docs/sdk/models/operations/unmatchglobals.md b/docs/sdk/models/operations/unmatchglobals.md new file mode 100644 index 00000000..5c1a560a --- /dev/null +++ b/docs/sdk/models/operations/unmatchglobals.md @@ -0,0 +1,35 @@ +# UnmatchGlobals + +## Example Usage + +```typescript +import { UnmatchGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: UnmatchGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/unmatchrequest.md b/docs/sdk/models/operations/unmatchrequest.md new file mode 100644 index 00000000..43893e73 --- /dev/null +++ b/docs/sdk/models/operations/unmatchrequest.md @@ -0,0 +1,27 @@ +# UnmatchRequest + +## Example Usage + +```typescript +import { UnmatchRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: UnmatchRequest = { + ids: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/unmatchresponse.md b/docs/sdk/models/operations/unmatchresponse.md new file mode 100644 index 00000000..908a4d36 --- /dev/null +++ b/docs/sdk/models/operations/unmatchresponse.md @@ -0,0 +1,20 @@ +# UnmatchResponse + +## Example Usage + +```typescript +import { UnmatchResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: UnmatchResponse = { + contentType: "", + statusCode: 342499, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/unscrobbleglobals.md b/docs/sdk/models/operations/unscrobbleglobals.md new file mode 100644 index 00000000..9ceb6c9a --- /dev/null +++ b/docs/sdk/models/operations/unscrobbleglobals.md @@ -0,0 +1,35 @@ +# UnscrobbleGlobals + +## Example Usage + +```typescript +import { UnscrobbleGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: UnscrobbleGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/unscrobblerequest.md b/docs/sdk/models/operations/unscrobblerequest.md new file mode 100644 index 00000000..1a57d8c2 --- /dev/null +++ b/docs/sdk/models/operations/unscrobblerequest.md @@ -0,0 +1,29 @@ +# UnscrobbleRequest + +## Example Usage + +```typescript +import { UnscrobbleRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: UnscrobbleRequest = { + identifier: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `identifier` | *string* | :heavy_check_mark: | The identifier of the media provider containing the media to rate. Typically `com.plexapp.plugins.library` | | +| `key` | *string* | :heavy_minus_sign: | The key of the item to rate. This is the `ratingKey` found in metadata items | | +| `uri` | *string* | :heavy_minus_sign: | The URI of the item to mark as played. See intro for description of the URIs | | \ No newline at end of file diff --git a/docs/sdk/models/operations/unscrobbleresponse.md b/docs/sdk/models/operations/unscrobbleresponse.md new file mode 100644 index 00000000..f7b860e8 --- /dev/null +++ b/docs/sdk/models/operations/unscrobbleresponse.md @@ -0,0 +1,20 @@ +# UnscrobbleResponse + +## Example Usage + +```typescript +import { UnscrobbleResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: UnscrobbleResponse = { + contentType: "", + statusCode: 571161, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/unshuffleglobals.md b/docs/sdk/models/operations/unshuffleglobals.md new file mode 100644 index 00000000..7aeb5bd9 --- /dev/null +++ b/docs/sdk/models/operations/unshuffleglobals.md @@ -0,0 +1,35 @@ +# UnshuffleGlobals + +## Example Usage + +```typescript +import { UnshuffleGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: UnshuffleGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/unshufflerequest.md b/docs/sdk/models/operations/unshufflerequest.md new file mode 100644 index 00000000..9ad35fba --- /dev/null +++ b/docs/sdk/models/operations/unshufflerequest.md @@ -0,0 +1,27 @@ +# UnshuffleRequest + +## Example Usage + +```typescript +import { UnshuffleRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: UnshuffleRequest = { + playQueueId: 419403, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playQueueId` | *number* | :heavy_check_mark: | The ID of the play queue. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/unshuffleresponse.md b/docs/sdk/models/operations/unshuffleresponse.md new file mode 100644 index 00000000..c82a5ba0 --- /dev/null +++ b/docs/sdk/models/operations/unshuffleresponse.md @@ -0,0 +1,21 @@ +# UnshuffleResponse + +## Example Usage + +```typescript +import { UnshuffleResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: UnshuffleResponse = { + contentType: "", + statusCode: 776636, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `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 | +| `mediaContainerWithPlaylistMetadata` | [shared.MediaContainerWithPlaylistMetadata](../../../sdk/models/shared/mediacontainerwithplaylistmetadata.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/updatehubvisibilityglobals.md b/docs/sdk/models/operations/updatehubvisibilityglobals.md new file mode 100644 index 00000000..915c3406 --- /dev/null +++ b/docs/sdk/models/operations/updatehubvisibilityglobals.md @@ -0,0 +1,35 @@ +# UpdateHubVisibilityGlobals + +## Example Usage + +```typescript +import { UpdateHubVisibilityGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: UpdateHubVisibilityGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/updatehubvisibilityrequest.md b/docs/sdk/models/operations/updatehubvisibilityrequest.md new file mode 100644 index 00000000..eb3df113 --- /dev/null +++ b/docs/sdk/models/operations/updatehubvisibilityrequest.md @@ -0,0 +1,36 @@ +# UpdateHubVisibilityRequest + +## Example Usage + +```typescript +import { UpdateHubVisibilityRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: UpdateHubVisibilityRequest = { + sectionId: 174620, + identifier: "", + promotedToRecommended: BoolInt.One, + promotedToOwnHome: BoolInt.One, + promotedToSharedHome: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *number* | :heavy_check_mark: | The section ID for the hubs to change | | +| `identifier` | *string* | :heavy_check_mark: | The identifier of the hub to change | | +| `promotedToRecommended` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Whether this hub should be displayed in recommended | 1 | +| `promotedToOwnHome` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Whether this hub should be displayed in admin's home | 1 | +| `promotedToSharedHome` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Whether this hub should be displayed in shared user's home | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/updatehubvisibilityresponse.md b/docs/sdk/models/operations/updatehubvisibilityresponse.md new file mode 100644 index 00000000..9f88c188 --- /dev/null +++ b/docs/sdk/models/operations/updatehubvisibilityresponse.md @@ -0,0 +1,20 @@ +# UpdateHubVisibilityResponse + +## Example Usage + +```typescript +import { UpdateHubVisibilityResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: UpdateHubVisibilityResponse = { + contentType: "", + statusCode: 940225, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/updateitemartworkelement.md b/docs/sdk/models/operations/updateitemartworkelement.md new file mode 100644 index 00000000..33ee698a --- /dev/null +++ b/docs/sdk/models/operations/updateitemartworkelement.md @@ -0,0 +1,20 @@ +# UpdateItemArtworkElement + +## Example Usage + +```typescript +import { UpdateItemArtworkElement } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: UpdateItemArtworkElement = UpdateItemArtworkElement.Banner; +``` + +## Values + +| Name | Value | +| ----------- | ----------- | +| `Thumb` | thumb | +| `Art` | art | +| `ClearLogo` | clearLogo | +| `Banner` | banner | +| `Poster` | poster | +| `Theme` | theme | \ No newline at end of file diff --git a/docs/sdk/models/operations/updateitemartworkglobals.md b/docs/sdk/models/operations/updateitemartworkglobals.md new file mode 100644 index 00000000..66fad52f --- /dev/null +++ b/docs/sdk/models/operations/updateitemartworkglobals.md @@ -0,0 +1,35 @@ +# UpdateItemArtworkGlobals + +## Example Usage + +```typescript +import { UpdateItemArtworkGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: UpdateItemArtworkGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/updateitemartworkrequest.md b/docs/sdk/models/operations/updateitemartworkrequest.md new file mode 100644 index 00000000..6d27a9e0 --- /dev/null +++ b/docs/sdk/models/operations/updateitemartworkrequest.md @@ -0,0 +1,30 @@ +# UpdateItemArtworkRequest + +## Example Usage + +```typescript +import { UpdateItemArtworkElement, UpdateItemArtworkRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: UpdateItemArtworkRequest = { + ids: "", + element: UpdateItemArtworkElement.Art, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `ids` | *string* | :heavy_check_mark: | N/A | | +| `element` | [operations.UpdateItemArtworkElement](../../../sdk/models/operations/updateitemartworkelement.md) | :heavy_check_mark: | N/A | | +| `url` | *string* | :heavy_minus_sign: | The url of the new asset. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/updateitemartworkresponse.md b/docs/sdk/models/operations/updateitemartworkresponse.md new file mode 100644 index 00000000..1e114aba --- /dev/null +++ b/docs/sdk/models/operations/updateitemartworkresponse.md @@ -0,0 +1,20 @@ +# UpdateItemArtworkResponse + +## Example Usage + +```typescript +import { UpdateItemArtworkResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: UpdateItemArtworkResponse = { + contentType: "", + statusCode: 982490, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/updateitemsglobals.md b/docs/sdk/models/operations/updateitemsglobals.md new file mode 100644 index 00000000..bf9290de --- /dev/null +++ b/docs/sdk/models/operations/updateitemsglobals.md @@ -0,0 +1,35 @@ +# UpdateItemsGlobals + +## Example Usage + +```typescript +import { UpdateItemsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: UpdateItemsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/updateitemsrequest.md b/docs/sdk/models/operations/updateitemsrequest.md new file mode 100644 index 00000000..b0b24304 --- /dev/null +++ b/docs/sdk/models/operations/updateitemsrequest.md @@ -0,0 +1,42 @@ +# UpdateItemsRequest + +## Example Usage + +```typescript +import { UpdateItemsRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: UpdateItemsRequest = { + sectionId: "", + fieldLocked: BoolInt.One, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `sectionId` | *string* | :heavy_check_mark: | The id of the section | | +| `type` | *string* | :heavy_minus_sign: | N/A | | +| `filters` | *string* | :heavy_minus_sign: | The filters to apply to determine which items should be modified | | +| `fieldValue` | *string* | :heavy_minus_sign: | Set the specified field to a new value | | +| `fieldLocked` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Set the specified field to locked (or unlocked if set to 0) | 1 | +| `titleValue` | *string* | :heavy_minus_sign: | This field is treated specially by albums or artists and may be used for implicit reparenting. | | +| `artistTitleValue` | *string* | :heavy_minus_sign: | Reparents set of Tracks or Albums - used with album.title.* in the case of tracks | | +| `artistTitleId` | *string* | :heavy_minus_sign: | Reparents set of Tracks or Albums - used with album.title.* in the case of tracks | | +| `albumTitleValue` | *string* | :heavy_minus_sign: | Reparents set of Tracks - Must be used in conjunction with artist.title.value or id | | +| `albumTitleId` | *string* | :heavy_minus_sign: | Reparents set of Tracks - Must be used in conjunction with artist.title.value or id | | +| `tagtypeIdxTagTag` | *string* | :heavy_minus_sign: | Creates tag and associates it with each item in the set. - [idx] links this and the next parameters together | | +| `tagtypeIdxTaggingObject` | *string* | :heavy_minus_sign: | Here `object` may be text/thumb/art/theme - Optionally used in conjunction with tag.tag, to update association info across the set. | | +| `tagtypeTagTag` | *string* | :heavy_minus_sign: | Remove comma separated tags from the set of items | | +| `tagtypeTag` | *string* | :heavy_minus_sign: | Remove associations of this type (e.g. genre) from the set of items | | \ No newline at end of file diff --git a/docs/sdk/models/operations/updateitemsresponse.md b/docs/sdk/models/operations/updateitemsresponse.md new file mode 100644 index 00000000..5e5b4c64 --- /dev/null +++ b/docs/sdk/models/operations/updateitemsresponse.md @@ -0,0 +1,20 @@ +# UpdateItemsResponse + +## Example Usage + +```typescript +import { UpdateItemsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: UpdateItemsResponse = { + contentType: "", + statusCode: 655878, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/updateplaylistglobals.md b/docs/sdk/models/operations/updateplaylistglobals.md new file mode 100644 index 00000000..aa6af49c --- /dev/null +++ b/docs/sdk/models/operations/updateplaylistglobals.md @@ -0,0 +1,35 @@ +# UpdatePlaylistGlobals + +## Example Usage + +```typescript +import { UpdatePlaylistGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: UpdatePlaylistGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/updateplaylistrequest.md b/docs/sdk/models/operations/updateplaylistrequest.md index 6f55f903..e92b7f2c 100644 --- a/docs/sdk/models/operations/updateplaylistrequest.md +++ b/docs/sdk/models/operations/updateplaylistrequest.md @@ -6,14 +6,22 @@ import { UpdatePlaylistRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: UpdatePlaylistRequest = { - playlistID: 5343.23, + playlistId: 534323, }; ``` ## Fields -| Field | Type | Required | Description | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | -| `title` | *string* | :heavy_minus_sign: | name of the playlist | -| `summary` | *string* | :heavy_minus_sign: | summary description of the playlist | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `playlistId` | *number* | :heavy_check_mark: | The ID of the playlist | | \ No newline at end of file diff --git a/docs/sdk/models/operations/updateplayprogressrequest.md b/docs/sdk/models/operations/updateplayprogressrequest.md deleted file mode 100644 index 4d901413..00000000 --- a/docs/sdk/models/operations/updateplayprogressrequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# UpdatePlayProgressRequest - -## Example Usage - -```typescript -import { UpdatePlayProgressRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: UpdatePlayProgressRequest = { - key: "", - time: 90000, - state: "played", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `key` | *string* | :heavy_check_mark: | the media key | | -| `time` | *number* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | 90000 | -| `state` | *string* | :heavy_check_mark: | The playback state of the media item. | played | \ No newline at end of file diff --git a/docs/sdk/models/operations/updateplayprogressresponse.md b/docs/sdk/models/operations/updateplayprogressresponse.md deleted file mode 100644 index 4cddb413..00000000 --- a/docs/sdk/models/operations/updateplayprogressresponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# UpdatePlayProgressResponse - -## Example Usage - -```typescript -import { UpdatePlayProgressResponse } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: UpdatePlayProgressResponse = { - contentType: "", - statusCode: 114242, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/uploadplaylistglobals.md b/docs/sdk/models/operations/uploadplaylistglobals.md new file mode 100644 index 00000000..8e513784 --- /dev/null +++ b/docs/sdk/models/operations/uploadplaylistglobals.md @@ -0,0 +1,35 @@ +# UploadPlaylistGlobals + +## Example Usage + +```typescript +import { UploadPlaylistGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: UploadPlaylistGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/uploadplaylistrequest.md b/docs/sdk/models/operations/uploadplaylistrequest.md index 2660d827..14c53d0a 100644 --- a/docs/sdk/models/operations/uploadplaylistrequest.md +++ b/docs/sdk/models/operations/uploadplaylistrequest.md @@ -3,18 +3,28 @@ ## Example Usage ```typescript -import { QueryParamForce, UploadPlaylistRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { UploadPlaylistRequest } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; let value: UploadPlaylistRequest = { path: "/home/barkley/playlist.m3u", - force: QueryParamForce.Zero, + force: BoolInt.One, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `path` | *string* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.
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.
| /home/barkley/playlist.m3u | -| `force` | [operations.QueryParamForce](../../../sdk/models/operations/queryparamforce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.
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.
| | -| `sectionID` | *number* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `path` | *string* | :heavy_minus_sign: | Absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. 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. | /home/barkley/playlist.m3u | +| `force` | [shared.BoolInt](../../../sdk/models/shared/boolint.md) | :heavy_minus_sign: | Force overwriting of duplicate playlists. 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. | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/upscale.md b/docs/sdk/models/operations/upscale.md deleted file mode 100644 index e164564c..00000000 --- a/docs/sdk/models/operations/upscale.md +++ /dev/null @@ -1,18 +0,0 @@ -# Upscale - -allow images to be resized beyond native dimensions. - -## Example Usage - -```typescript -import { Upscale } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Upscale = Upscale.One; -``` - -## Values - -| Name | Value | -| ------ | ------ | -| `Zero` | 0 | -| `One` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/user.md b/docs/sdk/models/operations/user.md deleted file mode 100644 index 9fcca213..00000000 --- a/docs/sdk/models/operations/user.md +++ /dev/null @@ -1,80 +0,0 @@ -# User - -## Example Usage - -```typescript -import { - AllLibraries, - AllowCameraUpload, - AllowChannels, - AllowSubtitleAdmin, - AllowSync, - AllowTuners, - Home, - Owned, - Pending, - Protected, - Restricted, - User, -} from "@lukehagar/plexjs/sdk/models/operations"; - -let value: User = { - id: 22526914, - title: "Plex User", - username: "zgfuc7krcqfimrmb9lsl5j", - email: "zgfuc7krcqfimrmb9lsl5j@protonmail.com", - recommendationsPlaylistId: "", - thumb: "https://plex.tv/users/3346028014e93acd/avatar?c=1731605021", - protected: Protected.Enable, - home: Home.Enable, - allowTuners: AllowTuners.Enable, - allowSync: AllowSync.Enable, - allowCameraUpload: AllowCameraUpload.Enable, - allowChannels: AllowChannels.Enable, - allowSubtitleAdmin: AllowSubtitleAdmin.Enable, - filterAll: "", - filterMovies: "", - filterMusic: "", - filterPhotos: "", - filterTelevision: "", - restricted: Restricted.Enable, - server: [ - { - id: 907759180, - serverId: 9999999, - machineIdentifier: "fbb8aa6be6e0c997c6268bc2b4431c8807f70a3", - name: "ConnectedUserFlix", - lastSeenAt: 1556281940, - numLibraries: 16, - allLibraries: AllLibraries.Enable, - owned: Owned.Enable, - pending: Pending.Enable, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | User's unique ID. | 22526914 | -| `title` | *string* | :heavy_check_mark: | User's display name. | Plex User | -| `username` | *string* | :heavy_check_mark: | User's username. | zgfuc7krcqfimrmb9lsl5j | -| `email` | *string* | :heavy_check_mark: | User's email address. | zgfuc7krcqfimrmb9lsl5j@protonmail.com | -| `recommendationsPlaylistId` | *string* | :heavy_minus_sign: | ID of the user's recommendation playlist. | | -| `thumb` | *string* | :heavy_check_mark: | URL to the user's avatar image. | https://plex.tv/users/3346028014e93acd/avatar?c=1731605021 | -| `protected` | [operations.Protected](../../../sdk/models/operations/protected.md) | :heavy_minus_sign: | N/A | 1 | -| `home` | [operations.Home](../../../sdk/models/operations/home.md) | :heavy_minus_sign: | N/A | 1 | -| `allowTuners` | [operations.AllowTuners](../../../sdk/models/operations/allowtuners.md) | :heavy_minus_sign: | N/A | 1 | -| `allowSync` | [operations.AllowSync](../../../sdk/models/operations/allowsync.md) | :heavy_minus_sign: | N/A | 1 | -| `allowCameraUpload` | [operations.AllowCameraUpload](../../../sdk/models/operations/allowcameraupload.md) | :heavy_minus_sign: | N/A | 1 | -| `allowChannels` | [operations.AllowChannels](../../../sdk/models/operations/allowchannels.md) | :heavy_minus_sign: | N/A | 1 | -| `allowSubtitleAdmin` | [operations.AllowSubtitleAdmin](../../../sdk/models/operations/allowsubtitleadmin.md) | :heavy_minus_sign: | N/A | 1 | -| `filterAll` | *string* | :heavy_minus_sign: | Filters applied for all content. | | -| `filterMovies` | *string* | :heavy_minus_sign: | Filters applied for movies. | | -| `filterMusic` | *string* | :heavy_minus_sign: | Filters applied for music. | | -| `filterPhotos` | *string* | :heavy_minus_sign: | Filters applied for photos. | | -| `filterTelevision` | *string* | :heavy_minus_sign: | Filters applied for television. | | -| `restricted` | [operations.Restricted](../../../sdk/models/operations/restricted.md) | :heavy_minus_sign: | N/A | 1 | -| `server` | [operations.GetUsersServer](../../../sdk/models/operations/getusersserver.md)[] | :heavy_check_mark: | List of servers owned by the user. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/userprofile.md b/docs/sdk/models/operations/userprofile.md deleted file mode 100644 index 48a35563..00000000 --- a/docs/sdk/models/operations/userprofile.md +++ /dev/null @@ -1,37 +0,0 @@ -# UserProfile - -## Example Usage - -```typescript -import { - AutoSelectSubtitle, - DefaultSubtitleAccessibility, - DefaultSubtitleForced, - MediaReviewsVisibility, - UserProfile, - WatchedIndicator, -} from "@lukehagar/plexjs/sdk/models/operations"; - -let value: UserProfile = { - defaultAudioLanguage: "ja", - defaultSubtitleLanguage: "en", - autoSelectSubtitle: AutoSelectSubtitle.Enable, - defaultSubtitleAccessibility: DefaultSubtitleAccessibility.Enable, - defaultSubtitleForced: DefaultSubtitleForced.Enable, - watchedIndicator: WatchedIndicator.Enable, - mediaReviewsVisibility: MediaReviewsVisibility.Enable, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `autoSelectAudio` | *boolean* | :heavy_minus_sign: | If the account has automatically select audio and subtitle tracks enabled | true | -| `defaultAudioLanguage` | *string* | :heavy_check_mark: | The preferred audio language for the account | ja | -| `defaultSubtitleLanguage` | *string* | :heavy_check_mark: | The preferred subtitle language for the account | en | -| `autoSelectSubtitle` | [operations.AutoSelectSubtitle](../../../sdk/models/operations/autoselectsubtitle.md) | :heavy_minus_sign: | N/A | 1 | -| `defaultSubtitleAccessibility` | [operations.DefaultSubtitleAccessibility](../../../sdk/models/operations/defaultsubtitleaccessibility.md) | :heavy_minus_sign: | N/A | 1 | -| `defaultSubtitleForced` | [operations.DefaultSubtitleForced](../../../sdk/models/operations/defaultsubtitleforced.md) | :heavy_minus_sign: | N/A | 1 | -| `watchedIndicator` | [operations.WatchedIndicator](../../../sdk/models/operations/watchedindicator.md) | :heavy_minus_sign: | N/A | 1 | -| `mediaReviewsVisibility` | [operations.MediaReviewsVisibility](../../../sdk/models/operations/mediareviewsvisibility.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/voicesearchhubsglobals.md b/docs/sdk/models/operations/voicesearchhubsglobals.md new file mode 100644 index 00000000..d4b9c26b --- /dev/null +++ b/docs/sdk/models/operations/voicesearchhubsglobals.md @@ -0,0 +1,35 @@ +# VoiceSearchHubsGlobals + +## Example Usage + +```typescript +import { VoiceSearchHubsGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: VoiceSearchHubsGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/voicesearchhubsmediacontainer.md b/docs/sdk/models/operations/voicesearchhubsmediacontainer.md new file mode 100644 index 00000000..557006d0 --- /dev/null +++ b/docs/sdk/models/operations/voicesearchhubsmediacontainer.md @@ -0,0 +1,187 @@ +# VoiceSearchHubsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { VoiceSearchHubsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: VoiceSearchHubsMediaContainer = { + hub: [ + { + type: "track", + context: "hub.home.onDeck", + hubIdentifier: "home.onDeck", + key: "/hubs/sections/home/onDeck", + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + size: 1, + subtype: "podcast", + totalSize: 8, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `hub` | [shared.Hub](../../../sdk/models/shared/hub.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/voicesearchhubsrequest.md b/docs/sdk/models/operations/voicesearchhubsrequest.md new file mode 100644 index 00000000..6c3baf9c --- /dev/null +++ b/docs/sdk/models/operations/voicesearchhubsrequest.md @@ -0,0 +1,29 @@ +# VoiceSearchHubsRequest + +## Example Usage + +```typescript +import { VoiceSearchHubsRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: VoiceSearchHubsRequest = { + query: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `query` | *string* | :heavy_check_mark: | The query term | | +| `type` | *number* | :heavy_minus_sign: | The metadata type to filter by | | +| `limit` | *number* | :heavy_minus_sign: | The number of items to return per hub. 3 if not specified | | \ No newline at end of file diff --git a/docs/sdk/models/operations/voicesearchhubsresponse.md b/docs/sdk/models/operations/voicesearchhubsresponse.md new file mode 100644 index 00000000..9007ac5c --- /dev/null +++ b/docs/sdk/models/operations/voicesearchhubsresponse.md @@ -0,0 +1,32 @@ +# VoiceSearchHubsResponse + +## Example Usage + +```typescript +import { VoiceSearchHubsResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: VoiceSearchHubsResponse = { + contentType: "", + statusCode: 332632, + headers: { + "key": [ + "", + "", + "", + ], + "key1": [ + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `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 | +| `object` | [operations.VoiceSearchHubsResponseBody](../../../sdk/models/operations/voicesearchhubsresponsebody.md) | :heavy_minus_sign: | OK | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/voicesearchhubsresponsebody.md b/docs/sdk/models/operations/voicesearchhubsresponsebody.md new file mode 100644 index 00000000..9a017cb9 --- /dev/null +++ b/docs/sdk/models/operations/voicesearchhubsresponsebody.md @@ -0,0 +1,183 @@ +# VoiceSearchHubsResponseBody + +OK + +## Example Usage + +```typescript +import { VoiceSearchHubsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: VoiceSearchHubsResponseBody = { + mediaContainer: { + hub: [ + { + type: "track", + context: "hub.home.onDeck", + hubIdentifier: "home.onDeck", + key: "/hubs/sections/home/onDeck", + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: + "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + size: 1, + subtype: "podcast", + totalSize: 8, + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [operations.VoiceSearchHubsMediaContainer](../../../sdk/models/operations/voicesearchhubsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/operations/watchedindicator.md b/docs/sdk/models/operations/watchedindicator.md deleted file mode 100644 index 6801abea..00000000 --- a/docs/sdk/models/operations/watchedindicator.md +++ /dev/null @@ -1,18 +0,0 @@ -# WatchedIndicator - -Whether or not media watched indicators are enabled (little orange dot on media) - -## Example Usage - -```typescript -import { WatchedIndicator } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: WatchedIndicator = WatchedIndicator.Enable; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Disable` | 0 | -| `Enable` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/writelogresponse.md b/docs/sdk/models/operations/writelogresponse.md new file mode 100644 index 00000000..d76fe60f --- /dev/null +++ b/docs/sdk/models/operations/writelogresponse.md @@ -0,0 +1,20 @@ +# WriteLogResponse + +## Example Usage + +```typescript +import { WriteLogResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: WriteLogResponse = { + contentType: "", + statusCode: 270431, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/writemessageglobals.md b/docs/sdk/models/operations/writemessageglobals.md new file mode 100644 index 00000000..a205f226 --- /dev/null +++ b/docs/sdk/models/operations/writemessageglobals.md @@ -0,0 +1,35 @@ +# WriteMessageGlobals + +## Example Usage + +```typescript +import { WriteMessageGlobals } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: WriteMessageGlobals = { + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | \ No newline at end of file diff --git a/docs/sdk/models/operations/writemessagelevel.md b/docs/sdk/models/operations/writemessagelevel.md new file mode 100644 index 00000000..87c20e14 --- /dev/null +++ b/docs/sdk/models/operations/writemessagelevel.md @@ -0,0 +1,27 @@ +# WriteMessageLevel + +An integer log level to write to the PMS log with. + - 0: Error + - 1: Warning + - 2: Info + - 3: Debug + - 4: Verbose + + +## Example Usage + +```typescript +import { WriteMessageLevel } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: WriteMessageLevel = WriteMessageLevel.Four; +``` + +## Values + +| Name | Value | +| ------- | ------- | +| `Zero` | 0 | +| `One` | 1 | +| `Two` | 2 | +| `Three` | 3 | +| `Four` | 4 | \ No newline at end of file diff --git a/docs/sdk/models/operations/writemessagerequest.md b/docs/sdk/models/operations/writemessagerequest.md new file mode 100644 index 00000000..4c39955f --- /dev/null +++ b/docs/sdk/models/operations/writemessagerequest.md @@ -0,0 +1,27 @@ +# WriteMessageRequest + +## Example Usage + +```typescript +import { WriteMessageRequest } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: WriteMessageRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 | +| `xPlexProduct` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku | +| `xPlexVersion` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 | +| `xPlexPlatform` | *string* | :heavy_minus_sign: | The platform of the client | Roku | +| `xPlexPlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `xPlexDevice` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `xPlexModel` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `xPlexDeviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku | +| `xPlexDeviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV | +| `xPlexMarketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay | +| `level` | [operations.WriteMessageLevel](../../../sdk/models/operations/writemessagelevel.md) | :heavy_minus_sign: | An integer log level to write to the PMS log with.
- 0: Error
- 1: Warning
- 2: Info
- 3: Debug
- 4: Verbose
| | +| `message` | *string* | :heavy_minus_sign: | The text of the message to write to the log. | | +| `source` | *string* | :heavy_minus_sign: | A string indicating the source of the message. | | \ No newline at end of file diff --git a/docs/sdk/models/operations/writemessageresponse.md b/docs/sdk/models/operations/writemessageresponse.md new file mode 100644 index 00000000..0c34eeb7 --- /dev/null +++ b/docs/sdk/models/operations/writemessageresponse.md @@ -0,0 +1,20 @@ +# WriteMessageResponse + +## Example Usage + +```typescript +import { WriteMessageResponse } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: WriteMessageResponse = { + contentType: "", + statusCode: 609077, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | \ No newline at end of file diff --git a/docs/sdk/models/operations/writer.md b/docs/sdk/models/operations/writer.md deleted file mode 100644 index f734e50a..00000000 --- a/docs/sdk/models/operations/writer.md +++ /dev/null @@ -1,26 +0,0 @@ -# Writer - -## Example Usage - -```typescript -import { Writer } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: Writer = { - id: 126522, - filter: "writer=126522", - tag: "Jamie P. Hanson", - tagKey: "5d77683d85719b001f3a535e", - thumb: - "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `id` | *number* | :heavy_check_mark: | Unique identifier for the writer. | 126522 | -| `filter` | *string* | :heavy_check_mark: | The filter string used to query this writer. | writer=126522 | -| `tag` | *string* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson | -| `tagKey` | *string* | :heavy_minus_sign: | A 24-character hexadecimal unique key associated with the writer’s tag, used for internal identification. | 5d77683d85719b001f3a535e | -| `thumb` | *string* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the writer. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | \ No newline at end of file diff --git a/docs/sdk/models/shared/advancedsubtitles.md b/docs/sdk/models/shared/advancedsubtitles.md new file mode 100644 index 00000000..d548ff59 --- /dev/null +++ b/docs/sdk/models/shared/advancedsubtitles.md @@ -0,0 +1,17 @@ +# AdvancedSubtitles + +## Example Usage + +```typescript +import { AdvancedSubtitles } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: AdvancedSubtitles = AdvancedSubtitles.Burn; +``` + +## Values + +| Name | Value | +| --------- | --------- | +| `Burn` | burn | +| `Text` | text | +| `Unknown` | unknown | \ No newline at end of file diff --git a/docs/sdk/models/shared/airingstype.md b/docs/sdk/models/shared/airingstype.md new file mode 100644 index 00000000..876e9d41 --- /dev/null +++ b/docs/sdk/models/shared/airingstype.md @@ -0,0 +1,16 @@ +# AiringsType + +## Example Usage + +```typescript +import { AiringsType } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: AiringsType = AiringsType.NewAndRepeatAirings; +``` + +## Values + +| Name | Value | +| ---------------------- | ---------------------- | +| `NewAiringsOnly` | New Airings Only | +| `NewAndRepeatAirings` | New and Repeat Airings | \ No newline at end of file diff --git a/docs/sdk/models/shared/boolint.md b/docs/sdk/models/shared/boolint.md new file mode 100644 index 00000000..4ba8a0b2 --- /dev/null +++ b/docs/sdk/models/shared/boolint.md @@ -0,0 +1,16 @@ +# BoolInt + +## Example Usage + +```typescript +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: BoolInt = BoolInt.One; +``` + +## Values + +| Name | Value | +| ------ | ------ | +| `Zero` | 0 | +| `One` | 1 | \ No newline at end of file diff --git a/docs/sdk/models/shared/channel.md b/docs/sdk/models/shared/channel.md new file mode 100644 index 00000000..246bfb7d --- /dev/null +++ b/docs/sdk/models/shared/channel.md @@ -0,0 +1,22 @@ +# Channel + +## Example Usage + +```typescript +import { Channel } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Channel = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `callSign` | *string* | :heavy_minus_sign: | N/A | +| `channelVcn` | *string* | :heavy_minus_sign: | N/A | +| `hd` | *boolean* | :heavy_minus_sign: | N/A | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `language` | *string* | :heavy_minus_sign: | N/A | +| `thumb` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/channelmapping.md b/docs/sdk/models/shared/channelmapping.md new file mode 100644 index 00000000..8e9ea5c5 --- /dev/null +++ b/docs/sdk/models/shared/channelmapping.md @@ -0,0 +1,18 @@ +# ChannelMapping + +## Example Usage + +```typescript +import { ChannelMapping } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: ChannelMapping = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `channelKey` | *string* | :heavy_minus_sign: | N/A | +| `deviceIdentifier` | *string* | :heavy_minus_sign: | N/A | +| `enabled` | *string* | :heavy_minus_sign: | N/A | +| `lineupIdentifier` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/composite.md b/docs/sdk/models/shared/composite.md new file mode 100644 index 00000000..b64423a0 --- /dev/null +++ b/docs/sdk/models/shared/composite.md @@ -0,0 +1,25 @@ +# Composite + +## Example Usage + +```typescript +import { Composite } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Composite = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `type` | *number* | :heavy_minus_sign: | Limit composite to specified metadata types | +| `format` | [shared.Format](../../../sdk/models/shared/format.md) | :heavy_minus_sign: | The image type | +| `backgroundColor` | *string* | :heavy_minus_sign: | 6 character hex RGB value for background color for image | +| `border` | *number* | :heavy_minus_sign: | The width of the intra-image border | +| `cols` | *number* | :heavy_minus_sign: | Number of columns to construct in the composite image | +| `crop` | [shared.Crop](../../../sdk/models/shared/crop.md) | :heavy_minus_sign: | Where to crop source images to fit into composite image proportions | +| `height` | *number* | :heavy_minus_sign: | The height of the image | +| `media` | [shared.MediaEnum](../../../sdk/models/shared/mediaenum.md) | :heavy_minus_sign: | The default image type to use as the sources | +| `repeat` | *boolean* | :heavy_minus_sign: | Allow repetion of images if there are not enough source images to fill grid | +| `rows` | *number* | :heavy_minus_sign: | Number of rows to construct in the composite image | +| `width` | *number* | :heavy_minus_sign: | The width of the image | \ No newline at end of file diff --git a/docs/sdk/models/shared/crop.md b/docs/sdk/models/shared/crop.md new file mode 100644 index 00000000..2c6a68b8 --- /dev/null +++ b/docs/sdk/models/shared/crop.md @@ -0,0 +1,18 @@ +# Crop + +Where to crop source images to fit into composite image proportions + +## Example Usage + +```typescript +import { Crop } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Crop = Crop.Center; +``` + +## Values + +| Name | Value | +| -------- | -------- | +| `Center` | center | +| `Top` | top | \ No newline at end of file diff --git a/docs/sdk/models/shared/decision.md b/docs/sdk/models/shared/decision.md new file mode 100644 index 00000000..88f5776b --- /dev/null +++ b/docs/sdk/models/shared/decision.md @@ -0,0 +1,17 @@ +# Decision + +## Example Usage + +```typescript +import { Decision } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Decision = Decision.Directplay; +``` + +## Values + +| Name | Value | +| ------------ | ------------ | +| `Directplay` | directplay | +| `Transcode` | transcode | +| `None` | none | \ No newline at end of file diff --git a/docs/sdk/models/shared/default.md b/docs/sdk/models/shared/default.md new file mode 100644 index 00000000..bc74bfa3 --- /dev/null +++ b/docs/sdk/models/shared/default.md @@ -0,0 +1,25 @@ +# Default + +The default value of this setting + + +## Supported Types + +### `string` + +```typescript +const value: string = ""; +``` + +### `number` + +```typescript +const value: number = 1284.03; +``` + +### `boolean` + +```typescript +const value: boolean = true; +``` + diff --git a/docs/sdk/models/shared/defaultdirection.md b/docs/sdk/models/shared/defaultdirection.md new file mode 100644 index 00000000..9bd28488 --- /dev/null +++ b/docs/sdk/models/shared/defaultdirection.md @@ -0,0 +1,18 @@ +# DefaultDirection + +This default diction of this sort + +## Example Usage + +```typescript +import { DefaultDirection } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: DefaultDirection = DefaultDirection.Desc; +``` + +## Values + +| Name | Value | +| ------ | ------ | +| `Asc` | asc | +| `Desc` | desc | \ No newline at end of file diff --git a/docs/sdk/models/shared/defaultenum.md b/docs/sdk/models/shared/defaultenum.md new file mode 100644 index 00000000..fc8de2d6 --- /dev/null +++ b/docs/sdk/models/shared/defaultenum.md @@ -0,0 +1,18 @@ +# DefaultEnum + +If present, this sort is the default and in this direction + +## Example Usage + +```typescript +import { DefaultEnum } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: DefaultEnum = DefaultEnum.Asc; +``` + +## Values + +| Name | Value | +| ------ | ------ | +| `Asc` | asc | +| `Desc` | desc | \ No newline at end of file diff --git a/docs/sdk/models/shared/device.md b/docs/sdk/models/shared/device.md new file mode 100644 index 00000000..c224688b --- /dev/null +++ b/docs/sdk/models/shared/device.md @@ -0,0 +1,27 @@ +# Device + +## Example Usage + +```typescript +import { Device } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Device = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `channelMapping` | [shared.ChannelMapping](../../../sdk/models/shared/channelmapping.md)[] | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `lastSeenAt` | *number* | :heavy_minus_sign: | N/A | +| `make` | *string* | :heavy_minus_sign: | N/A | +| `model` | *string* | :heavy_minus_sign: | N/A | +| `modelNumber` | *string* | :heavy_minus_sign: | N/A | +| `protocol` | *string* | :heavy_minus_sign: | N/A | +| `sources` | *string* | :heavy_minus_sign: | N/A | +| `state` | *string* | :heavy_minus_sign: | N/A | +| `status` | *string* | :heavy_minus_sign: | N/A | +| `tuners` | *string* | :heavy_minus_sign: | N/A | +| `uri` | *string* | :heavy_minus_sign: | N/A | +| `uuid` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/directory.md b/docs/sdk/models/shared/directory.md new file mode 100644 index 00000000..8e7fa6de --- /dev/null +++ b/docs/sdk/models/shared/directory.md @@ -0,0 +1,30 @@ +# Directory + +## Example Usage + +```typescript +import { Directory } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Directory = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `art` | *string* | :heavy_minus_sign: | N/A | +| `content` | *boolean* | :heavy_minus_sign: | N/A | +| `filter` | *string* | :heavy_minus_sign: | N/A | +| `hasPrefs` | *boolean* | :heavy_minus_sign: | N/A | +| `hasStoreServices` | *boolean* | :heavy_minus_sign: | N/A | +| `hubKey` | *string* | :heavy_minus_sign: | N/A | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `lastAccessedAt` | *number* | :heavy_minus_sign: | N/A | +| `pivot` | [shared.DirectoryPivot](../../../sdk/models/shared/directorypivot.md)[] | :heavy_minus_sign: | N/A | +| `share` | *number* | :heavy_minus_sign: | N/A | +| `thumb` | *string* | :heavy_minus_sign: | N/A | +| `titleBar` | *string* | :heavy_minus_sign: | N/A | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/directorypivot.md b/docs/sdk/models/shared/directorypivot.md new file mode 100644 index 00000000..b7d7f274 --- /dev/null +++ b/docs/sdk/models/shared/directorypivot.md @@ -0,0 +1,20 @@ +# DirectoryPivot + +## Example Usage + +```typescript +import { DirectoryPivot } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: DirectoryPivot = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `context` | *string* | :heavy_minus_sign: | N/A | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `symbol` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/directoryresponse.md b/docs/sdk/models/shared/directoryresponse.md new file mode 100644 index 00000000..a6542bdc --- /dev/null +++ b/docs/sdk/models/shared/directoryresponse.md @@ -0,0 +1,17 @@ +# DirectoryResponse + +## Example Usage + +```typescript +import { DirectoryResponse } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: DirectoryResponse = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `count` | *number* | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | The key where this directory is found | +| `title` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/dvr.md b/docs/sdk/models/shared/dvr.md new file mode 100644 index 00000000..831120c8 --- /dev/null +++ b/docs/sdk/models/shared/dvr.md @@ -0,0 +1,19 @@ +# Dvr + +## Example Usage + +```typescript +import { Dvr } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Dvr = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `device` | [shared.Device](../../../sdk/models/shared/device.md)[] | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `language` | *string* | :heavy_minus_sign: | N/A | +| `lineup` | *string* | :heavy_minus_sign: | N/A | +| `uuid` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/dvrrequesthandlerslashgetresponses200.md b/docs/sdk/models/shared/dvrrequesthandlerslashgetresponses200.md new file mode 100644 index 00000000..50a0e7a0 --- /dev/null +++ b/docs/sdk/models/shared/dvrrequesthandlerslashgetresponses200.md @@ -0,0 +1,17 @@ +# DvrRequestHandlerSlashGetResponses200 + +OK + +## Example Usage + +```typescript +import { DvrRequestHandlerSlashGetResponses200 } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: DvrRequestHandlerSlashGetResponses200 = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [shared.DvrRequestHandlerSlashGetResponses200MediaContainer](../../../sdk/models/shared/dvrrequesthandlerslashgetresponses200mediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/dvrrequesthandlerslashgetresponses200mediacontainer.md b/docs/sdk/models/shared/dvrrequesthandlerslashgetresponses200mediacontainer.md new file mode 100644 index 00000000..6e055fba --- /dev/null +++ b/docs/sdk/models/shared/dvrrequesthandlerslashgetresponses200mediacontainer.md @@ -0,0 +1,16 @@ +# DvrRequestHandlerSlashGetResponses200MediaContainer + +## Example Usage + +```typescript +import { DvrRequestHandlerSlashGetResponses200MediaContainer } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: DvrRequestHandlerSlashGetResponses200MediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [shared.DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer](../../../sdk/models/shared/dvrrequesthandlerslashgetresponses200mediacontainermediacontainer.md) | :heavy_minus_sign: | N/A | +| `dvr` | [shared.Dvr](../../../sdk/models/shared/dvr.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/dvrrequesthandlerslashgetresponses200mediacontainermediacontainer.md b/docs/sdk/models/shared/dvrrequesthandlerslashgetresponses200mediacontainermediacontainer.md new file mode 100644 index 00000000..8161fe6a --- /dev/null +++ b/docs/sdk/models/shared/dvrrequesthandlerslashgetresponses200mediacontainermediacontainer.md @@ -0,0 +1,25 @@ +# DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer = + {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `status` | *number* | :heavy_minus_sign: | A status indicator. If present and non-zero, indicates an error | \ No newline at end of file diff --git a/docs/sdk/models/shared/filter.md b/docs/sdk/models/shared/filter.md new file mode 100644 index 00000000..8069d678 --- /dev/null +++ b/docs/sdk/models/shared/filter.md @@ -0,0 +1,34 @@ +# Filter + +Each `Filter` object contains a description of the filter. Note that it is not an exhaustive list of the full media query language, but an important subset useful for top-level API. + + +## Example Usage + +```typescript +import { Filter } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Filter = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `title` | *string* | :heavy_minus_sign: | The title for the filter. | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `art` | *string* | :heavy_minus_sign: | N/A | +| `content` | *boolean* | :heavy_minus_sign: | N/A | +| `filter` | *string* | :heavy_minus_sign: | This represents the filter name used for the filter, which can be used to construct complex media queries with. | +| `hasPrefs` | *boolean* | :heavy_minus_sign: | N/A | +| `hasStoreServices` | *boolean* | :heavy_minus_sign: | N/A | +| `hubKey` | *string* | :heavy_minus_sign: | N/A | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a "Genre" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element. | +| `lastAccessedAt` | *number* | :heavy_minus_sign: | N/A | +| `pivot` | [shared.FilterPivot](../../../sdk/models/shared/filterpivot.md)[] | :heavy_minus_sign: | N/A | +| `share` | *number* | :heavy_minus_sign: | N/A | +| `thumb` | *string* | :heavy_minus_sign: | N/A | +| `titleBar` | *string* | :heavy_minus_sign: | N/A | +| `filterType` | *string* | :heavy_minus_sign: | This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter. | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/filterpivot.md b/docs/sdk/models/shared/filterpivot.md new file mode 100644 index 00000000..c491b0d2 --- /dev/null +++ b/docs/sdk/models/shared/filterpivot.md @@ -0,0 +1,20 @@ +# FilterPivot + +## Example Usage + +```typescript +import { FilterPivot } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: FilterPivot = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `context` | *string* | :heavy_minus_sign: | N/A | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `symbol` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/format.md b/docs/sdk/models/shared/format.md new file mode 100644 index 00000000..5e226d30 --- /dev/null +++ b/docs/sdk/models/shared/format.md @@ -0,0 +1,18 @@ +# Format + +The image type + +## Example Usage + +```typescript +import { Format } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Format = Format.Jpg; +``` + +## Values + +| Name | Value | +| ----- | ----- | +| `Jpg` | jpg | +| `Png` | png | \ No newline at end of file diff --git a/docs/sdk/models/shared/getresponses200.md b/docs/sdk/models/shared/getresponses200.md new file mode 100644 index 00000000..e3349a4c --- /dev/null +++ b/docs/sdk/models/shared/getresponses200.md @@ -0,0 +1,17 @@ +# GetResponses200 + +OK + +## Example Usage + +```typescript +import { GetResponses200 } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: GetResponses200 = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [shared.GetResponses200MediaContainer](../../../sdk/models/shared/getresponses200mediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/getresponses200mediacontainer.md b/docs/sdk/models/shared/getresponses200mediacontainer.md new file mode 100644 index 00000000..b8826661 --- /dev/null +++ b/docs/sdk/models/shared/getresponses200mediacontainer.md @@ -0,0 +1,24 @@ +# GetResponses200MediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { GetResponses200MediaContainer } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: GetResponses200MediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `hub` | [shared.HubResponse](../../../sdk/models/shared/hubresponse.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/historyallgetresponses200.md b/docs/sdk/models/shared/historyallgetresponses200.md new file mode 100644 index 00000000..d8bf9eb9 --- /dev/null +++ b/docs/sdk/models/shared/historyallgetresponses200.md @@ -0,0 +1,17 @@ +# HistoryAllGetResponses200 + +OK + +## Example Usage + +```typescript +import { HistoryAllGetResponses200 } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: HistoryAllGetResponses200 = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [shared.HistoryAllGetResponses200MediaContainer](../../../sdk/models/shared/historyallgetresponses200mediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/historyallgetresponses200mediacontainer.md b/docs/sdk/models/shared/historyallgetresponses200mediacontainer.md new file mode 100644 index 00000000..6d298772 --- /dev/null +++ b/docs/sdk/models/shared/historyallgetresponses200mediacontainer.md @@ -0,0 +1,24 @@ +# HistoryAllGetResponses200MediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { HistoryAllGetResponses200MediaContainer } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: HistoryAllGetResponses200MediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `metadata` | [shared.MetadatumResponse](../../../sdk/models/shared/metadatumresponse.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/homevisibility.md b/docs/sdk/models/shared/homevisibility.md new file mode 100644 index 00000000..24838904 --- /dev/null +++ b/docs/sdk/models/shared/homevisibility.md @@ -0,0 +1,25 @@ +# HomeVisibility + +Whether this hub is visible on the home screen + - all: Visible to all users + - none: Visible to no users + - admin: Visible to only admin users + - shared: Visible to shared users + + +## Example Usage + +```typescript +import { HomeVisibility } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: HomeVisibility = HomeVisibility.All; +``` + +## Values + +| Name | Value | +| -------- | -------- | +| `All` | all | +| `None` | none | +| `Admin` | admin | +| `Shared` | shared | \ No newline at end of file diff --git a/docs/sdk/models/shared/hub.md b/docs/sdk/models/shared/hub.md new file mode 100644 index 00000000..3f9fd7c5 --- /dev/null +++ b/docs/sdk/models/shared/hub.md @@ -0,0 +1,188 @@ +# Hub + +## Example Usage + +```typescript +import { Hub } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Hub = { + type: "track", + context: "hub.home.onDeck", + hubIdentifier: "home.onDeck", + key: "/hubs/sections/home/onDeck", + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + size: 1, + subtype: "podcast", + totalSize: 8, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `title` | *string* | :heavy_minus_sign: | A title for this grouping of content | | +| `type` | *string* | :heavy_minus_sign: | The type of the items contained in this hub, or possibly `mixed` if there are multiple types | track | +| `context` | *string* | :heavy_minus_sign: | N/A | hub.home.onDeck | +| `hubIdentifier` | *string* | :heavy_minus_sign: | A unique identifier for the hub | home.onDeck | +| `hubKey` | *string* | :heavy_minus_sign: | A key at which the exact content currently displayed can be fetched again. This is particularly important when a hub is marked as random and requesting the `key` may get different results. It's otherwise optional.
| | +| `key` | *string* | :heavy_minus_sign: | The key at which all of the content for this hub can be retrieved | /hubs/sections/home/onDeck | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md)[] | :heavy_minus_sign: | N/A | | +| `more` | *boolean* | :heavy_minus_sign: | "A boolean indicating that the hub contains more than what's included in the current response."
| | +| `promoted` | *boolean* | :heavy_minus_sign: | Indicating if the hub should be promoted to the user's homescreen | | +| `random` | *boolean* | :heavy_minus_sign: | Indicating that the contents of the hub may change on each request | | +| `size` | *number* | :heavy_minus_sign: | N/A | 1 | +| `style` | *string* | :heavy_minus_sign: | A suggestion on how this hub's contents might be displayed by a client. Some examples include `hero`, `list`, `spotlight`, and `upsell` | | +| `subtype` | *string* | :heavy_minus_sign: | The subtype of the items contained in this hub, or possibly `mixed` if there are multiple types | podcast | +| `totalSize` | *number* | :heavy_minus_sign: | N/A | 8 | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/shared/hubresponse.md b/docs/sdk/models/shared/hubresponse.md new file mode 100644 index 00000000..82667ed1 --- /dev/null +++ b/docs/sdk/models/shared/hubresponse.md @@ -0,0 +1,21 @@ +# HubResponse + +## Example Usage + +```typescript +import { HubResponse } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: HubResponse = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `homeVisibility` | [shared.HomeVisibility](../../../sdk/models/shared/homevisibility.md) | :heavy_minus_sign: | Whether this hub is visible on the home screen
- all: Visible to all users
- none: Visible to no users
- admin: Visible to only admin users
- shared: Visible to shared users
| +| `identifier` | *string* | :heavy_minus_sign: | The identifier for this hub | +| `promotedToOwnHome` | *boolean* | :heavy_minus_sign: | Whether this hub is visible to admin user home | +| `promotedToRecommended` | *boolean* | :heavy_minus_sign: | Whether this hub is promoted to all for recommendations | +| `promotedToSharedHome` | *boolean* | :heavy_minus_sign: | Whether this hub is visible to shared user's home | +| `recommendationsVisibility` | [shared.RecommendationsVisibility](../../../sdk/models/shared/recommendationsvisibility.md) | :heavy_minus_sign: | The visibility of this hub in recommendations:
- all: Visible to all users
- none: Visible to no users
- admin: Visible to only admin users
- shared: Visible to shared users
| +| `title` | *string* | :heavy_minus_sign: | The title of this hub | \ No newline at end of file diff --git a/docs/sdk/models/shared/image.md b/docs/sdk/models/shared/image.md new file mode 100644 index 00000000..a8c6e510 --- /dev/null +++ b/docs/sdk/models/shared/image.md @@ -0,0 +1,20 @@ +# Image + +Images such as movie posters and background artwork are represented by Image elements. + + +## Example Usage + +```typescript +import { Image } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Image = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `type` | [shared.ImageType](../../../sdk/models/shared/imagetype.md) | :heavy_minus_sign: | Describes both the purpose and intended presentation of the image. | +| `alt` | *string* | :heavy_minus_sign: | Title to use for accessibility. | +| `url` | *string* | :heavy_minus_sign: | The relative path or absolute url for the image. | \ No newline at end of file diff --git a/docs/sdk/models/shared/imagetype.md b/docs/sdk/models/shared/imagetype.md new file mode 100644 index 00000000..393aa55c --- /dev/null +++ b/docs/sdk/models/shared/imagetype.md @@ -0,0 +1,21 @@ +# ImageType + +Describes both the purpose and intended presentation of the image. + +## Example Usage + +```typescript +import { ImageType } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: ImageType = ImageType.ClearLogo; +``` + +## Values + +| Name | Value | +| ------------- | ------------- | +| `Background` | background | +| `Banner` | banner | +| `ClearLogo` | clearLogo | +| `CoverPoster` | coverPoster | +| `Snapshot` | snapshot | \ No newline at end of file diff --git a/docs/sdk/models/shared/items.md b/docs/sdk/models/shared/items.md new file mode 100644 index 00000000..e5e8f901 --- /dev/null +++ b/docs/sdk/models/shared/items.md @@ -0,0 +1,389 @@ +# Items + +Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + +Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + +Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + + +## Example Usage + +```typescript +import { Items } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Items = { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + metadataItem: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `title` | *any* | :heavy_minus_sign: | The title of the item (e.g. “300” or “The Simpsons”) | +| `type` | *any* | :heavy_minus_sign: | The type of the video item, such as `movie`, `episode`, or `clip`. | +| `absoluteIndex` | *number* | :heavy_minus_sign: | When present, contains the disc number for a track on multi-disc albums. | +| `addedAt` | *number* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was added to the library. | +| `art` | *any* | :heavy_minus_sign: | When present, the URL for the background artwork for the item. | +| `audienceRating` | *number* | :heavy_minus_sign: | Some rating systems separate reviewer ratings from audience ratings | +| `audienceRatingImage` | *any* | :heavy_minus_sign: | A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). | +| `autotag` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `banner` | *any* | :heavy_minus_sign: | When present, the URL for a banner graphic for the item. | +| `chapterSource` | *any* | :heavy_minus_sign: | When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). | +| `composite` | *any* | :heavy_minus_sign: | When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). | +| `contentRating` | *any* | :heavy_minus_sign: | If known, the content rating (e.g. MPAA) for an item. | +| `country` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `director` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `duration` | *number* | :heavy_minus_sign: | When present, the duration for the item, in units of milliseconds. | +| `filter` | [shared.Filter](../../../sdk/models/shared/filter.md)[] | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `genre` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `grandparentArt` | *string* | :heavy_minus_sign: | The `art` of the grandparent | +| `grandparentHero` | *string* | :heavy_minus_sign: | The `hero` of the grandparent | +| `grandparentKey` | *string* | :heavy_minus_sign: | The `key` of the grandparent | +| `grandparentRatingKey` | *string* | :heavy_minus_sign: | The `ratingKey` of the grandparent | +| `grandparentTheme` | *string* | :heavy_minus_sign: | The `theme` of the grandparent | +| `grandparentThumb` | *string* | :heavy_minus_sign: | The `thumb` of the grandparent | +| `grandparentTitle` | *string* | :heavy_minus_sign: | The `title` of the grandparent | +| `guid` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `hero` | *any* | :heavy_minus_sign: | When present, the URL for a hero image for the item. | +| `image` | [shared.Image](../../../sdk/models/shared/image.md)[] | :heavy_minus_sign: | N/A | +| `index` | *number* | :heavy_minus_sign: | When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. | +| `key` | *any* | :heavy_minus_sign: | The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. | +| `lastViewedAt` | *number* | :heavy_minus_sign: | When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. | +| `leafCount` | *number* | :heavy_minus_sign: | For shows and seasons, contains the number of total episodes. | +| `media` | [shared.Media](../../../sdk/models/shared/media.md)[] | :heavy_minus_sign: | N/A | +| `originallyAvailableAt` | *any* | :heavy_minus_sign: | When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. | +| `originalTitle` | *any* | :heavy_minus_sign: | When present, used to indicate an item's original title, e.g. a movie's foreign title. | +| `parentHero` | *string* | :heavy_minus_sign: | The `hero` of the parent | +| `parentIndex` | *number* | :heavy_minus_sign: | The `index` of the parent | +| `parentKey` | *string* | :heavy_minus_sign: | The `key` of the parent | +| `parentRatingKey` | *string* | :heavy_minus_sign: | The `ratingKey` of the parent | +| `parentThumb` | *string* | :heavy_minus_sign: | The `thumb` of the parent | +| `parentTitle` | *string* | :heavy_minus_sign: | The `title` of the parent | +| `primaryExtraKey` | *any* | :heavy_minus_sign: | Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. | +| `prompt` | *string* | :heavy_minus_sign: | Prompt to give the user for this directory (such as `Search Movies`) | +| `rating` | *number* | :heavy_minus_sign: | When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. | +| `ratingArray` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `ratingCount` | *number* | :heavy_minus_sign: | Number of ratings under this metadata | +| `ratingImage` | *any* | :heavy_minus_sign: | When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. | +| `ratingKey` | *any* | :heavy_minus_sign: | This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. | +| `role` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `search` | *boolean* | :heavy_minus_sign: | Indicates this is a search directory | +| `secondary` | *boolean* | :heavy_minus_sign: | Used by old clients to provide nested menus allowing for primative (but structured) navigation. | +| `skipChildren` | *boolean* | :heavy_minus_sign: | When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. | +| `skipParent` | *boolean* | :heavy_minus_sign: | When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). | +| `sort` | [shared.Sort](../../../sdk/models/shared/sort.md)[] | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `studio` | *any* | :heavy_minus_sign: | When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). | +| `subtype` | *any* | :heavy_minus_sign: | The subtype of the video item, such as `photo` when the video item is in a photo library | +| `summary` | *any* | :heavy_minus_sign: | When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). | +| `tagline` | *any* | :heavy_minus_sign: | When present, a pithy one-liner about the item (usually only seen for movies). | +| `theme` | *any* | :heavy_minus_sign: | When present, the URL for theme music for the item (usually only for TV shows). | +| `thumb` | *any* | :heavy_minus_sign: | When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. | +| `titleSort` | *any* | :heavy_minus_sign: | Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). | +| `updatedAt` | *number* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). | +| `userRating` | *number* | :heavy_minus_sign: | When the user has rated an item, this contains the user rating | +| `viewCount` | *number* | :heavy_minus_sign: | When a users has completed watched or listened to an item, this attribute contains the number of consumptions. | +| `viewedLeafCount` | *number* | :heavy_minus_sign: | For shows and seasons, contains the number of viewed episodes. | +| `viewOffset` | *number* | :heavy_minus_sign: | When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. | +| `writer` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `year` | *number* | :heavy_minus_sign: | When present, the year associated with the item's release (e.g. release year for a movie). | +| `metadataItem` | [shared.Items](../../../sdk/models/shared/items.md)[] | :heavy_minus_sign: | N/A | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/librarysection.md b/docs/sdk/models/shared/librarysection.md new file mode 100644 index 00000000..a26f5f07 --- /dev/null +++ b/docs/sdk/models/shared/librarysection.md @@ -0,0 +1,34 @@ +# LibrarySection + +## Example Usage + +```typescript +import { LibrarySection } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: LibrarySection = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `agent` | *string* | :heavy_minus_sign: | N/A | +| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | +| `art` | *string* | :heavy_minus_sign: | N/A | +| `composite` | *string* | :heavy_minus_sign: | N/A | +| `content` | *boolean* | :heavy_minus_sign: | N/A | +| `contentChangedAt` | *number* | :heavy_minus_sign: | N/A | +| `createdAt` | *number* | :heavy_minus_sign: | N/A | +| `directory` | *boolean* | :heavy_minus_sign: | N/A | +| `filters` | *boolean* | :heavy_minus_sign: | Indicates whether this section has filtering capabilities | +| `hidden` | *boolean* | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `language` | *string* | :heavy_minus_sign: | N/A | +| `location` | [shared.LibrarySectionLocation](../../../sdk/models/shared/librarysectionlocation.md)[] | :heavy_minus_sign: | N/A | +| `refreshing` | *boolean* | :heavy_minus_sign: | Indicates whether this library section is currently scanning | +| `scannedAt` | *number* | :heavy_minus_sign: | N/A | +| `scanner` | *string* | :heavy_minus_sign: | N/A | +| `thumb` | *string* | :heavy_minus_sign: | N/A | +| `updatedAt` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/librarysectionlocation.md b/docs/sdk/models/shared/librarysectionlocation.md new file mode 100644 index 00000000..359ee5f7 --- /dev/null +++ b/docs/sdk/models/shared/librarysectionlocation.md @@ -0,0 +1,18 @@ +# LibrarySectionLocation + +Represents a top-level location on disk where media in this library section is stored + +## Example Usage + +```typescript +import { LibrarySectionLocation } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: LibrarySectionLocation = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `path` | *any* | :heavy_minus_sign: | The path of where this directory exists on disk | \ No newline at end of file diff --git a/docs/sdk/models/shared/lineup.md b/docs/sdk/models/shared/lineup.md new file mode 100644 index 00000000..a2f6cff8 --- /dev/null +++ b/docs/sdk/models/shared/lineup.md @@ -0,0 +1,19 @@ +# Lineup + +## Example Usage + +```typescript +import { Lineup } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Lineup = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | The type of this object (`lineup` in this case) | +| `lineupType` | [shared.LineupType](../../../sdk/models/shared/lineuptype.md) | :heavy_minus_sign: | - `-1`: N/A
- `0`: Over the air
- `1`: Cable
- `2`: Satellite
- `3`: IPTV
- `4`: Virtual
| +| `location` | *string* | :heavy_minus_sign: | N/A | +| `uuid` | *string* | :heavy_minus_sign: | The uuid of this lineup | \ No newline at end of file diff --git a/docs/sdk/models/shared/lineuptype.md b/docs/sdk/models/shared/lineuptype.md new file mode 100644 index 00000000..b6fad01c --- /dev/null +++ b/docs/sdk/models/shared/lineuptype.md @@ -0,0 +1,28 @@ +# LineupType + +- `-1`: N/A +- `0`: Over the air +- `1`: Cable +- `2`: Satellite +- `3`: IPTV +- `4`: Virtual + + +## Example Usage + +```typescript +import { LineupType } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: LineupType = LineupType.Two; +``` + +## Values + +| Name | Value | +| -------- | -------- | +| `Minus1` | -1 | +| `Zero` | 0 | +| `One` | 1 | +| `Two` | 2 | +| `Three` | 3 | +| `Four` | 4 | \ No newline at end of file diff --git a/docs/sdk/models/shared/locationparameter.md b/docs/sdk/models/shared/locationparameter.md new file mode 100644 index 00000000..9a25e983 --- /dev/null +++ b/docs/sdk/models/shared/locationparameter.md @@ -0,0 +1,17 @@ +# LocationParameter + +## Example Usage + +```typescript +import { LocationParameter } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: LocationParameter = LocationParameter.Wan; +``` + +## Values + +| Name | Value | +| ---------- | ---------- | +| `Lan` | lan | +| `Wan` | wan | +| `Cellular` | cellular | \ No newline at end of file diff --git a/docs/sdk/models/shared/media.md b/docs/sdk/models/shared/media.md new file mode 100644 index 00000000..bcf3b5eb --- /dev/null +++ b/docs/sdk/models/shared/media.md @@ -0,0 +1,100 @@ +# Media + +`Media` represents an one or more media files (parts) and is a child of a metadata item. There aren't necessarily any guaranteed attributes on media elements since the attributes will vary based on the type. The possible attributes are not documented here, but they typically have self-evident names. High-level media information that can be used for badging and flagging, such as `videoResolution` and codecs, is included on the media element. + + +## Example Usage + +```typescript +import { Media } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Media = { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| `aspectRatio` | *number* | :heavy_minus_sign: | N/A | 2.35 | +| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 2 | +| `audioCodec` | *any* | :heavy_minus_sign: | N/A | aac | +| `audioProfile` | *any* | :heavy_minus_sign: | N/A | lc | +| `bitrate` | *number* | :heavy_minus_sign: | N/A | 5612 | +| `container` | *any* | :heavy_minus_sign: | N/A | mov | +| `duration` | *number* | :heavy_minus_sign: | N/A | 150192 | +| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | +| `hasVoiceActivity` | *boolean* | :heavy_minus_sign: | N/A | true | +| `height` | *number* | :heavy_minus_sign: | N/A | 544 | +| `id` | *number* | :heavy_minus_sign: | N/A | 1 | +| `optimizedForStreaming` | *boolean* | :heavy_minus_sign: | N/A | false | +| `part` | [shared.Part](../../../sdk/models/shared/part.md)[] | :heavy_minus_sign: | N/A | | +| `videoCodec` | *any* | :heavy_minus_sign: | N/A | h264 | +| `videoFrameRate` | *any* | :heavy_minus_sign: | N/A | 24p | +| `videoProfile` | *any* | :heavy_minus_sign: | N/A | main | +| `videoResolution` | *any* | :heavy_minus_sign: | N/A | 720 | +| `width` | *number* | :heavy_minus_sign: | N/A | 1280 | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainer.md b/docs/sdk/models/shared/mediacontainer.md new file mode 100644 index 00000000..c1909bfb --- /dev/null +++ b/docs/sdk/models/shared/mediacontainer.md @@ -0,0 +1,23 @@ +# MediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { MediaContainer } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithartwork.md b/docs/sdk/models/shared/mediacontainerwithartwork.md new file mode 100644 index 00000000..0684365f --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithartwork.md @@ -0,0 +1,15 @@ +# MediaContainerWithArtwork + +## Example Usage + +```typescript +import { MediaContainerWithArtwork } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithArtwork = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [shared.MediaContainerWithArtworkMediaContainer](../../../sdk/models/shared/mediacontainerwithartworkmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithartworkmediacontainer.md b/docs/sdk/models/shared/mediacontainerwithartworkmediacontainer.md new file mode 100644 index 00000000..7caa508f --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithartworkmediacontainer.md @@ -0,0 +1,24 @@ +# MediaContainerWithArtworkMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { MediaContainerWithArtworkMediaContainer } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithArtworkMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `metadata` | [shared.MediaContainerWithArtworkMetadatum](../../../sdk/models/shared/mediacontainerwithartworkmetadatum.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithartworkmetadatum.md b/docs/sdk/models/shared/mediacontainerwithartworkmetadatum.md new file mode 100644 index 00000000..20f4beb6 --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithartworkmetadatum.md @@ -0,0 +1,18 @@ +# MediaContainerWithArtworkMetadatum + +## Example Usage + +```typescript +import { MediaContainerWithArtworkMetadatum } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithArtworkMetadatum = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `title` | *string* | :heavy_minus_sign: | The title of the item | +| `type` | [shared.MediaContainerWithArtworkType](../../../sdk/models/shared/mediacontainerwithartworktype.md) | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | The path to the artwork | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithartworktype.md b/docs/sdk/models/shared/mediacontainerwithartworktype.md new file mode 100644 index 00000000..f8ebc519 --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithartworktype.md @@ -0,0 +1,15 @@ +# MediaContainerWithArtworkType + +## Example Usage + +```typescript +import { MediaContainerWithArtworkType } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithArtworkType = MediaContainerWithArtworkType.Image; +``` + +## Values + +| Name | Value | +| ------- | ------- | +| `Image` | image | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithdecision.md b/docs/sdk/models/shared/mediacontainerwithdecision.md new file mode 100644 index 00000000..82e292f9 --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithdecision.md @@ -0,0 +1,174 @@ +# MediaContainerWithDecision + +`MediaContainer` is commonly found as the root of a response and is a pretty generic container. Common attributes include `identifier` and things related to paging (`offset`, `size`, `totalSize`). + +It is also common for a `MediaContainer` to contain attributes "hoisted" from its children. If every element in the container would have had the same attribute, then that attribute can be present on the container instead of being repeated on every element. For example, an album's list of tracks might include `parentTitle` on the container since all of the tracks have the same album title. A container may have a `source` attribute when all of the items came from the same source. Generally speaking, when looking for an attribute on an item, if the attribute wasn't found then the container should be checked for that attribute as well. + + +## Example Usage + +```typescript +import { MediaContainerWithDecision } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithDecision = { + mediaContainer: { + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [shared.MediaContainerWithDecisionMediaContainer](../../../sdk/models/shared/mediacontainerwithdecisionmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithdecisionlocation.md b/docs/sdk/models/shared/mediacontainerwithdecisionlocation.md new file mode 100644 index 00000000..36c50681 --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithdecisionlocation.md @@ -0,0 +1,23 @@ +# MediaContainerWithDecisionLocation + +## Example Usage + +```typescript +import { MediaContainerWithDecisionLocation } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithDecisionLocation = + MediaContainerWithDecisionLocation.SidecarSubs; +``` + +## Values + +| Name | Value | +| --------------- | --------------- | +| `Direct` | direct | +| `SidecarSubs` | sidecar-subs | +| `SegmentsVideo` | segments-video | +| `SegmentsAudio` | segments-audio | +| `SegmentsAv` | segments-av | +| `SegmentsSubs` | segments-subs | +| `Embedded` | embedded | +| `Sidecar` | sidecar | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithdecisionmedia.md b/docs/sdk/models/shared/mediacontainerwithdecisionmedia.md new file mode 100644 index 00000000..37fa8dff --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithdecisionmedia.md @@ -0,0 +1,103 @@ +# MediaContainerWithDecisionMedia + +`Media` represents an one or more media files (parts) and is a child of a metadata item. There aren't necessarily any guaranteed attributes on media elements since the attributes will vary based on the type. The possible attributes are not documented here, but they typically have self-evident names. High-level media information that can be used for badging and flagging, such as `videoResolution` and codecs, is included on the media element. + + +## Example Usage + +```typescript +import { MediaContainerWithDecisionMedia } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithDecisionMedia = { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `aspectRatio` | *number* | :heavy_minus_sign: | N/A | 2.35 | +| `audioChannels` | *number* | :heavy_minus_sign: | N/A | 2 | +| `audioCodec` | *any* | :heavy_minus_sign: | N/A | aac | +| `audioProfile` | *any* | :heavy_minus_sign: | N/A | lc | +| `bitrate` | *number* | :heavy_minus_sign: | N/A | 5612 | +| `container` | *any* | :heavy_minus_sign: | N/A | mov | +| `duration` | *number* | :heavy_minus_sign: | N/A | 150192 | +| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | +| `hasVoiceActivity` | *boolean* | :heavy_minus_sign: | N/A | true | +| `height` | *number* | :heavy_minus_sign: | N/A | 544 | +| `id` | *number* | :heavy_minus_sign: | N/A | 1 | +| `optimizedForStreaming` | *boolean* | :heavy_minus_sign: | N/A | false | +| `part` | [shared.MediaContainerWithDecisionPart](../../../sdk/models/shared/mediacontainerwithdecisionpart.md)[] | :heavy_minus_sign: | N/A | | +| `videoCodec` | *any* | :heavy_minus_sign: | N/A | h264 | +| `videoFrameRate` | *any* | :heavy_minus_sign: | N/A | 24p | +| `videoProfile` | *any* | :heavy_minus_sign: | N/A | main | +| `videoResolution` | *any* | :heavy_minus_sign: | N/A | 720 | +| `width` | *number* | :heavy_minus_sign: | N/A | 1280 | +| `abr` | *boolean* | :heavy_minus_sign: | N/A | | +| `resourceSession` | *string* | :heavy_minus_sign: | N/A | | +| `selected` | *boolean* | :heavy_minus_sign: | N/A | | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithdecisionmediacontainer.md b/docs/sdk/models/shared/mediacontainerwithdecisionmediacontainer.md new file mode 100644 index 00000000..6fe20f83 --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithdecisionmediacontainer.md @@ -0,0 +1,185 @@ +# MediaContainerWithDecisionMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { MediaContainerWithDecisionMediaContainer } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithDecisionMediaContainer = { + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `availableBandwidth` | *number* | :heavy_minus_sign: | The maximum available bitrate when the decision was rendered. | +| `directPlayDecisionCode` | *number* | :heavy_minus_sign: | N/A | +| `directPlayDecisionText` | *string* | :heavy_minus_sign: | N/A | +| `generalDecisionCode` | *number* | :heavy_minus_sign: | The overall decision. 1xxx are playback can succeed, 2xxx are a general error (such as insufficient bandwidth), 3xxx are errors in direct play, and 4xxx are errors in transcodes. Same codes are used in all. | +| `generalDecisionText` | *string* | :heavy_minus_sign: | N/A | +| `mdeDecisionCode` | *number* | :heavy_minus_sign: | The code indicating the status of evaluation of playback when client indicates `hasMDE=1` | +| `mdeDecisionText` | *string* | :heavy_minus_sign: | Descriptive text for the above code | +| `metadata` | [shared.MediaContainerWithDecisionMetadatum](../../../sdk/models/shared/mediacontainerwithdecisionmetadatum.md)[] | :heavy_minus_sign: | N/A | +| `transcodeDecisionCode` | *number* | :heavy_minus_sign: | N/A | +| `transcodeDecisionText` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithdecisionmetadatum.md b/docs/sdk/models/shared/mediacontainerwithdecisionmetadatum.md new file mode 100644 index 00000000..59d1f67e --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithdecisionmetadatum.md @@ -0,0 +1,237 @@ +# MediaContainerWithDecisionMetadatum + +Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + +Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + +Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + + +## Example Usage + +```typescript +import { MediaContainerWithDecisionMetadatum } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithDecisionMetadatum = { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `title` | *any* | :heavy_minus_sign: | The title of the item (e.g. “300” or “The Simpsons”) | +| `type` | *any* | :heavy_minus_sign: | The type of the video item, such as `movie`, `episode`, or `clip`. | +| `absoluteIndex` | *number* | :heavy_minus_sign: | When present, contains the disc number for a track on multi-disc albums. | +| `addedAt` | *number* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was added to the library. | +| `art` | *any* | :heavy_minus_sign: | When present, the URL for the background artwork for the item. | +| `audienceRating` | *number* | :heavy_minus_sign: | Some rating systems separate reviewer ratings from audience ratings | +| `audienceRatingImage` | *any* | :heavy_minus_sign: | A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). | +| `autotag` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `banner` | *any* | :heavy_minus_sign: | When present, the URL for a banner graphic for the item. | +| `chapterSource` | *any* | :heavy_minus_sign: | When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). | +| `composite` | *any* | :heavy_minus_sign: | When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). | +| `contentRating` | *any* | :heavy_minus_sign: | If known, the content rating (e.g. MPAA) for an item. | +| `country` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `director` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `duration` | *number* | :heavy_minus_sign: | When present, the duration for the item, in units of milliseconds. | +| `filter` | [shared.Filter](../../../sdk/models/shared/filter.md)[] | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `genre` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `grandparentArt` | *string* | :heavy_minus_sign: | The `art` of the grandparent | +| `grandparentHero` | *string* | :heavy_minus_sign: | The `hero` of the grandparent | +| `grandparentKey` | *string* | :heavy_minus_sign: | The `key` of the grandparent | +| `grandparentRatingKey` | *string* | :heavy_minus_sign: | The `ratingKey` of the grandparent | +| `grandparentTheme` | *string* | :heavy_minus_sign: | The `theme` of the grandparent | +| `grandparentThumb` | *string* | :heavy_minus_sign: | The `thumb` of the grandparent | +| `grandparentTitle` | *string* | :heavy_minus_sign: | The `title` of the grandparent | +| `guid` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `hero` | *any* | :heavy_minus_sign: | When present, the URL for a hero image for the item. | +| `image` | [shared.Image](../../../sdk/models/shared/image.md)[] | :heavy_minus_sign: | N/A | +| `index` | *number* | :heavy_minus_sign: | When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. | +| `key` | *any* | :heavy_minus_sign: | The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. | +| `lastViewedAt` | *number* | :heavy_minus_sign: | When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. | +| `leafCount` | *number* | :heavy_minus_sign: | For shows and seasons, contains the number of total episodes. | +| `media` | [shared.MediaContainerWithDecisionMedia](../../../sdk/models/shared/mediacontainerwithdecisionmedia.md)[] | :heavy_minus_sign: | N/A | +| `originallyAvailableAt` | *any* | :heavy_minus_sign: | When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. | +| `originalTitle` | *any* | :heavy_minus_sign: | When present, used to indicate an item's original title, e.g. a movie's foreign title. | +| `parentHero` | *string* | :heavy_minus_sign: | The `hero` of the parent | +| `parentIndex` | *number* | :heavy_minus_sign: | The `index` of the parent | +| `parentKey` | *string* | :heavy_minus_sign: | The `key` of the parent | +| `parentRatingKey` | *string* | :heavy_minus_sign: | The `ratingKey` of the parent | +| `parentThumb` | *string* | :heavy_minus_sign: | The `thumb` of the parent | +| `parentTitle` | *string* | :heavy_minus_sign: | The `title` of the parent | +| `primaryExtraKey` | *any* | :heavy_minus_sign: | Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. | +| `prompt` | *string* | :heavy_minus_sign: | Prompt to give the user for this directory (such as `Search Movies`) | +| `rating` | *number* | :heavy_minus_sign: | When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. | +| `ratingArray` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `ratingCount` | *number* | :heavy_minus_sign: | Number of ratings under this metadata | +| `ratingImage` | *any* | :heavy_minus_sign: | When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. | +| `ratingKey` | *any* | :heavy_minus_sign: | This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. | +| `role` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `search` | *boolean* | :heavy_minus_sign: | Indicates this is a search directory | +| `secondary` | *boolean* | :heavy_minus_sign: | Used by old clients to provide nested menus allowing for primative (but structured) navigation. | +| `skipChildren` | *boolean* | :heavy_minus_sign: | When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. | +| `skipParent` | *boolean* | :heavy_minus_sign: | When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). | +| `sort` | [shared.Sort](../../../sdk/models/shared/sort.md)[] | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `studio` | *any* | :heavy_minus_sign: | When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). | +| `subtype` | *any* | :heavy_minus_sign: | The subtype of the video item, such as `photo` when the video item is in a photo library | +| `summary` | *any* | :heavy_minus_sign: | When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). | +| `tagline` | *any* | :heavy_minus_sign: | When present, a pithy one-liner about the item (usually only seen for movies). | +| `theme` | *any* | :heavy_minus_sign: | When present, the URL for theme music for the item (usually only for TV shows). | +| `thumb` | *any* | :heavy_minus_sign: | When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. | +| `titleSort` | *any* | :heavy_minus_sign: | Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). | +| `updatedAt` | *number* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). | +| `userRating` | *number* | :heavy_minus_sign: | When the user has rated an item, this contains the user rating | +| `viewCount` | *number* | :heavy_minus_sign: | When a users has completed watched or listened to an item, this attribute contains the number of consumptions. | +| `viewedLeafCount` | *number* | :heavy_minus_sign: | For shows and seasons, contains the number of viewed episodes. | +| `viewOffset` | *number* | :heavy_minus_sign: | When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. | +| `writer` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `year` | *number* | :heavy_minus_sign: | When present, the year associated with the item's release (e.g. release year for a movie). | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithdecisionpart.md b/docs/sdk/models/shared/mediacontainerwithdecisionpart.md new file mode 100644 index 00000000..6881b34c --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithdecisionpart.md @@ -0,0 +1,74 @@ +# MediaContainerWithDecisionPart + +`Part` represents a particular file or "part" of a media item. The part is the playable unit of the media hierarchy. Suppose that a movie library contains a movie that is broken up into files, reminiscent of a movie split across two BDs. The metadata item represents information about the movie, the media item represents this instance of the movie at this resolution and quality, and the part items represent the two playable files. If another media were added which contained the joining of these two parts transcoded down to a lower resolution, then this metadata would contain 2 medias, one with 2 parts and one with 1 part. + + +## Example Usage + +```typescript +import { MediaContainerWithDecisionPart } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithDecisionPart = { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `audioProfile` | *any* | :heavy_minus_sign: | N/A | lc | +| `container` | *any* | :heavy_minus_sign: | The container of the media file, such as `mp4` or `mkv` | mov | +| `duration` | *number* | :heavy_minus_sign: | The duration of the media item, in milliseconds | 150192 | +| `file` | *any* | :heavy_minus_sign: | The local file path at which the part is stored on the server | /home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov | +| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | +| `id` | *number* | :heavy_minus_sign: | N/A | 1 | +| `key` | *any* | :heavy_minus_sign: | The key from which the media can be streamed | /library/parts/1/1531779263/file.mov | +| `optimizedForStreaming` | *boolean* | :heavy_minus_sign: | N/A | false | +| `size` | *number* | :heavy_minus_sign: | The size of the media, in bytes | 105355654 | +| `stream` | [shared.MediaContainerWithDecisionStream](../../../sdk/models/shared/mediacontainerwithdecisionstream.md)[] | :heavy_minus_sign: | N/A | | +| `videoProfile` | *any* | :heavy_minus_sign: | N/A | main | +| `decision` | [shared.Decision](../../../sdk/models/shared/decision.md) | :heavy_minus_sign: | N/A | | +| `selected` | *boolean* | :heavy_minus_sign: | N/A | | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithdecisionstream.md b/docs/sdk/models/shared/mediacontainerwithdecisionstream.md new file mode 100644 index 00000000..97c0e9eb --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithdecisionstream.md @@ -0,0 +1,78 @@ +# MediaContainerWithDecisionStream + +`Stream` represents a particular stream from a media item, such as the video stream, audio stream, or subtitle stream. The stream may either be part of the file represented by the parent `Part` or, especially for subtitles, an external file. The stream contains more detailed information about the specific stream. For example, a video may include the `aspectRatio` at the `Media` level, but detailed information about the video stream like the color space will be included on the `Stream` for the video stream. Note that photos do not have streams (mostly as an optimization). + + +## Example Usage + +```typescript +import { MediaContainerWithDecisionStream } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithDecisionStream = { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `default` | *boolean* | :heavy_minus_sign: | N/A | true | +| `audioChannelLayout` | *any* | :heavy_minus_sign: | N/A | stereo | +| `bitDepth` | *number* | :heavy_minus_sign: | N/A | 8 | +| `bitrate` | *number* | :heavy_minus_sign: | N/A | 5466 | +| `canAutoSync` | *boolean* | :heavy_minus_sign: | For subtitle streams only. If `true` then the server can attempt to automatically sync the subtitle timestamps with the video. | true | +| `chromaLocation` | *any* | :heavy_minus_sign: | N/A | topleft | +| `chromaSubsampling` | *any* | :heavy_minus_sign: | N/A | 4:2:0 | +| `codec` | *any* | :heavy_minus_sign: | The codec of the stream, such as `h264` or `aac` | h264 | +| `colorPrimaries` | *any* | :heavy_minus_sign: | N/A | bt709 | +| `colorRange` | *any* | :heavy_minus_sign: | N/A | tv | +| `colorSpace` | *any* | :heavy_minus_sign: | N/A | bt709 | +| `colorTrc` | *any* | :heavy_minus_sign: | N/A | bt709 | +| `displayTitle` | *any* | :heavy_minus_sign: | A friendly name for the stream, often comprised of the language and codec information | English (H.264 Main) | +| `frameRate` | *number* | :heavy_minus_sign: | N/A | 23.976 | +| `hasScalingMatrix` | *any* | :heavy_minus_sign: | N/A | false | +| `height` | *number* | :heavy_minus_sign: | N/A | 544 | +| `id` | *number* | :heavy_minus_sign: | N/A | 1 | +| `index` | *number* | :heavy_minus_sign: | If the stream is part of the `Part` and not an external resource, the index of the stream within that part | 0 | +| `key` | *any* | :heavy_minus_sign: | If the stream is independently streamable, the key from which it can be streamed | /library/streams/1 | +| `language` | *any* | :heavy_minus_sign: | N/A | English | +| `languageCode` | *any* | :heavy_minus_sign: | The three character language code for the stream contents | eng | +| `level` | *number* | :heavy_minus_sign: | N/A | 31 | +| `profile` | *any* | :heavy_minus_sign: | N/A | main | +| `refFrames` | *number* | :heavy_minus_sign: | N/A | 2 | +| `samplingRate` | *number* | :heavy_minus_sign: | N/A | 48000 | +| `selected` | *boolean* | :heavy_minus_sign: | N/A | | +| `streamIdentifier` | *number* | :heavy_minus_sign: | N/A | 1 | +| `streamType` | *number* | :heavy_minus_sign: | A number indicating the type of the stream. `1` for video, `2` for audio, `3` for subtitles, `4` for lyrics | 1 | +| `width` | *number* | :heavy_minus_sign: | N/A | 1280 | +| `decision` | [shared.StreamDecision](../../../sdk/models/shared/streamdecision.md) | :heavy_minus_sign: | N/A | | +| `location` | [shared.MediaContainerWithDecisionLocation](../../../sdk/models/shared/mediacontainerwithdecisionlocation.md) | :heavy_minus_sign: | N/A | | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithdevice.md b/docs/sdk/models/shared/mediacontainerwithdevice.md new file mode 100644 index 00000000..63c2ebb0 --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithdevice.md @@ -0,0 +1,15 @@ +# MediaContainerWithDevice + +## Example Usage + +```typescript +import { MediaContainerWithDevice } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithDevice = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [shared.MediaContainerWithDeviceMediaContainer](../../../sdk/models/shared/mediacontainerwithdevicemediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithdevicedevice.md b/docs/sdk/models/shared/mediacontainerwithdevicedevice.md new file mode 100644 index 00000000..3d927729 --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithdevicedevice.md @@ -0,0 +1,27 @@ +# MediaContainerWithDeviceDevice + +## Example Usage + +```typescript +import { MediaContainerWithDeviceDevice } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithDeviceDevice = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `channelMapping` | [shared.ChannelMapping](../../../sdk/models/shared/channelmapping.md)[] | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `lastSeenAt` | *number* | :heavy_minus_sign: | N/A | +| `make` | *string* | :heavy_minus_sign: | N/A | +| `model` | *string* | :heavy_minus_sign: | N/A | +| `modelNumber` | *string* | :heavy_minus_sign: | N/A | +| `protocol` | *string* | :heavy_minus_sign: | N/A | +| `sources` | *string* | :heavy_minus_sign: | N/A | +| `state` | *string* | :heavy_minus_sign: | N/A | +| `status` | *string* | :heavy_minus_sign: | N/A | +| `tuners` | *string* | :heavy_minus_sign: | N/A | +| `uri` | *string* | :heavy_minus_sign: | N/A | +| `uuid` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithdevicemediacontainer.md b/docs/sdk/models/shared/mediacontainerwithdevicemediacontainer.md new file mode 100644 index 00000000..b63a77d3 --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithdevicemediacontainer.md @@ -0,0 +1,24 @@ +# MediaContainerWithDeviceMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { MediaContainerWithDeviceMediaContainer } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithDeviceMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `device` | [shared.MediaContainerWithDeviceDevice](../../../sdk/models/shared/mediacontainerwithdevicedevice.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithdirectory.md b/docs/sdk/models/shared/mediacontainerwithdirectory.md new file mode 100644 index 00000000..f854f3dc --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithdirectory.md @@ -0,0 +1,15 @@ +# MediaContainerWithDirectory + +## Example Usage + +```typescript +import { MediaContainerWithDirectory } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithDirectory = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [shared.MediaContainerWithDirectoryMediaContainer](../../../sdk/models/shared/mediacontainerwithdirectorymediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithdirectorymediacontainer.md b/docs/sdk/models/shared/mediacontainerwithdirectorymediacontainer.md new file mode 100644 index 00000000..334aa328 --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithdirectorymediacontainer.md @@ -0,0 +1,24 @@ +# MediaContainerWithDirectoryMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { MediaContainerWithDirectoryMediaContainer } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithDirectoryMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `directory` | [shared.Directory](../../../sdk/models/shared/directory.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithhubs.md b/docs/sdk/models/shared/mediacontainerwithhubs.md new file mode 100644 index 00000000..754fc5d4 --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithhubs.md @@ -0,0 +1,183 @@ +# MediaContainerWithHubs + +OK + +## Example Usage + +```typescript +import { MediaContainerWithHubs } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithHubs = { + mediaContainer: { + hub: [ + { + type: "track", + context: "hub.home.onDeck", + hubIdentifier: "home.onDeck", + key: "/hubs/sections/home/onDeck", + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: + "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + size: 1, + subtype: "podcast", + totalSize: 8, + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [shared.MediaContainerWithHubsMediaContainer](../../../sdk/models/shared/mediacontainerwithhubsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithhubsmediacontainer.md b/docs/sdk/models/shared/mediacontainerwithhubsmediacontainer.md new file mode 100644 index 00000000..f76c9633 --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithhubsmediacontainer.md @@ -0,0 +1,187 @@ +# MediaContainerWithHubsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { MediaContainerWithHubsMediaContainer } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithHubsMediaContainer = { + hub: [ + { + type: "track", + context: "hub.home.onDeck", + hubIdentifier: "home.onDeck", + key: "/hubs/sections/home/onDeck", + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + size: 1, + subtype: "podcast", + totalSize: 8, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `hub` | [shared.Hub](../../../sdk/models/shared/hub.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithlineup.md b/docs/sdk/models/shared/mediacontainerwithlineup.md new file mode 100644 index 00000000..d6f9b971 --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithlineup.md @@ -0,0 +1,15 @@ +# MediaContainerWithLineup + +## Example Usage + +```typescript +import { MediaContainerWithLineup } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithLineup = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [shared.MediaContainerWithLineupMediaContainer](../../../sdk/models/shared/mediacontainerwithlineupmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithlineupmediacontainer.md b/docs/sdk/models/shared/mediacontainerwithlineupmediacontainer.md new file mode 100644 index 00000000..6e695894 --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithlineupmediacontainer.md @@ -0,0 +1,25 @@ +# MediaContainerWithLineupMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { MediaContainerWithLineupMediaContainer } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithLineupMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `lineup` | [shared.Lineup](../../../sdk/models/shared/lineup.md)[] | :heavy_minus_sign: | N/A | +| `uuid` | *string* | :heavy_minus_sign: | The UUID of this set lineups | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithmetadata.md b/docs/sdk/models/shared/mediacontainerwithmetadata.md new file mode 100644 index 00000000..609373c0 --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithmetadata.md @@ -0,0 +1,169 @@ +# MediaContainerWithMetadata + +## Example Usage + +```typescript +import { MediaContainerWithMetadata } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithMetadata = { + mediaContainer: { + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [shared.MediaContainerWithMetadataMediaContainer](../../../sdk/models/shared/mediacontainerwithmetadatamediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithmetadatamediacontainer.md b/docs/sdk/models/shared/mediacontainerwithmetadatamediacontainer.md new file mode 100644 index 00000000..bf797dff --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithmetadatamediacontainer.md @@ -0,0 +1,176 @@ +# MediaContainerWithMetadataMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { MediaContainerWithMetadataMediaContainer } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithMetadataMediaContainer = { + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithnestedmetadata.md b/docs/sdk/models/shared/mediacontainerwithnestedmetadata.md new file mode 100644 index 00000000..77799e44 --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithnestedmetadata.md @@ -0,0 +1,321 @@ +# MediaContainerWithNestedMetadata + +## Example Usage + +```typescript +import { MediaContainerWithNestedMetadata } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithNestedMetadata = { + mediaContainer: { + metadataItem: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + metadataItem: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: + "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [shared.MediaContainerWithNestedMetadataMediaContainer](../../../sdk/models/shared/mediacontainerwithnestedmetadatamediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithnestedmetadatamediacontainer.md b/docs/sdk/models/shared/mediacontainerwithnestedmetadatamediacontainer.md new file mode 100644 index 00000000..7d40f450 --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithnestedmetadatamediacontainer.md @@ -0,0 +1,327 @@ +# MediaContainerWithNestedMetadataMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { MediaContainerWithNestedMetadataMediaContainer } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithNestedMetadataMediaContainer = { + metadataItem: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + metadataItem: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `metadataItem` | [shared.MetadataItem](../../../sdk/models/shared/metadataitem.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithplaylistmetadata.md b/docs/sdk/models/shared/mediacontainerwithplaylistmetadata.md new file mode 100644 index 00000000..670a8825 --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithplaylistmetadata.md @@ -0,0 +1,169 @@ +# MediaContainerWithPlaylistMetadata + +## Example Usage + +```typescript +import { MediaContainerWithPlaylistMetadata } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithPlaylistMetadata = { + mediaContainer: { + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [shared.MediaContainerWithPlaylistMetadataMediaContainer](../../../sdk/models/shared/mediacontainerwithplaylistmetadatamediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithplaylistmetadatamediacontainer.md b/docs/sdk/models/shared/mediacontainerwithplaylistmetadatamediacontainer.md new file mode 100644 index 00000000..a276ce80 --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithplaylistmetadatamediacontainer.md @@ -0,0 +1,176 @@ +# MediaContainerWithPlaylistMetadataMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { MediaContainerWithPlaylistMetadataMediaContainer } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithPlaylistMetadataMediaContainer = { + metadata: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `metadata` | [shared.MediaContainerWithPlaylistMetadataMetadatum](../../../sdk/models/shared/mediacontainerwithplaylistmetadatametadatum.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithplaylistmetadatametadatum.md b/docs/sdk/models/shared/mediacontainerwithplaylistmetadatametadatum.md new file mode 100644 index 00000000..7ae7ec38 --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithplaylistmetadatametadatum.md @@ -0,0 +1,241 @@ +# MediaContainerWithPlaylistMetadataMetadatum + +Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + +Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + +Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + + +## Example Usage + +```typescript +import { MediaContainerWithPlaylistMetadataMetadatum } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithPlaylistMetadataMetadatum = { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `readOnly` | *boolean* | :heavy_minus_sign: | If we return this as true then this playlist cannot be altered or deleted directly by the client. | +| `composite` | *any* | :heavy_minus_sign: | When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). | +| `duration` | *number* | :heavy_minus_sign: | When present, the duration for the item, in units of milliseconds. | +| `key` | *any* | :heavy_minus_sign: | The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. | +| `leafCount` | *number* | :heavy_minus_sign: | For shows and seasons, contains the number of total episodes. | +| `playlistType` | [shared.PlaylistType](../../../sdk/models/shared/playlisttype.md) | :heavy_minus_sign: | The type of the playlist. | +| `smart` | *boolean* | :heavy_minus_sign: | Whether or not the playlist is smart. | +| `specialPlaylistType` | *string* | :heavy_minus_sign: | If this is a special playlist, this returns its type (e.g. favorites). | +| `title` | *any* | :heavy_minus_sign: | The title of the item (e.g. “300” or “The Simpsons”) | +| `type` | *any* | :heavy_minus_sign: | The type of the video item, such as `movie`, `episode`, or `clip`. | +| `absoluteIndex` | *number* | :heavy_minus_sign: | When present, contains the disc number for a track on multi-disc albums. | +| `addedAt` | *number* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was added to the library. | +| `art` | *any* | :heavy_minus_sign: | When present, the URL for the background artwork for the item. | +| `audienceRating` | *number* | :heavy_minus_sign: | Some rating systems separate reviewer ratings from audience ratings | +| `audienceRatingImage` | *any* | :heavy_minus_sign: | A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). | +| `autotag` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `banner` | *any* | :heavy_minus_sign: | When present, the URL for a banner graphic for the item. | +| `chapterSource` | *any* | :heavy_minus_sign: | When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). | +| `contentRating` | *any* | :heavy_minus_sign: | If known, the content rating (e.g. MPAA) for an item. | +| `country` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `director` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `filter` | [shared.Filter](../../../sdk/models/shared/filter.md)[] | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `genre` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `grandparentArt` | *string* | :heavy_minus_sign: | The `art` of the grandparent | +| `grandparentHero` | *string* | :heavy_minus_sign: | The `hero` of the grandparent | +| `grandparentKey` | *string* | :heavy_minus_sign: | The `key` of the grandparent | +| `grandparentRatingKey` | *string* | :heavy_minus_sign: | The `ratingKey` of the grandparent | +| `grandparentTheme` | *string* | :heavy_minus_sign: | The `theme` of the grandparent | +| `grandparentThumb` | *string* | :heavy_minus_sign: | The `thumb` of the grandparent | +| `grandparentTitle` | *string* | :heavy_minus_sign: | The `title` of the grandparent | +| `guid` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `hero` | *any* | :heavy_minus_sign: | When present, the URL for a hero image for the item. | +| `image` | [shared.Image](../../../sdk/models/shared/image.md)[] | :heavy_minus_sign: | N/A | +| `index` | *number* | :heavy_minus_sign: | When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. | +| `lastViewedAt` | *number* | :heavy_minus_sign: | When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. | +| `media` | [shared.Media](../../../sdk/models/shared/media.md)[] | :heavy_minus_sign: | N/A | +| `originallyAvailableAt` | *any* | :heavy_minus_sign: | When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. | +| `originalTitle` | *any* | :heavy_minus_sign: | When present, used to indicate an item's original title, e.g. a movie's foreign title. | +| `parentHero` | *string* | :heavy_minus_sign: | The `hero` of the parent | +| `parentIndex` | *number* | :heavy_minus_sign: | The `index` of the parent | +| `parentKey` | *string* | :heavy_minus_sign: | The `key` of the parent | +| `parentRatingKey` | *string* | :heavy_minus_sign: | The `ratingKey` of the parent | +| `parentThumb` | *string* | :heavy_minus_sign: | The `thumb` of the parent | +| `parentTitle` | *string* | :heavy_minus_sign: | The `title` of the parent | +| `primaryExtraKey` | *any* | :heavy_minus_sign: | Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. | +| `prompt` | *string* | :heavy_minus_sign: | Prompt to give the user for this directory (such as `Search Movies`) | +| `rating` | *number* | :heavy_minus_sign: | When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. | +| `ratingArray` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `ratingCount` | *number* | :heavy_minus_sign: | Number of ratings under this metadata | +| `ratingImage` | *any* | :heavy_minus_sign: | When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. | +| `ratingKey` | *any* | :heavy_minus_sign: | This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. | +| `role` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `search` | *boolean* | :heavy_minus_sign: | Indicates this is a search directory | +| `secondary` | *boolean* | :heavy_minus_sign: | Used by old clients to provide nested menus allowing for primative (but structured) navigation. | +| `skipChildren` | *boolean* | :heavy_minus_sign: | When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. | +| `skipParent` | *boolean* | :heavy_minus_sign: | When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). | +| `sort` | [shared.Sort](../../../sdk/models/shared/sort.md)[] | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `studio` | *any* | :heavy_minus_sign: | When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). | +| `subtype` | *any* | :heavy_minus_sign: | The subtype of the video item, such as `photo` when the video item is in a photo library | +| `summary` | *any* | :heavy_minus_sign: | When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). | +| `tagline` | *any* | :heavy_minus_sign: | When present, a pithy one-liner about the item (usually only seen for movies). | +| `theme` | *any* | :heavy_minus_sign: | When present, the URL for theme music for the item (usually only for TV shows). | +| `thumb` | *any* | :heavy_minus_sign: | When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. | +| `titleSort` | *any* | :heavy_minus_sign: | Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). | +| `updatedAt` | *number* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). | +| `userRating` | *number* | :heavy_minus_sign: | When the user has rated an item, this contains the user rating | +| `viewCount` | *number* | :heavy_minus_sign: | When a users has completed watched or listened to an item, this attribute contains the number of consumptions. | +| `viewedLeafCount` | *number* | :heavy_minus_sign: | For shows and seasons, contains the number of viewed episodes. | +| `viewOffset` | *number* | :heavy_minus_sign: | When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. | +| `writer` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `year` | *number* | :heavy_minus_sign: | When present, the year associated with the item's release (e.g. release year for a movie). | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithsettings.md b/docs/sdk/models/shared/mediacontainerwithsettings.md new file mode 100644 index 00000000..524b6c32 --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithsettings.md @@ -0,0 +1,15 @@ +# MediaContainerWithSettings + +## Example Usage + +```typescript +import { MediaContainerWithSettings } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithSettings = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [shared.MediaContainerWithSettingsMediaContainer](../../../sdk/models/shared/mediacontainerwithsettingsmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithsettingsmediacontainer.md b/docs/sdk/models/shared/mediacontainerwithsettingsmediacontainer.md new file mode 100644 index 00000000..7f46ab3b --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithsettingsmediacontainer.md @@ -0,0 +1,24 @@ +# MediaContainerWithSettingsMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { MediaContainerWithSettingsMediaContainer } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithSettingsMediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `setting` | [shared.Setting](../../../sdk/models/shared/setting.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithsubscription.md b/docs/sdk/models/shared/mediacontainerwithsubscription.md new file mode 100644 index 00000000..8a7ba494 --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithsubscription.md @@ -0,0 +1,176 @@ +# MediaContainerWithSubscription + +## Example Usage + +```typescript +import { MediaContainerWithSubscription } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithSubscription = { + mediaContainer: { + mediaSubscription: [ + { + mediaGrabOperation: [ + { + metadata: { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: + "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + }, + ], + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [shared.MediaContainerWithSubscriptionMediaContainer](../../../sdk/models/shared/mediacontainerwithsubscriptionmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediacontainerwithsubscriptionmediacontainer.md b/docs/sdk/models/shared/mediacontainerwithsubscriptionmediacontainer.md new file mode 100644 index 00000000..53b7b019 --- /dev/null +++ b/docs/sdk/models/shared/mediacontainerwithsubscriptionmediacontainer.md @@ -0,0 +1,183 @@ +# MediaContainerWithSubscriptionMediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { MediaContainerWithSubscriptionMediaContainer } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaContainerWithSubscriptionMediaContainer = { + mediaSubscription: [ + { + mediaGrabOperation: [ + { + metadata: { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: + "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + }, + ], + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `mediaSubscription` | [shared.MediaSubscription](../../../sdk/models/shared/mediasubscription.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediaenum.md b/docs/sdk/models/shared/mediaenum.md new file mode 100644 index 00000000..58c4b88f --- /dev/null +++ b/docs/sdk/models/shared/mediaenum.md @@ -0,0 +1,19 @@ +# MediaEnum + +The default image type to use as the sources + +## Example Usage + +```typescript +import { MediaEnum } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaEnum = MediaEnum.Banner; +``` + +## Values + +| Name | Value | +| -------- | -------- | +| `Thumb` | thumb | +| `Art` | art | +| `Banner` | banner | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediagraboperation.md b/docs/sdk/models/shared/mediagraboperation.md new file mode 100644 index 00000000..fda5fda5 --- /dev/null +++ b/docs/sdk/models/shared/mediagraboperation.md @@ -0,0 +1,178 @@ +# MediaGrabOperation + +A media grab opration represents a scheduled or active recording of media + + +## Example Usage + +```typescript +import { MediaGrabOperation } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaGrabOperation = { + metadata: { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `currentSize` | *number* | :heavy_minus_sign: | N/A | +| `grabberIdentifier` | *string* | :heavy_minus_sign: | N/A | +| `grabberProtocol` | *string* | :heavy_minus_sign: | N/A | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `mediaIndex` | *number* | :heavy_minus_sign: | N/A | +| `mediaSubscriptionID` | *number* | :heavy_minus_sign: | N/A | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie.

Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items.

Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show.
| +| `percent` | *number* | :heavy_minus_sign: | N/A | +| `provider` | *string* | :heavy_minus_sign: | N/A | +| `status` | [shared.Status](../../../sdk/models/shared/status.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediaquery.md b/docs/sdk/models/shared/mediaquery.md new file mode 100644 index 00000000..0687e2fc --- /dev/null +++ b/docs/sdk/models/shared/mediaquery.md @@ -0,0 +1,14 @@ +# MediaQuery + +## Example Usage + +```typescript +import { MediaQuery } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaQuery = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdk/models/shared/mediasubscription.md b/docs/sdk/models/shared/mediasubscription.md new file mode 100644 index 00000000..3683c9c4 --- /dev/null +++ b/docs/sdk/models/shared/mediasubscription.md @@ -0,0 +1,187 @@ +# MediaSubscription + +A media subscription contains a representation of metadata desired to be recorded + + +## Example Usage + +```typescript +import { MediaSubscription } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MediaSubscription = { + mediaGrabOperation: [ + { + metadata: { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `type` | *number* | :heavy_minus_sign: | The metadata type of the root item of the subscription | +| `airingsType` | [shared.AiringsType](../../../sdk/models/shared/airingstype.md) | :heavy_minus_sign: | N/A | +| `createdAt` | *number* | :heavy_minus_sign: | N/A | +| `directory` | Record | :heavy_minus_sign: | Media Matching Hints | +| `durationTotal` | *number* | :heavy_minus_sign: | Only included if `includeStorage` is specified | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | +| `locationPath` | *string* | :heavy_minus_sign: | N/A | +| `mediaGrabOperation` | [shared.MediaGrabOperation](../../../sdk/models/shared/mediagraboperation.md)[] | :heavy_minus_sign: | N/A | +| `playlist` | Record | :heavy_minus_sign: | Media Matching Hints | +| `setting` | [shared.Setting](../../../sdk/models/shared/setting.md)[] | :heavy_minus_sign: | N/A | +| `storageTotal` | *number* | :heavy_minus_sign: | Only included if `includeStorage` is specified | +| `targetLibrarySectionID` | *number* | :heavy_minus_sign: | The library section id for where the item is to be recorded | +| `targetSectionLocationID` | *number* | :heavy_minus_sign: | The library section location id for where the item is to be recorded | +| `video` | Record | :heavy_minus_sign: | Media Matching Hints | \ No newline at end of file diff --git a/docs/sdk/models/shared/metadata.md b/docs/sdk/models/shared/metadata.md new file mode 100644 index 00000000..eed36cd5 --- /dev/null +++ b/docs/sdk/models/shared/metadata.md @@ -0,0 +1,237 @@ +# Metadata + +Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + +Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + +Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + + +## Example Usage + +```typescript +import { Metadata } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Metadata = { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `title` | *any* | :heavy_minus_sign: | The title of the item (e.g. “300” or “The Simpsons”) | +| `type` | *any* | :heavy_minus_sign: | The type of the video item, such as `movie`, `episode`, or `clip`. | +| `absoluteIndex` | *number* | :heavy_minus_sign: | When present, contains the disc number for a track on multi-disc albums. | +| `addedAt` | *number* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was added to the library. | +| `art` | *any* | :heavy_minus_sign: | When present, the URL for the background artwork for the item. | +| `audienceRating` | *number* | :heavy_minus_sign: | Some rating systems separate reviewer ratings from audience ratings | +| `audienceRatingImage` | *any* | :heavy_minus_sign: | A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). | +| `autotag` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `banner` | *any* | :heavy_minus_sign: | When present, the URL for a banner graphic for the item. | +| `chapterSource` | *any* | :heavy_minus_sign: | When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). | +| `composite` | *any* | :heavy_minus_sign: | When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). | +| `contentRating` | *any* | :heavy_minus_sign: | If known, the content rating (e.g. MPAA) for an item. | +| `country` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `director` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `duration` | *number* | :heavy_minus_sign: | When present, the duration for the item, in units of milliseconds. | +| `filter` | [shared.Filter](../../../sdk/models/shared/filter.md)[] | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `genre` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `grandparentArt` | *string* | :heavy_minus_sign: | The `art` of the grandparent | +| `grandparentHero` | *string* | :heavy_minus_sign: | The `hero` of the grandparent | +| `grandparentKey` | *string* | :heavy_minus_sign: | The `key` of the grandparent | +| `grandparentRatingKey` | *string* | :heavy_minus_sign: | The `ratingKey` of the grandparent | +| `grandparentTheme` | *string* | :heavy_minus_sign: | The `theme` of the grandparent | +| `grandparentThumb` | *string* | :heavy_minus_sign: | The `thumb` of the grandparent | +| `grandparentTitle` | *string* | :heavy_minus_sign: | The `title` of the grandparent | +| `guid` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `hero` | *any* | :heavy_minus_sign: | When present, the URL for a hero image for the item. | +| `image` | [shared.Image](../../../sdk/models/shared/image.md)[] | :heavy_minus_sign: | N/A | +| `index` | *number* | :heavy_minus_sign: | When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. | +| `key` | *any* | :heavy_minus_sign: | The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. | +| `lastViewedAt` | *number* | :heavy_minus_sign: | When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. | +| `leafCount` | *number* | :heavy_minus_sign: | For shows and seasons, contains the number of total episodes. | +| `media` | [shared.Media](../../../sdk/models/shared/media.md)[] | :heavy_minus_sign: | N/A | +| `originallyAvailableAt` | *any* | :heavy_minus_sign: | When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. | +| `originalTitle` | *any* | :heavy_minus_sign: | When present, used to indicate an item's original title, e.g. a movie's foreign title. | +| `parentHero` | *string* | :heavy_minus_sign: | The `hero` of the parent | +| `parentIndex` | *number* | :heavy_minus_sign: | The `index` of the parent | +| `parentKey` | *string* | :heavy_minus_sign: | The `key` of the parent | +| `parentRatingKey` | *string* | :heavy_minus_sign: | The `ratingKey` of the parent | +| `parentThumb` | *string* | :heavy_minus_sign: | The `thumb` of the parent | +| `parentTitle` | *string* | :heavy_minus_sign: | The `title` of the parent | +| `primaryExtraKey` | *any* | :heavy_minus_sign: | Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. | +| `prompt` | *string* | :heavy_minus_sign: | Prompt to give the user for this directory (such as `Search Movies`) | +| `rating` | *number* | :heavy_minus_sign: | When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. | +| `ratingArray` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `ratingCount` | *number* | :heavy_minus_sign: | Number of ratings under this metadata | +| `ratingImage` | *any* | :heavy_minus_sign: | When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. | +| `ratingKey` | *any* | :heavy_minus_sign: | This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. | +| `role` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `search` | *boolean* | :heavy_minus_sign: | Indicates this is a search directory | +| `secondary` | *boolean* | :heavy_minus_sign: | Used by old clients to provide nested menus allowing for primative (but structured) navigation. | +| `skipChildren` | *boolean* | :heavy_minus_sign: | When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. | +| `skipParent` | *boolean* | :heavy_minus_sign: | When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). | +| `sort` | [shared.Sort](../../../sdk/models/shared/sort.md)[] | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `studio` | *any* | :heavy_minus_sign: | When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). | +| `subtype` | *any* | :heavy_minus_sign: | The subtype of the video item, such as `photo` when the video item is in a photo library | +| `summary` | *any* | :heavy_minus_sign: | When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). | +| `tagline` | *any* | :heavy_minus_sign: | When present, a pithy one-liner about the item (usually only seen for movies). | +| `theme` | *any* | :heavy_minus_sign: | When present, the URL for theme music for the item (usually only for TV shows). | +| `thumb` | *any* | :heavy_minus_sign: | When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. | +| `titleSort` | *any* | :heavy_minus_sign: | Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). | +| `updatedAt` | *number* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). | +| `userRating` | *number* | :heavy_minus_sign: | When the user has rated an item, this contains the user rating | +| `viewCount` | *number* | :heavy_minus_sign: | When a users has completed watched or listened to an item, this attribute contains the number of consumptions. | +| `viewedLeafCount` | *number* | :heavy_minus_sign: | For shows and seasons, contains the number of viewed episodes. | +| `viewOffset` | *number* | :heavy_minus_sign: | When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. | +| `writer` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `year` | *number* | :heavy_minus_sign: | When present, the year associated with the item's release (e.g. release year for a movie). | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/metadataitem.md b/docs/sdk/models/shared/metadataitem.md new file mode 100644 index 00000000..da45eee9 --- /dev/null +++ b/docs/sdk/models/shared/metadataitem.md @@ -0,0 +1,389 @@ +# MetadataItem + +Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie. + +Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items. + +Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show. + + +## Example Usage + +```typescript +import { MetadataItem } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MetadataItem = { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + metadataItem: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `title` | *any* | :heavy_minus_sign: | The title of the item (e.g. “300” or “The Simpsons”) | +| `type` | *any* | :heavy_minus_sign: | The type of the video item, such as `movie`, `episode`, or `clip`. | +| `absoluteIndex` | *number* | :heavy_minus_sign: | When present, contains the disc number for a track on multi-disc albums. | +| `addedAt` | *number* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was added to the library. | +| `art` | *any* | :heavy_minus_sign: | When present, the URL for the background artwork for the item. | +| `audienceRating` | *number* | :heavy_minus_sign: | Some rating systems separate reviewer ratings from audience ratings | +| `audienceRatingImage` | *any* | :heavy_minus_sign: | A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled). | +| `autotag` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `banner` | *any* | :heavy_minus_sign: | When present, the URL for a banner graphic for the item. | +| `chapterSource` | *any* | :heavy_minus_sign: | When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two). | +| `composite` | *any* | :heavy_minus_sign: | When present, the URL for a composite image for descendent items (e.g. photo albums or playlists). | +| `contentRating` | *any* | :heavy_minus_sign: | If known, the content rating (e.g. MPAA) for an item. | +| `country` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `director` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `duration` | *number* | :heavy_minus_sign: | When present, the duration for the item, in units of milliseconds. | +| `filter` | [shared.Filter](../../../sdk/models/shared/filter.md)[] | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `genre` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `grandparentArt` | *string* | :heavy_minus_sign: | The `art` of the grandparent | +| `grandparentHero` | *string* | :heavy_minus_sign: | The `hero` of the grandparent | +| `grandparentKey` | *string* | :heavy_minus_sign: | The `key` of the grandparent | +| `grandparentRatingKey` | *string* | :heavy_minus_sign: | The `ratingKey` of the grandparent | +| `grandparentTheme` | *string* | :heavy_minus_sign: | The `theme` of the grandparent | +| `grandparentThumb` | *string* | :heavy_minus_sign: | The `thumb` of the grandparent | +| `grandparentTitle` | *string* | :heavy_minus_sign: | The `title` of the grandparent | +| `guid` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `hero` | *any* | :heavy_minus_sign: | When present, the URL for a hero image for the item. | +| `image` | [shared.Image](../../../sdk/models/shared/image.md)[] | :heavy_minus_sign: | N/A | +| `index` | *number* | :heavy_minus_sign: | When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks. | +| `key` | *any* | :heavy_minus_sign: | The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details. | +| `lastViewedAt` | *number* | :heavy_minus_sign: | When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time. | +| `leafCount` | *number* | :heavy_minus_sign: | For shows and seasons, contains the number of total episodes. | +| `media` | [shared.Media](../../../sdk/models/shared/media.md)[] | :heavy_minus_sign: | N/A | +| `originallyAvailableAt` | *any* | :heavy_minus_sign: | When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well. | +| `originalTitle` | *any* | :heavy_minus_sign: | When present, used to indicate an item's original title, e.g. a movie's foreign title. | +| `parentHero` | *string* | :heavy_minus_sign: | The `hero` of the parent | +| `parentIndex` | *number* | :heavy_minus_sign: | The `index` of the parent | +| `parentKey` | *string* | :heavy_minus_sign: | The `key` of the parent | +| `parentRatingKey` | *string* | :heavy_minus_sign: | The `ratingKey` of the parent | +| `parentThumb` | *string* | :heavy_minus_sign: | The `thumb` of the parent | +| `parentTitle` | *string* | :heavy_minus_sign: | The `title` of the parent | +| `primaryExtraKey` | *any* | :heavy_minus_sign: | Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item. | +| `prompt` | *string* | :heavy_minus_sign: | Prompt to give the user for this directory (such as `Search Movies`) | +| `rating` | *number* | :heavy_minus_sign: | When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from. | +| `ratingArray` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `ratingCount` | *number* | :heavy_minus_sign: | Number of ratings under this metadata | +| `ratingImage` | *any* | :heavy_minus_sign: | When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten. | +| `ratingKey` | *any* | :heavy_minus_sign: | This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed. | +| `role` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `search` | *boolean* | :heavy_minus_sign: | Indicates this is a search directory | +| `secondary` | *boolean* | :heavy_minus_sign: | Used by old clients to provide nested menus allowing for primative (but structured) navigation. | +| `skipChildren` | *boolean* | :heavy_minus_sign: | When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc. | +| `skipParent` | *boolean* | :heavy_minus_sign: | When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show). | +| `sort` | [shared.Sort](../../../sdk/models/shared/sort.md)[] | :heavy_minus_sign: | Typically only seen in metadata at a library's top level | +| `studio` | *any* | :heavy_minus_sign: | When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums). | +| `subtype` | *any* | :heavy_minus_sign: | The subtype of the video item, such as `photo` when the video item is in a photo library | +| `summary` | *any* | :heavy_minus_sign: | When present, the extended textual information about the item (e.g. movie plot, artist biography, album review). | +| `tagline` | *any* | :heavy_minus_sign: | When present, a pithy one-liner about the item (usually only seen for movies). | +| `theme` | *any* | :heavy_minus_sign: | When present, the URL for theme music for the item (usually only for TV shows). | +| `thumb` | *any* | :heavy_minus_sign: | When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail. | +| `titleSort` | *any* | :heavy_minus_sign: | Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”). | +| `updatedAt` | *number* | :heavy_minus_sign: | In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated). | +| `userRating` | *number* | :heavy_minus_sign: | When the user has rated an item, this contains the user rating | +| `viewCount` | *number* | :heavy_minus_sign: | When a users has completed watched or listened to an item, this attribute contains the number of consumptions. | +| `viewedLeafCount` | *number* | :heavy_minus_sign: | For shows and seasons, contains the number of viewed episodes. | +| `viewOffset` | *number* | :heavy_minus_sign: | When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds. | +| `writer` | [shared.Tag](../../../sdk/models/shared/tag.md)[] | :heavy_minus_sign: | N/A | +| `year` | *number* | :heavy_minus_sign: | When present, the year associated with the item's release (e.g. release year for a movie). | +| `metadataItem` | [shared.Items](../../../sdk/models/shared/items.md)[] | :heavy_minus_sign: | N/A | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/metadatumresponse.md b/docs/sdk/models/shared/metadatumresponse.md new file mode 100644 index 00000000..840f6df9 --- /dev/null +++ b/docs/sdk/models/shared/metadatumresponse.md @@ -0,0 +1,25 @@ +# MetadatumResponse + +## Example Usage + +```typescript +import { MetadatumResponse } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: MetadatumResponse = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `accountID` | *number* | :heavy_minus_sign: | The account id of this playback | +| `deviceID` | *number* | :heavy_minus_sign: | The device id which played the item | +| `historyKey` | *string* | :heavy_minus_sign: | The key for this individual history item | +| `key` | *string* | :heavy_minus_sign: | The metadata key for the item played | +| `librarySectionID` | *string* | :heavy_minus_sign: | The library section id containing the item played | +| `originallyAvailableAt` | *string* | :heavy_minus_sign: | The originally available at of the item played | +| `ratingKey` | *string* | :heavy_minus_sign: | The rating key for the item played | +| `thumb` | *string* | :heavy_minus_sign: | The thumb of the item played | +| `title` | *string* | :heavy_minus_sign: | The title of the item played | +| `type` | *string* | :heavy_minus_sign: | The metadata type of the item played | +| `viewedAt` | *number* | :heavy_minus_sign: | The time when the item was played | \ No newline at end of file diff --git a/docs/sdk/models/shared/part.md b/docs/sdk/models/shared/part.md new file mode 100644 index 00000000..f9b1529e --- /dev/null +++ b/docs/sdk/models/shared/part.md @@ -0,0 +1,72 @@ +# Part + +`Part` represents a particular file or "part" of a media item. The part is the playable unit of the media hierarchy. Suppose that a movie library contains a movie that is broken up into files, reminiscent of a movie split across two BDs. The metadata item represents information about the movie, the media item represents this instance of the movie at this resolution and quality, and the part items represent the two playable files. If another media were added which contained the joining of these two parts transcoded down to a lower resolution, then this metadata would contain 2 medias, one with 2 parts and one with 1 part. + + +## Example Usage + +```typescript +import { Part } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Part = { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `audioProfile` | *any* | :heavy_minus_sign: | N/A | lc | +| `container` | *any* | :heavy_minus_sign: | The container of the media file, such as `mp4` or `mkv` | mov | +| `duration` | *number* | :heavy_minus_sign: | The duration of the media item, in milliseconds | 150192 | +| `file` | *any* | :heavy_minus_sign: | The local file path at which the part is stored on the server | /home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov | +| `has64bitOffsets` | *boolean* | :heavy_minus_sign: | N/A | false | +| `id` | *number* | :heavy_minus_sign: | N/A | 1 | +| `key` | *any* | :heavy_minus_sign: | The key from which the media can be streamed | /library/parts/1/1531779263/file.mov | +| `optimizedForStreaming` | *boolean* | :heavy_minus_sign: | N/A | false | +| `size` | *number* | :heavy_minus_sign: | The size of the media, in bytes | 105355654 | +| `stream` | [shared.Stream](../../../sdk/models/shared/stream.md)[] | :heavy_minus_sign: | N/A | | +| `videoProfile` | *any* | :heavy_minus_sign: | N/A | main | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/shared/player.md b/docs/sdk/models/shared/player.md new file mode 100644 index 00000000..f84b4ffe --- /dev/null +++ b/docs/sdk/models/shared/player.md @@ -0,0 +1,31 @@ +# Player + +Information about the player being used for playback + +## Example Usage + +```typescript +import { Player } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Player = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `title` | *string* | :heavy_minus_sign: | The title of the client | +| `address` | *string* | :heavy_minus_sign: | The remote address | +| `local` | *boolean* | :heavy_minus_sign: | Indicating if the client is playing from the local LAN | +| `machineIdentifier` | *string* | :heavy_minus_sign: | The identifier of the client | +| `model` | *string* | :heavy_minus_sign: | The model of the client | +| `platform` | *string* | :heavy_minus_sign: | The platform of the client | +| `platformVersion` | *string* | :heavy_minus_sign: | The platformVersion of the client | +| `product` | *string* | :heavy_minus_sign: | The product name of the client | +| `relayed` | *boolean* | :heavy_minus_sign: | Indicating if the client is playing over a relay connection | +| `remotePublicAddress` | *string* | :heavy_minus_sign: | The client's public address | +| `secure` | *boolean* | :heavy_minus_sign: | Indicating if the client is playing over HTTPS | +| `state` | *string* | :heavy_minus_sign: | The client's last reported state | +| `userID` | *number* | :heavy_minus_sign: | The id of the user | +| `vendor` | *string* | :heavy_minus_sign: | The vendor of the client | +| `version` | *string* | :heavy_minus_sign: | The version of the client | \ No newline at end of file diff --git a/docs/sdk/models/shared/playlisttype.md b/docs/sdk/models/shared/playlisttype.md new file mode 100644 index 00000000..37c152ed --- /dev/null +++ b/docs/sdk/models/shared/playlisttype.md @@ -0,0 +1,19 @@ +# PlaylistType + +The type of the playlist. + +## Example Usage + +```typescript +import { PlaylistType } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: PlaylistType = PlaylistType.Video; +``` + +## Values + +| Name | Value | +| ------- | ------- | +| `Audio` | audio | +| `Video` | video | +| `Photo` | photo | \ No newline at end of file diff --git a/docs/sdk/models/shared/postresponses200.md b/docs/sdk/models/shared/postresponses200.md new file mode 100644 index 00000000..1a058e0b --- /dev/null +++ b/docs/sdk/models/shared/postresponses200.md @@ -0,0 +1,17 @@ +# PostResponses200 + +OK + +## Example Usage + +```typescript +import { PostResponses200 } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: PostResponses200 = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [shared.PostResponses200MediaContainer](../../../sdk/models/shared/postresponses200mediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/postresponses200mediacontainer.md b/docs/sdk/models/shared/postresponses200mediacontainer.md new file mode 100644 index 00000000..d5ce0f51 --- /dev/null +++ b/docs/sdk/models/shared/postresponses200mediacontainer.md @@ -0,0 +1,30 @@ +# PostResponses200MediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { PostResponses200MediaContainer } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: PostResponses200MediaContainer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| +| `size` | *number* | :heavy_minus_sign: | N/A | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| +| `color` | *string* | :heavy_minus_sign: | N/A | +| `endTimeOffset` | *number* | :heavy_minus_sign: | N/A | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `startTimeOffset` | *number* | :heavy_minus_sign: | N/A | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `type` | [shared.TypeResponse](../../../sdk/models/shared/typeresponse.md) | :heavy_minus_sign: | N/A | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/protocol.md b/docs/sdk/models/shared/protocol.md new file mode 100644 index 00000000..4571fcf5 --- /dev/null +++ b/docs/sdk/models/shared/protocol.md @@ -0,0 +1,17 @@ +# Protocol + +## Example Usage + +```typescript +import { Protocol } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Protocol = Protocol.Dash; +``` + +## Values + +| Name | Value | +| ------ | ------ | +| `Http` | http | +| `Hls` | hls | +| `Dash` | dash | \ No newline at end of file diff --git a/docs/sdk/models/shared/recommendationsvisibility.md b/docs/sdk/models/shared/recommendationsvisibility.md new file mode 100644 index 00000000..3cf11f16 --- /dev/null +++ b/docs/sdk/models/shared/recommendationsvisibility.md @@ -0,0 +1,25 @@ +# RecommendationsVisibility + +The visibility of this hub in recommendations: + - all: Visible to all users + - none: Visible to no users + - admin: Visible to only admin users + - shared: Visible to shared users + + +## Example Usage + +```typescript +import { RecommendationsVisibility } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: RecommendationsVisibility = RecommendationsVisibility.Admin; +``` + +## Values + +| Name | Value | +| -------- | -------- | +| `All` | all | +| `None` | none | +| `Admin` | admin | +| `Shared` | shared | \ No newline at end of file diff --git a/docs/sdk/models/shared/requesthandlerslashgetresponses200.md b/docs/sdk/models/shared/requesthandlerslashgetresponses200.md new file mode 100644 index 00000000..de6f5408 --- /dev/null +++ b/docs/sdk/models/shared/requesthandlerslashgetresponses200.md @@ -0,0 +1,26 @@ +# RequestHandlerSlashGetResponses200 + +OK + +## Example Usage + +```typescript +import { RequestHandlerSlashGetResponses200 } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: RequestHandlerSlashGetResponses200 = { + mediaContainer: { + livetv: 7, + machineIdentifier: "0123456789abcdef0123456789abcdef012345678", + musicAnalysis: 2, + myPlexMappingState: "mapped", + myPlexSigninState: "ok", + offlineTranscode: 1, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [shared.RequestHandlerSlashGetResponses200MediaContainer](../../../sdk/models/shared/requesthandlerslashgetresponses200mediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/requesthandlerslashgetresponses200mediacontainer.md b/docs/sdk/models/shared/requesthandlerslashgetresponses200mediacontainer.md new file mode 100644 index 00000000..83092665 --- /dev/null +++ b/docs/sdk/models/shared/requesthandlerslashgetresponses200mediacontainer.md @@ -0,0 +1,79 @@ +# RequestHandlerSlashGetResponses200MediaContainer + +`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. +Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) +The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + + +## Example Usage + +```typescript +import { RequestHandlerSlashGetResponses200MediaContainer } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: RequestHandlerSlashGetResponses200MediaContainer = { + livetv: 7, + machineIdentifier: "0123456789abcdef0123456789abcdef012345678", + musicAnalysis: 2, + myPlexMappingState: "mapped", + myPlexSigninState: "ok", + offlineTranscode: 1, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_minus_sign: | N/A | | +| `offset` | *number* | :heavy_minus_sign: | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
| | +| `size` | *number* | :heavy_minus_sign: | N/A | | +| `totalSize` | *number* | :heavy_minus_sign: | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
| | +| `allowCameraUpload` | *boolean* | :heavy_minus_sign: | N/A | | +| `allowChannelAccess` | *boolean* | :heavy_minus_sign: | N/A | | +| `allowMediaDeletion` | *boolean* | :heavy_minus_sign: | N/A | | +| `allowSharing` | *boolean* | :heavy_minus_sign: | N/A | | +| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | | +| `allowTuners` | *boolean* | :heavy_minus_sign: | N/A | | +| `backgroundProcessing` | *boolean* | :heavy_minus_sign: | N/A | | +| `certificate` | *boolean* | :heavy_minus_sign: | N/A | | +| `companionProxy` | *boolean* | :heavy_minus_sign: | N/A | | +| `countryCode` | *string* | :heavy_minus_sign: | N/A | | +| `diagnostics` | *string* | :heavy_minus_sign: | N/A | | +| `eventStream` | *boolean* | :heavy_minus_sign: | N/A | | +| `friendlyName` | *string* | :heavy_minus_sign: | N/A | | +| `hubSearch` | *boolean* | :heavy_minus_sign: | N/A | | +| `itemClusters` | *boolean* | :heavy_minus_sign: | N/A | | +| `livetv` | *number* | :heavy_minus_sign: | N/A | 7 | +| `machineIdentifier` | *any* | :heavy_minus_sign: | N/A | 0123456789abcdef0123456789abcdef012345678 | +| `mediaProviders` | *boolean* | :heavy_minus_sign: | N/A | | +| `multiuser` | *boolean* | :heavy_minus_sign: | N/A | | +| `musicAnalysis` | *number* | :heavy_minus_sign: | N/A | 2 | +| `myPlex` | *boolean* | :heavy_minus_sign: | N/A | | +| `myPlexMappingState` | *any* | :heavy_minus_sign: | N/A | mapped | +| `myPlexSigninState` | *any* | :heavy_minus_sign: | N/A | ok | +| `myPlexSubscription` | *boolean* | :heavy_minus_sign: | N/A | | +| `myPlexUsername` | *string* | :heavy_minus_sign: | N/A | | +| `offlineTranscode` | *any* | :heavy_minus_sign: | N/A | 1 | +| `ownerFeatures` | *string* | :heavy_minus_sign: | A comma-separated list of features which are enabled for the server owner | | +| `platform` | *string* | :heavy_minus_sign: | N/A | | +| `platformVersion` | *string* | :heavy_minus_sign: | N/A | | +| `pluginHost` | *boolean* | :heavy_minus_sign: | N/A | | +| `pushNotifications` | *boolean* | :heavy_minus_sign: | N/A | | +| `readOnlyLibraries` | *boolean* | :heavy_minus_sign: | N/A | | +| `streamingBrainABRVersion` | *number* | :heavy_minus_sign: | N/A | | +| `streamingBrainVersion` | *number* | :heavy_minus_sign: | N/A | | +| `sync` | *boolean* | :heavy_minus_sign: | N/A | | +| `transcoderActiveVideoSessions` | *number* | :heavy_minus_sign: | N/A | | +| `transcoderAudio` | *boolean* | :heavy_minus_sign: | N/A | | +| `transcoderLyrics` | *boolean* | :heavy_minus_sign: | N/A | | +| `transcoderPhoto` | *boolean* | :heavy_minus_sign: | N/A | | +| `transcoderSubtitles` | *boolean* | :heavy_minus_sign: | N/A | | +| `transcoderVideo` | *boolean* | :heavy_minus_sign: | N/A | | +| `transcoderVideoBitrates` | *any* | :heavy_minus_sign: | The suggested video quality bitrates to present to the user | | +| `transcoderVideoQualities` | *string* | :heavy_minus_sign: | N/A | | +| `transcoderVideoResolutions` | *any* | :heavy_minus_sign: | The suggested video resolutions to the above quality bitrates | | +| `updatedAt` | *number* | :heavy_minus_sign: | N/A | | +| `updater` | *boolean* | :heavy_minus_sign: | N/A | | +| `version` | *string* | :heavy_minus_sign: | N/A | | +| `voiceSearch` | *boolean* | :heavy_minus_sign: | N/A | | +| `directory` | [shared.DirectoryResponse](../../../sdk/models/shared/directoryresponse.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/shared/security.md b/docs/sdk/models/shared/security.md index 0a6d2f14..80d055ed 100644 --- a/docs/sdk/models/shared/security.md +++ b/docs/sdk/models/shared/security.md @@ -12,4 +12,4 @@ let value: Security = {}; | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `accessToken` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `apiKey` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/session.md b/docs/sdk/models/shared/session.md new file mode 100644 index 00000000..ffd56a02 --- /dev/null +++ b/docs/sdk/models/shared/session.md @@ -0,0 +1,19 @@ +# Session + +Information about the playback session + +## Example Usage + +```typescript +import { Session } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Session = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `bandwidth` | *number* | :heavy_minus_sign: | The bandwidth used by this client's playback in kbps | +| `id` | *string* | :heavy_minus_sign: | The id of the playback session | +| `location` | [shared.SessionLocation](../../../sdk/models/shared/sessionlocation.md) | :heavy_minus_sign: | The location of the client | \ No newline at end of file diff --git a/docs/sdk/models/shared/sessionlocation.md b/docs/sdk/models/shared/sessionlocation.md new file mode 100644 index 00000000..884ecf43 --- /dev/null +++ b/docs/sdk/models/shared/sessionlocation.md @@ -0,0 +1,18 @@ +# SessionLocation + +The location of the client + +## Example Usage + +```typescript +import { SessionLocation } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: SessionLocation = SessionLocation.Wan; +``` + +## Values + +| Name | Value | +| ----- | ----- | +| `Lan` | lan | +| `Wan` | wan | \ No newline at end of file diff --git a/docs/sdk/models/shared/setting.md b/docs/sdk/models/shared/setting.md new file mode 100644 index 00000000..af8c2721 --- /dev/null +++ b/docs/sdk/models/shared/setting.md @@ -0,0 +1,26 @@ +# Setting + +A configuration setting or preference + +## Example Usage + +```typescript +import { Setting } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Setting = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `type` | [shared.SettingType](../../../sdk/models/shared/settingtype.md) | :heavy_minus_sign: | The type of the value of this setting | +| `default` | *shared.Default* | :heavy_minus_sign: | The default value of this setting | +| `advanced` | *boolean* | :heavy_minus_sign: | Whether the setting is considered advanced and normally hidden from the user | +| `enumValues` | *string* | :heavy_minus_sign: | The possible values for this setting if restricted. The list is `\|` separated with `value:name` entries. | +| `group` | *string* | :heavy_minus_sign: | The group name of this setting to aid in display of a hierarchy | +| `hidden` | *boolean* | :heavy_minus_sign: | Whether the setting is hidden or not | +| `id` | *string* | :heavy_minus_sign: | The query parameter name for this setting | +| `label` | *string* | :heavy_minus_sign: | A user-friendly name for the setting | +| `summary` | *string* | :heavy_minus_sign: | A description of the setting | +| `value` | *shared.Value* | :heavy_minus_sign: | The current value of this setting | \ No newline at end of file diff --git a/docs/sdk/models/shared/settingtype.md b/docs/sdk/models/shared/settingtype.md new file mode 100644 index 00000000..12c9f2fd --- /dev/null +++ b/docs/sdk/models/shared/settingtype.md @@ -0,0 +1,20 @@ +# SettingType + +The type of the value of this setting + +## Example Usage + +```typescript +import { SettingType } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: SettingType = SettingType.Double; +``` + +## Values + +| Name | Value | +| -------- | -------- | +| `Bool` | bool | +| `Int` | int | +| `Text` | text | +| `Double` | double | \ No newline at end of file diff --git a/docs/sdk/models/shared/slashgetresponses200.md b/docs/sdk/models/shared/slashgetresponses200.md new file mode 100644 index 00000000..981b9ba7 --- /dev/null +++ b/docs/sdk/models/shared/slashgetresponses200.md @@ -0,0 +1,171 @@ +# SlashGetResponses200 + +OK + +## Example Usage + +```typescript +import { SlashGetResponses200 } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: SlashGetResponses200 = { + mediaContainer: { + directory: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [shared.SlashGetResponses200MediaContainer](../../../sdk/models/shared/slashgetresponses200mediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/slashgetresponses200mediacontainer.md b/docs/sdk/models/shared/slashgetresponses200mediacontainer.md new file mode 100644 index 00000000..7fdde669 --- /dev/null +++ b/docs/sdk/models/shared/slashgetresponses200mediacontainer.md @@ -0,0 +1,180 @@ +# SlashGetResponses200MediaContainer + +## Example Usage + +```typescript +import { SlashGetResponses200MediaContainer } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: SlashGetResponses200MediaContainer = { + directory: [ + { + autotag: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + country: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + director: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + genre: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + guid: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + media: [ + { + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + audioProfile: "lc", + bitrate: 5612, + container: "mov", + duration: 150192, + has64bitOffsets: false, + hasVoiceActivity: true, + height: 544, + id: 1, + optimizedForStreaming: false, + part: [ + { + audioProfile: "lc", + container: "mov", + duration: 150192, + file: "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov", + has64bitOffsets: false, + id: 1, + key: "/library/parts/1/1531779263/file.mov", + optimizedForStreaming: false, + size: 105355654, + stream: [ + { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, + }, + ], + videoProfile: "main", + }, + ], + videoCodec: "h264", + videoFrameRate: "24p", + videoProfile: "main", + videoResolution: "720", + width: 1280, + }, + ], + ratingArray: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + role: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + writer: [ + { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: + "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", + }, + ], + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `content` | *string* | :heavy_minus_sign: | The flavors of directory found here:
- Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users.
- Secondary: These are marked with `"secondary": true` and were used by old clients to provide nested menus allowing for primative (but structured) navigation.
- Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `"search": true` which used to be used to allow clients to build search dialogs on the fly. | +| `allowSync` | *boolean* | :heavy_minus_sign: | N/A | +| `art` | *string* | :heavy_minus_sign: | N/A | +| `directory` | [shared.Metadata](../../../sdk/models/shared/metadata.md)[] | :heavy_minus_sign: | N/A | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `librarySectionID` | *number* | :heavy_minus_sign: | N/A | +| `mediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | +| `mediaTagVersion` | *number* | :heavy_minus_sign: | N/A | +| `size` | *number* | :heavy_minus_sign: | N/A | +| `sortAsc` | *boolean* | :heavy_minus_sign: | N/A | +| `thumb` | *string* | :heavy_minus_sign: | N/A | +| `title1` | *string* | :heavy_minus_sign: | N/A | +| `viewGroup` | *string* | :heavy_minus_sign: | N/A | +| `viewMode` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/sort.md b/docs/sdk/models/shared/sort.md new file mode 100644 index 00000000..7c183d84 --- /dev/null +++ b/docs/sdk/models/shared/sort.md @@ -0,0 +1,37 @@ +# Sort + +Each `Sort` object contains a description of the sort field. + + +## Example Usage + +```typescript +import { Sort } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Sort = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `title` | *string* | :heavy_minus_sign: | The title of the field. | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `art` | *string* | :heavy_minus_sign: | N/A | +| `content` | *boolean* | :heavy_minus_sign: | N/A | +| `filter` | *string* | :heavy_minus_sign: | N/A | +| `hasPrefs` | *boolean* | :heavy_minus_sign: | N/A | +| `hasStoreServices` | *boolean* | :heavy_minus_sign: | N/A | +| `hubKey` | *string* | :heavy_minus_sign: | N/A | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | The key to use in the sort field to make items sort by this item | +| `lastAccessedAt` | *number* | :heavy_minus_sign: | N/A | +| `pivot` | [shared.SortPivot](../../../sdk/models/shared/sortpivot.md)[] | :heavy_minus_sign: | N/A | +| `share` | *number* | :heavy_minus_sign: | N/A | +| `thumb` | *string* | :heavy_minus_sign: | N/A | +| `titleBar` | *string* | :heavy_minus_sign: | N/A | +| `default` | [shared.DefaultEnum](../../../sdk/models/shared/defaultenum.md) | :heavy_minus_sign: | If present, this sort is the default and in this direction | +| `defaultDirection` | [shared.DefaultDirection](../../../sdk/models/shared/defaultdirection.md) | :heavy_minus_sign: | This default diction of this sort | +| `descKey` | *string* | :heavy_minus_sign: | The key for sorting this field in reverse order | +| `firstCharacterKey` | *string* | :heavy_minus_sign: | The key to use to get items sorted by this field and indexed by the first character | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/sortpivot.md b/docs/sdk/models/shared/sortpivot.md new file mode 100644 index 00000000..0cd0fa8b --- /dev/null +++ b/docs/sdk/models/shared/sortpivot.md @@ -0,0 +1,20 @@ +# SortPivot + +## Example Usage + +```typescript +import { SortPivot } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: SortPivot = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `context` | *string* | :heavy_minus_sign: | N/A | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `symbol` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/status.md b/docs/sdk/models/shared/status.md new file mode 100644 index 00000000..cf1415ef --- /dev/null +++ b/docs/sdk/models/shared/status.md @@ -0,0 +1,22 @@ +# Status + +## Example Usage + +```typescript +import { Status } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Status = Status.Error; +``` + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `Inactive` | inactive | +| `Scheduled` | scheduled | +| `Inprogress` | inprogress | +| `Complete` | complete | +| `Cancelled` | cancelled | +| `Error` | error | +| `Postprocessing` | postprocessing | +| `Paused` | paused | \ No newline at end of file diff --git a/docs/sdk/models/shared/stream.md b/docs/sdk/models/shared/stream.md new file mode 100644 index 00000000..f22952a8 --- /dev/null +++ b/docs/sdk/models/shared/stream.md @@ -0,0 +1,76 @@ +# Stream + +`Stream` represents a particular stream from a media item, such as the video stream, audio stream, or subtitle stream. The stream may either be part of the file represented by the parent `Part` or, especially for subtitles, an external file. The stream contains more detailed information about the specific stream. For example, a video may include the `aspectRatio` at the `Media` level, but detailed information about the video stream like the color space will be included on the `Stream` for the video stream. Note that photos do not have streams (mostly as an optimization). + + +## Example Usage + +```typescript +import { Stream } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Stream = { + default: true, + audioChannelLayout: "stereo", + bitDepth: 8, + bitrate: 5466, + canAutoSync: true, + chromaLocation: "topleft", + chromaSubsampling: "4:2:0", + codec: "h264", + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + displayTitle: "English (H.264 Main)", + frameRate: 23.976, + hasScalingMatrix: false, + height: 544, + id: 1, + index: 0, + key: "/library/streams/1", + language: "English", + languageCode: "eng", + level: 31, + profile: "main", + refFrames: 2, + samplingRate: 48000, + streamIdentifier: 1, + streamType: 1, + width: 1280, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `default` | *boolean* | :heavy_minus_sign: | N/A | true | +| `audioChannelLayout` | *any* | :heavy_minus_sign: | N/A | stereo | +| `bitDepth` | *number* | :heavy_minus_sign: | N/A | 8 | +| `bitrate` | *number* | :heavy_minus_sign: | N/A | 5466 | +| `canAutoSync` | *boolean* | :heavy_minus_sign: | For subtitle streams only. If `true` then the server can attempt to automatically sync the subtitle timestamps with the video. | true | +| `chromaLocation` | *any* | :heavy_minus_sign: | N/A | topleft | +| `chromaSubsampling` | *any* | :heavy_minus_sign: | N/A | 4:2:0 | +| `codec` | *any* | :heavy_minus_sign: | The codec of the stream, such as `h264` or `aac` | h264 | +| `colorPrimaries` | *any* | :heavy_minus_sign: | N/A | bt709 | +| `colorRange` | *any* | :heavy_minus_sign: | N/A | tv | +| `colorSpace` | *any* | :heavy_minus_sign: | N/A | bt709 | +| `colorTrc` | *any* | :heavy_minus_sign: | N/A | bt709 | +| `displayTitle` | *any* | :heavy_minus_sign: | A friendly name for the stream, often comprised of the language and codec information | English (H.264 Main) | +| `frameRate` | *number* | :heavy_minus_sign: | N/A | 23.976 | +| `hasScalingMatrix` | *any* | :heavy_minus_sign: | N/A | false | +| `height` | *number* | :heavy_minus_sign: | N/A | 544 | +| `id` | *number* | :heavy_minus_sign: | N/A | 1 | +| `index` | *number* | :heavy_minus_sign: | If the stream is part of the `Part` and not an external resource, the index of the stream within that part | 0 | +| `key` | *any* | :heavy_minus_sign: | If the stream is independently streamable, the key from which it can be streamed | /library/streams/1 | +| `language` | *any* | :heavy_minus_sign: | N/A | English | +| `languageCode` | *any* | :heavy_minus_sign: | The three character language code for the stream contents | eng | +| `level` | *number* | :heavy_minus_sign: | N/A | 31 | +| `profile` | *any* | :heavy_minus_sign: | N/A | main | +| `refFrames` | *number* | :heavy_minus_sign: | N/A | 2 | +| `samplingRate` | *number* | :heavy_minus_sign: | N/A | 48000 | +| `selected` | *boolean* | :heavy_minus_sign: | N/A | | +| `streamIdentifier` | *number* | :heavy_minus_sign: | N/A | 1 | +| `streamType` | *number* | :heavy_minus_sign: | A number indicating the type of the stream. `1` for video, `2` for audio, `3` for subtitles, `4` for lyrics | 1 | +| `width` | *number* | :heavy_minus_sign: | N/A | 1280 | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/shared/streamdecision.md b/docs/sdk/models/shared/streamdecision.md new file mode 100644 index 00000000..0021c43d --- /dev/null +++ b/docs/sdk/models/shared/streamdecision.md @@ -0,0 +1,20 @@ +# StreamDecision + +## Example Usage + +```typescript +import { StreamDecision } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: StreamDecision = StreamDecision.Unavailable; +``` + +## Values + +| Name | Value | +| ------------- | ------------- | +| `Copy` | copy | +| `Transcode` | transcode | +| `Burn` | burn | +| `Unavailable` | unavailable | +| `Ignore` | ignore | +| `None` | none | \ No newline at end of file diff --git a/docs/sdk/models/shared/subtitles.md b/docs/sdk/models/shared/subtitles.md new file mode 100644 index 00000000..96d5fdad --- /dev/null +++ b/docs/sdk/models/shared/subtitles.md @@ -0,0 +1,21 @@ +# Subtitles + +## Example Usage + +```typescript +import { Subtitles } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Subtitles = Subtitles.Embedded; +``` + +## Values + +| Name | Value | +| ----------- | ----------- | +| `Auto` | auto | +| `Burn` | burn | +| `None` | none | +| `Sidecar` | sidecar | +| `Embedded` | embedded | +| `Segmented` | segmented | +| `Unknown` | unknown | \ No newline at end of file diff --git a/docs/sdk/models/shared/tag.md b/docs/sdk/models/shared/tag.md new file mode 100644 index 00000000..501eaa8f --- /dev/null +++ b/docs/sdk/models/shared/tag.md @@ -0,0 +1,33 @@ +# Tag + +A variety of extra information about a metadata item is included as tags. These tags use their own element names such as `Genre`, `Writer`, `Directory`, and `Role`. Individual tag types may introduce their own extra attributes. + + +## Example Usage + +```typescript +import { Tag } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: Tag = { + filter: "actor=49", + role: "Secretary", + tag: "Shaun Lawton", + tagKey: "5d3ee12c4cde6a001c3e0b27", + thumb: "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `confidence` | *number* | :heavy_minus_sign: | Measure of the confidence of an automatic tag | | +| `context` | *string* | :heavy_minus_sign: | N/A | | +| `filter` | *any* | :heavy_minus_sign: | A filter parameter that can be used to query for more content that matches this tag value. | actor=49 | +| `id` | *number* | :heavy_minus_sign: | N/A | | +| `ratingKey` | *string* | :heavy_minus_sign: | N/A | | +| `role` | *any* | :heavy_minus_sign: | The role this actor played | Secretary | +| `tag` | *any* | :heavy_minus_sign: | The value of the tag (the name) | Shaun Lawton | +| `tagKey` | *any* | :heavy_minus_sign: | Plex identifier for this tag which can be used to fetch additional information from plex.tv | 5d3ee12c4cde6a001c3e0b27 | +| `tagType` | *number* | :heavy_minus_sign: | N/A | | +| `thumb` | *any* | :heavy_minus_sign: | N/A | http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg | \ No newline at end of file diff --git a/docs/sdk/models/shared/transcodesession.md b/docs/sdk/models/shared/transcodesession.md new file mode 100644 index 00000000..2caacbf2 --- /dev/null +++ b/docs/sdk/models/shared/transcodesession.md @@ -0,0 +1,30 @@ +# TranscodeSession + +The transcode session if item is currently being transcoded + +## Example Usage + +```typescript +import { TranscodeSession } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: TranscodeSession = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `complete` | *boolean* | :heavy_minus_sign: | N/A | +| `context` | *string* | :heavy_minus_sign: | N/A | +| `duration` | *number* | :heavy_minus_sign: | N/A | +| `error` | *boolean* | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `progress` | *number* | :heavy_minus_sign: | N/A | +| `protocol` | *string* | :heavy_minus_sign: | N/A | +| `size` | *number* | :heavy_minus_sign: | N/A | +| `sourceAudioCodec` | *string* | :heavy_minus_sign: | N/A | +| `sourceVideoCodec` | *string* | :heavy_minus_sign: | N/A | +| `speed` | *number* | :heavy_minus_sign: | N/A | +| `throttled` | *boolean* | :heavy_minus_sign: | N/A | +| `transcodeHwFullPipeline` | *boolean* | :heavy_minus_sign: | N/A | +| `transcodeHwRequested` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/transcodetype.md b/docs/sdk/models/shared/transcodetype.md new file mode 100644 index 00000000..6b3a1364 --- /dev/null +++ b/docs/sdk/models/shared/transcodetype.md @@ -0,0 +1,18 @@ +# TranscodeType + +## Example Usage + +```typescript +import { TranscodeType } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: TranscodeType = TranscodeType.Video; +``` + +## Values + +| Name | Value | +| ----------- | ----------- | +| `Video` | video | +| `Music` | music | +| `Audio` | audio | +| `Subtitles` | subtitles | \ No newline at end of file diff --git a/docs/sdk/models/shared/typeresponse.md b/docs/sdk/models/shared/typeresponse.md new file mode 100644 index 00000000..f1f29519 --- /dev/null +++ b/docs/sdk/models/shared/typeresponse.md @@ -0,0 +1,19 @@ +# TypeResponse + +## Example Usage + +```typescript +import { TypeResponse } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: TypeResponse = TypeResponse.Bookmark; +``` + +## Values + +| Name | Value | +| ------------ | ------------ | +| `Intro` | intro | +| `Commercial` | commercial | +| `Bookmark` | bookmark | +| `Resume` | resume | +| `Credit` | credit | \ No newline at end of file diff --git a/docs/sdk/models/shared/user.md b/docs/sdk/models/shared/user.md new file mode 100644 index 00000000..bb8311a8 --- /dev/null +++ b/docs/sdk/models/shared/user.md @@ -0,0 +1,19 @@ +# User + +The user playing the content + +## Example Usage + +```typescript +import { User } from "@lukehagar/plexjs/sdk/models/shared"; + +let value: User = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `title` | *string* | :heavy_minus_sign: | The username | +| `id` | *string* | :heavy_minus_sign: | The id of the user | +| `thumb` | *string* | :heavy_minus_sign: | Thumb image to display for the user | \ No newline at end of file diff --git a/docs/sdk/models/shared/value.md b/docs/sdk/models/shared/value.md new file mode 100644 index 00000000..04d56dde --- /dev/null +++ b/docs/sdk/models/shared/value.md @@ -0,0 +1,25 @@ +# Value + +The current value of this setting + + +## Supported Types + +### `string` + +```typescript +const value: string = ""; +``` + +### `number` + +```typescript +const value: number = 1284.03; +``` + +### `boolean` + +```typescript +const value: boolean = true; +``` + diff --git a/docs/sdks/activities/README.md b/docs/sdks/activities/README.md index 0cbf255b..e2fe8dc6 100644 --- a/docs/sdks/activities/README.md +++ b/docs/sdks/activities/README.md @@ -3,36 +3,32 @@ ## Overview -Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. +Activities provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. + Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. -Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details: -- They can contain a `progress` (from 0 to 100) marking the percent completion of the activity. -- They must contain an `type` which is used by clients to distinguish the specific activity. -- They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.) -- The may contain a `Response` object which attributes which represent the result of the asynchronous operation. + +Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. ### Available Operations -* [getServerActivities](#getserveractivities) - Get Server Activities -* [cancelServerActivities](#cancelserveractivities) - Cancel Server Activities +* [listActivities](#listactivities) - Get all activities +* [cancelActivity](#cancelactivity) - Cancel a running activity -## getServerActivities +## listActivities -Get Server Activities +List all activities on the server. Admins can see all activities but other users can only see their own ### Example Usage - + ```typescript import { PlexAPI } from "@lukehagar/plexjs"; -const plexAPI = new PlexAPI({ - accessToken: "", -}); +const plexAPI = new PlexAPI(); async function run() { - const result = await plexAPI.activities.getServerActivities(); + const result = await plexAPI.activities.listActivities(); console.log(result); } @@ -46,21 +42,19 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { activitiesGetServerActivities } from "@lukehagar/plexjs/funcs/activitiesGetServerActivities.js"; +import { activitiesListActivities } from "@lukehagar/plexjs/funcs/activitiesListActivities.js"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); +const plexAPI = new PlexAPICore(); async function run() { - const res = await activitiesGetServerActivities(plexAPI); + const res = await activitiesListActivities(plexAPI); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("activitiesGetServerActivities failed:", res.error); + console.log("activitiesListActivities failed:", res.error); } } @@ -77,32 +71,41 @@ run(); ### Response -**Promise\<[operations.GetServerActivitiesResponse](../../sdk/models/operations/getserveractivitiesresponse.md)\>** +**Promise\<[operations.ListActivitiesResponse](../../sdk/models/operations/listactivitiesresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.GetServerActivitiesBadRequest | 400 | application/json | -| errors.GetServerActivitiesUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | -## cancelServerActivities +## cancelActivity -Cancel Server Activities +Cancel a running activity. Admins can cancel all activities but other users can only cancel their own ### Example Usage - + ```typescript import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.activities.cancelServerActivities("25b71ed5-0f9d-461c-baa7-d404e9e10d3e"); + const result = await plexAPI.activities.cancelActivity({ + activityId: "d6199ba1-fb5e-4cae-bf17-1a5369c1cf1e", + }); console.log(result); } @@ -116,21 +119,32 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { activitiesCancelServerActivities } from "@lukehagar/plexjs/funcs/activitiesCancelServerActivities.js"; +import { activitiesCancelActivity } from "@lukehagar/plexjs/funcs/activitiesCancelActivity.js"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. const plexAPI = new PlexAPICore({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const res = await activitiesCancelServerActivities(plexAPI, "25b71ed5-0f9d-461c-baa7-d404e9e10d3e"); + const res = await activitiesCancelActivity(plexAPI, { + activityId: "d6199ba1-fb5e-4cae-bf17-1a5369c1cf1e", + }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("activitiesCancelServerActivities failed:", res.error); + console.log("activitiesCancelActivity failed:", res.error); } } @@ -139,21 +153,19 @@ run(); ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `activityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. | [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. | | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CancelActivityRequest](../../sdk/models/operations/cancelactivityrequest.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. | ### Response -**Promise\<[operations.CancelServerActivitiesResponse](../../sdk/models/operations/cancelserveractivitiesresponse.md)\>** +**Promise\<[operations.CancelActivityResponse](../../sdk/models/operations/cancelactivityresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| errors.CancelServerActivitiesBadRequest | 400 | application/json | -| errors.CancelServerActivitiesUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/authentication/README.md b/docs/sdks/authentication/README.md deleted file mode 100644 index f124aadd..00000000 --- a/docs/sdks/authentication/README.md +++ /dev/null @@ -1,323 +0,0 @@ -# Authentication -(*authentication*) - -## Overview - -API Calls regarding authentication for Plex Media Server - - -### Available Operations - -* [getTransientToken](#gettransienttoken) - Get a Transient Token -* [getSourceConnectionInformation](#getsourceconnectioninformation) - Get Source Connection Information -* [getTokenDetails](#gettokendetails) - Get Token Details -* [postUsersSignInData](#postuserssignindata) - Get User Sign In Data - -## getTransientToken - -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. - - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; -import { GetTransientTokenQueryParamType, Scope } from "@lukehagar/plexjs/sdk/models/operations"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.authentication.getTransientToken(GetTransientTokenQueryParamType.Delegation, Scope.All); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { authenticationGetTransientToken } from "@lukehagar/plexjs/funcs/authenticationGetTransientToken.js"; -import { GetTransientTokenQueryParamType, Scope } from "@lukehagar/plexjs/sdk/models/operations"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await authenticationGetTransientToken(plexAPI, GetTransientTokenQueryParamType.Delegation, Scope.All); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("authenticationGetTransientToken failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `type` | [operations.GetTransientTokenQueryParamType](../../sdk/models/operations/gettransienttokenqueryparamtype.md) | :heavy_check_mark: | `delegation` - This is the only supported `type` parameter. | -| `scope` | [operations.Scope](../../sdk/models/operations/scope.md) | :heavy_check_mark: | `all` - This is the only supported `scope` parameter. | -| `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. | - -### Response - -**Promise\<[operations.GetTransientTokenResponse](../../sdk/models/operations/gettransienttokenresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | -| errors.GetTransientTokenBadRequest | 400 | application/json | -| errors.GetTransientTokenUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getSourceConnectionInformation - -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. - - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.authentication.getSourceConnectionInformation("server://client-identifier"); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { authenticationGetSourceConnectionInformation } from "@lukehagar/plexjs/funcs/authenticationGetSourceConnectionInformation.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await authenticationGetSourceConnectionInformation(plexAPI, "server://client-identifier"); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("authenticationGetSourceConnectionInformation failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `source` | *string* | :heavy_check_mark: | The source identifier with an included prefix. | [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. | | - -### Response - -**Promise\<[operations.GetSourceConnectionInformationResponse](../../sdk/models/operations/getsourceconnectioninformationresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| errors.GetSourceConnectionInformationBadRequest | 400 | application/json | -| errors.GetSourceConnectionInformationUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getTokenDetails - -Get the User data from the provided X-Plex-Token - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.authentication.getTokenDetails(); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.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. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await authenticationGetTokenDetails(plexAPI); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("authenticationGetTokenDetails failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| 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.GetTokenDetailsResponse](../../sdk/models/operations/gettokendetailsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.GetTokenDetailsBadRequest | 400 | application/json | -| errors.GetTokenDetailsUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## postUsersSignInData - -Sign in user with username and password and return user data with Plex authentication token - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI(); - -async function run() { - const result = await plexAPI.authentication.postUsersSignInData({ - clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", - clientName: "Plex for Roku", - deviceNickname: "Roku 3", - clientVersion: "2.4.1", - platform: "Roku", - requestBody: { - login: "username@email.com", - password: "password123", - verificationCode: "123456", - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { authenticationPostUsersSignInData } from "@lukehagar/plexjs/funcs/authenticationPostUsersSignInData.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore(); - -async function run() { - const res = await authenticationPostUsersSignInData(plexAPI, { - clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", - clientName: "Plex for Roku", - deviceNickname: "Roku 3", - clientVersion: "2.4.1", - platform: "Roku", - requestBody: { - login: "username@email.com", - password: "password123", - verificationCode: "123456", - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("authenticationPostUsersSignInData failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.PostUsersSignInDataRequest](../../sdk/models/operations/postuserssignindatarequest.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. | - -### Response - -**Promise\<[operations.PostUsersSignInDataResponse](../../sdk/models/operations/postuserssignindataresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.PostUsersSignInDataBadRequest | 400 | application/json | -| errors.PostUsersSignInDataUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/butler/README.md b/docs/sdks/butler/README.md index c8afef43..eec2ede2 100644 --- a/docs/sdks/butler/README.md +++ b/docs/sdks/butler/README.md @@ -3,179 +3,30 @@ ## Overview -Butler is the task manager of the Plex Media Server Ecosystem. - +The butler is responsible for running periodic tasks. Some tasks run daily, others every few days, and some weekly. These includes database maintenance, metadata updating, thumbnail generation, media analysis, and other tasks. ### Available Operations -* [getButlerTasks](#getbutlertasks) - Get Butler tasks -* [startAllTasks](#startalltasks) - Start all Butler tasks -* [stopAllTasks](#stopalltasks) - Stop all Butler tasks -* [startTask](#starttask) - Start a single Butler task +* [stopTasks](#stoptasks) - Stop all Butler tasks +* [getTasks](#gettasks) - Get all Butler tasks +* [startTasks](#starttasks) - Start all Butler tasks * [stopTask](#stoptask) - Stop a single Butler task +* [startTask](#starttask) - Start a single Butler task -## getButlerTasks - -Returns a list of butler tasks - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.butler.getButlerTasks(); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { butlerGetButlerTasks } from "@lukehagar/plexjs/funcs/butlerGetButlerTasks.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await butlerGetButlerTasks(plexAPI); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("butlerGetButlerTasks failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| 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. | - -### Response - -**Promise\<[operations.GetButlerTasksResponse](../../sdk/models/operations/getbutlertasksresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.GetButlerTasksBadRequest | 400 | application/json | -| errors.GetButlerTasksUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## startAllTasks - -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. - - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.butler.startAllTasks(); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { butlerStartAllTasks } from "@lukehagar/plexjs/funcs/butlerStartAllTasks.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await butlerStartAllTasks(plexAPI); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("butlerStartAllTasks failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| 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. | - -### Response - -**Promise\<[operations.StartAllTasksResponse](../../sdk/models/operations/startalltasksresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------------- | -------------------------------- | -------------------------------- | -| errors.StartAllTasksBadRequest | 400 | application/json | -| errors.StartAllTasksUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## stopAllTasks +## stopTasks This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. - ### Example Usage - + ```typescript import { PlexAPI } from "@lukehagar/plexjs"; -const plexAPI = new PlexAPI({ - accessToken: "", -}); +const plexAPI = new PlexAPI(); async function run() { - const result = await plexAPI.butler.stopAllTasks(); + const result = await plexAPI.butler.stopTasks(); console.log(result); } @@ -189,21 +40,19 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { butlerStopAllTasks } from "@lukehagar/plexjs/funcs/butlerStopAllTasks.js"; +import { butlerStopTasks } from "@lukehagar/plexjs/funcs/butlerStopTasks.js"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); +const plexAPI = new PlexAPICore(); async function run() { - const res = await butlerStopAllTasks(plexAPI); + const res = await butlerStopTasks(plexAPI); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("butlerStopAllTasks failed:", res.error); + console.log("butlerStopTasks failed:", res.error); } } @@ -220,38 +69,29 @@ run(); ### Response -**Promise\<[operations.StopAllTasksResponse](../../sdk/models/operations/stopalltasksresponse.md)\>** +**Promise\<[operations.StopTasksResponse](../../sdk/models/operations/stoptasksresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------- | ------------------------------- | ------------------------------- | -| errors.StopAllTasksBadRequest | 400 | application/json | -| errors.StopAllTasksUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | -## startTask +## getTasks -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. +Get the list of butler tasks and their scheduling ### Example Usage - + ```typescript import { PlexAPI } from "@lukehagar/plexjs"; -import { TaskName } from "@lukehagar/plexjs/sdk/models/operations"; -const plexAPI = new PlexAPI({ - accessToken: "", -}); +const plexAPI = new PlexAPI(); async function run() { - const result = await plexAPI.butler.startTask(TaskName.RefreshPeriodicMetadata); + const result = await plexAPI.butler.getTasks(); console.log(result); } @@ -265,22 +105,19 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { butlerStartTask } from "@lukehagar/plexjs/funcs/butlerStartTask.js"; -import { TaskName } from "@lukehagar/plexjs/sdk/models/operations"; +import { butlerGetTasks } from "@lukehagar/plexjs/funcs/butlerGetTasks.js"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); +const plexAPI = new PlexAPICore(); async function run() { - const res = await butlerStartTask(plexAPI, TaskName.RefreshPeriodicMetadata); + const res = await butlerGetTasks(plexAPI); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("butlerStartTask failed:", res.error); + console.log("butlerGetTasks failed:", res.error); } } @@ -291,41 +128,119 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `taskName` | [operations.TaskName](../../sdk/models/operations/taskname.md) | :heavy_check_mark: | the name of the task to be started. | | `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. | ### Response -**Promise\<[operations.StartTaskResponse](../../sdk/models/operations/starttaskresponse.md)\>** +**Promise\<[operations.GetTasksResponse](../../sdk/models/operations/gettasksresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.StartTaskBadRequest | 400 | application/json | -| errors.StartTaskUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## startTasks + +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. + + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI(); + +async function run() { + const result = await plexAPI.butler.startTasks(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { butlerStartTasks } from "@lukehagar/plexjs/funcs/butlerStartTasks.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore(); + +async function run() { + const res = await butlerStartTasks(plexAPI); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("butlerStartTasks failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| 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. | + +### Response + +**Promise\<[operations.StartTasksResponse](../../sdk/models/operations/starttasksresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | ## stopTask -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. +This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists ### Example Usage - + ```typescript import { PlexAPI } from "@lukehagar/plexjs"; -import { PathParamTaskName } from "@lukehagar/plexjs/sdk/models/operations"; +import { StopTaskTask } from "@lukehagar/plexjs/sdk/models/operations"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.butler.stopTask(PathParamTaskName.CleanOldCacheFiles); + const result = await plexAPI.butler.stopTask({ + task: StopTaskTask.CleanOldBundles, + }); console.log(result); } @@ -340,16 +255,27 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; import { butlerStopTask } from "@lukehagar/plexjs/funcs/butlerStopTask.js"; -import { PathParamTaskName } from "@lukehagar/plexjs/sdk/models/operations"; +import { StopTaskTask } from "@lukehagar/plexjs/sdk/models/operations"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. const plexAPI = new PlexAPICore({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const res = await butlerStopTask(plexAPI, PathParamTaskName.CleanOldCacheFiles); + const res = await butlerStopTask(plexAPI, { + task: StopTaskTask.CleanOldBundles, + }); if (res.ok) { const { value: result } = res; console.log(result); @@ -365,7 +291,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `taskName` | [operations.PathParamTaskName](../../sdk/models/operations/pathparamtaskname.md) | :heavy_check_mark: | The name of the task to be started. | +| `request` | [operations.StopTaskRequest](../../sdk/models/operations/stoptaskrequest.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. | @@ -376,8 +302,100 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| errors.StopTaskBadRequest | 400 | application/json | -| errors.StopTaskUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## startTask + +This endpoint will attempt to start a specific Butler task by name. + + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { StartTaskTask } from "@lukehagar/plexjs/sdk/models/operations"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.butler.startTask({ + task: StartTaskTask.RefreshLocalMedia, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { butlerStartTask } from "@lukehagar/plexjs/funcs/butlerStartTask.js"; +import { StartTaskTask } from "@lukehagar/plexjs/sdk/models/operations"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await butlerStartTask(plexAPI, { + task: StartTaskTask.RefreshLocalMedia, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("butlerStartTask failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.StartTaskRequest](../../sdk/models/operations/starttaskrequest.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. | + +### Response + +**Promise\<[operations.StartTaskResponse](../../sdk/models/operations/starttaskresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/collections/README.md b/docs/sdks/collections/README.md new file mode 100644 index 00000000..96f1cb1f --- /dev/null +++ b/docs/sdks/collections/README.md @@ -0,0 +1,101 @@ +# Collections +(*collections*) + +## Overview + +API Operations against the Collections + +### Available Operations + +* [createCollection](#createcollection) - Create collection + +## createCollection + +Create a collection in the library + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.collections.createCollection({ + sectionId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { collectionsCreateCollection } from "@lukehagar/plexjs/funcs/collectionsCreateCollection.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await collectionsCreateCollection(plexAPI, { + sectionId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("collectionsCreateCollection failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateCollectionRequest](../../sdk/models/operations/createcollectionrequest.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. | + +### Response + +**Promise\<[operations.CreateCollectionResponse](../../sdk/models/operations/createcollectionresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/content/README.md b/docs/sdks/content/README.md new file mode 100644 index 00000000..813509f2 --- /dev/null +++ b/docs/sdks/content/README.md @@ -0,0 +1,1231 @@ +# Content +(*content*) + +## Overview + +The actual content of the media provider + +### Available Operations + +* [getCollectionItems](#getcollectionitems) - Get items in a collection +* [getMetadataItem](#getmetadataitem) - Get a metadata item +* [getAlbums](#getalbums) - Set section albums +* [listContent](#listcontent) - Get items in the section +* [getAllLeaves](#getallleaves) - Set section leaves +* [getArts](#getarts) - Set section artwork +* [getCategories](#getcategories) - Set section categories +* [getCluster](#getcluster) - Set section clusters +* [getSonicPath](#getsonicpath) - Similar tracks to transition from one to another +* [getFolders](#getfolders) - Get all folder locations +* [listMoments](#listmoments) - Set section moments +* [getSonicallySimilar](#getsonicallysimilar) - The nearest audio tracks +* [getCollectionImage](#getcollectionimage) - Get a collection's image + +## getCollectionItems + +Get items in a collection. Note if this collection contains more than 100 items, paging must be used. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.content.getCollectionItems({ + collectionId: 314585, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { contentGetCollectionItems } from "@lukehagar/plexjs/funcs/contentGetCollectionItems.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await contentGetCollectionItems(plexAPI, { + collectionId: 314585, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("contentGetCollectionItems failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCollectionItemsRequest](../../sdk/models/operations/getcollectionitemsrequest.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. | + +### Response + +**Promise\<[operations.GetCollectionItemsResponse](../../sdk/models/operations/getcollectionitemsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getMetadataItem + +Get one or more metadata items. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.content.getMetadataItem({ + ids: [], + asyncCheckFiles: BoolInt.One, + asyncRefreshLocalMediaAgent: BoolInt.One, + asyncRefreshAnalysis: BoolInt.One, + checkFiles: BoolInt.One, + skipRefresh: BoolInt.One, + checkFileAvailability: BoolInt.One, + asyncAugmentMetadata: BoolInt.One, + augmentCount: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { contentGetMetadataItem } from "@lukehagar/plexjs/funcs/contentGetMetadataItem.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await contentGetMetadataItem(plexAPI, { + ids: [], + asyncCheckFiles: BoolInt.One, + asyncRefreshLocalMediaAgent: BoolInt.One, + asyncRefreshAnalysis: BoolInt.One, + checkFiles: BoolInt.One, + skipRefresh: BoolInt.One, + checkFileAvailability: BoolInt.One, + asyncAugmentMetadata: BoolInt.One, + augmentCount: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("contentGetMetadataItem failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetMetadataItemRequest](../../sdk/models/operations/getmetadataitemrequest.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. | + +### Response + +**Promise\<[operations.GetMetadataItemResponse](../../sdk/models/operations/getmetadataitemresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getAlbums + +Get all albums in a music section + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.content.getAlbums({ + sectionId: 817133, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { contentGetAlbums } from "@lukehagar/plexjs/funcs/contentGetAlbums.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await contentGetAlbums(plexAPI, { + sectionId: 817133, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("contentGetAlbums failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAlbumsRequest](../../sdk/models/operations/getalbumsrequest.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. | + +### Response + +**Promise\<[operations.GetAlbumsResponse](../../sdk/models/operations/getalbumsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listContent + +Get the items in a section, potentially filtering them + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.content.listContent({ + sectionId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { contentListContent } from "@lukehagar/plexjs/funcs/contentListContent.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await contentListContent(plexAPI, { + sectionId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("contentListContent failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListContentRequest](../../sdk/models/operations/listcontentrequest.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. | + +### Response + +**Promise\<[operations.ListContentResponse](../../sdk/models/operations/listcontentresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getAllLeaves + +Get all leaves in a section (such as episodes in a show section) + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.content.getAllLeaves({ + sectionId: 633197, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { contentGetAllLeaves } from "@lukehagar/plexjs/funcs/contentGetAllLeaves.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await contentGetAllLeaves(plexAPI, { + sectionId: 633197, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("contentGetAllLeaves failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAllLeavesRequest](../../sdk/models/operations/getallleavesrequest.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. | + +### Response + +**Promise\<[operations.GetAllLeavesResponse](../../sdk/models/operations/getallleavesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getArts + +Get artwork for a library section + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.content.getArts({ + sectionId: 859200, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { contentGetArts } from "@lukehagar/plexjs/funcs/contentGetArts.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await contentGetArts(plexAPI, { + sectionId: 859200, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("contentGetArts failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetArtsRequest](../../sdk/models/operations/getartsrequest.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. | + +### Response + +**Promise\<[operations.GetArtsResponse](../../sdk/models/operations/getartsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getCategories + +Get categories in a library section + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.content.getCategories({ + sectionId: 21841, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { contentGetCategories } from "@lukehagar/plexjs/funcs/contentGetCategories.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await contentGetCategories(plexAPI, { + sectionId: 21841, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("contentGetCategories failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCategoriesRequest](../../sdk/models/operations/getcategoriesrequest.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. | + +### Response + +**Promise\<[operations.GetCategoriesResponse](../../sdk/models/operations/getcategoriesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getCluster + +Get clusters in a library section (typically for photos) + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.content.getCluster({ + sectionId: 138560, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { contentGetCluster } from "@lukehagar/plexjs/funcs/contentGetCluster.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await contentGetCluster(plexAPI, { + sectionId: 138560, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("contentGetCluster failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetClusterRequest](../../sdk/models/operations/getclusterrequest.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. | + +### Response + +**Promise\<[operations.GetClusterResponse](../../sdk/models/operations/getclusterresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getSonicPath + +Get a list of audio tracks starting at one and ending at another which are similar across the path + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.content.getSonicPath({ + sectionId: 914549, + startID: 629990, + endID: 687740, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { contentGetSonicPath } from "@lukehagar/plexjs/funcs/contentGetSonicPath.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await contentGetSonicPath(plexAPI, { + sectionId: 914549, + startID: 629990, + endID: 687740, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("contentGetSonicPath failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetSonicPathRequest](../../sdk/models/operations/getsonicpathrequest.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. | + +### Response + +**Promise\<[operations.GetSonicPathResponse](../../sdk/models/operations/getsonicpathresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getFolders + +Get all folder locations of the media in a section + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.content.getFolders({ + sectionId: 892532, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { contentGetFolders } from "@lukehagar/plexjs/funcs/contentGetFolders.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await contentGetFolders(plexAPI, { + sectionId: 892532, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("contentGetFolders failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetFoldersRequest](../../sdk/models/operations/getfoldersrequest.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. | + +### Response + +**Promise\<[operations.GetFoldersResponse](../../sdk/models/operations/getfoldersresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listMoments + +Get moments in a library section (typically for photos) + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.content.listMoments({ + sectionId: 403239, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { contentListMoments } from "@lukehagar/plexjs/funcs/contentListMoments.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await contentListMoments(plexAPI, { + sectionId: 403239, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("contentListMoments failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListMomentsRequest](../../sdk/models/operations/listmomentsrequest.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. | + +### Response + +**Promise\<[operations.ListMomentsResponse](../../sdk/models/operations/listmomentsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getSonicallySimilar + +Get the nearest audio tracks to a particular analysis + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.content.getSonicallySimilar({ + sectionId: 525956, + values: [], + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { contentGetSonicallySimilar } from "@lukehagar/plexjs/funcs/contentGetSonicallySimilar.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await contentGetSonicallySimilar(plexAPI, { + sectionId: 525956, + values: [], + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("contentGetSonicallySimilar failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetSonicallySimilarRequest](../../sdk/models/operations/getsonicallysimilarrequest.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. | + +### Response + +**Promise\<[operations.GetSonicallySimilarResponse](../../sdk/models/operations/getsonicallysimilarresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getCollectionImage + +Get an image for the collection based on the items within + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.content.getCollectionImage({ + collectionId: 474227, + updatedAt: 759379, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { contentGetCollectionImage } from "@lukehagar/plexjs/funcs/contentGetCollectionImage.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await contentGetCollectionImage(plexAPI, { + collectionId: 474227, + updatedAt: 759379, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("contentGetCollectionImage failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCollectionImageRequest](../../sdk/models/operations/getcollectionimagerequest.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. | + +### Response + +**Promise\<[operations.GetCollectionImageResponse](../../sdk/models/operations/getcollectionimageresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/devices/README.md b/docs/sdks/devices/README.md new file mode 100644 index 00000000..664f466c --- /dev/null +++ b/docs/sdks/devices/README.md @@ -0,0 +1,1229 @@ +# Devices +(*devices*) + +## Overview + +Media grabbers provide ways for media to be obtained for a given protocol. The simplest ones are `stream` and `download`. More complex grabbers can have associated devices + +Network tuners can present themselves on the network using the Simple Service Discovery Protocol and Plex Media Server will discover them. The following XML is an example of the data returned from SSDP. The `deviceType`, `serviceType`, and `serviceId` values must remain as they are in the example in order for PMS to properly discover the device. Other less-obvious fields are described in the parameters section below. + +Example SSDP output +``` + + + 1 + 0 + + + urn:plex-tv:device:Media:1 + Turing Hopper 3000 + Plex, Inc. + https://plex.tv/ + Turing Hopper 3000 Media Grabber + Plex Media Grabber + 1 + https://plex.tv + uuid:42fde8e4-93b6-41e5-8a63-12d848655811 + + + http://10.0.0.5:8088 + urn:plex-tv:service:MediaGrabber:1 + urn:plex-tv:serviceId:MediaGrabber + + + + +``` + + - UDN: (string) A UUID for the device. This should be unique across models of a device at minimum. + - URLBase: (string) The base HTTP URL for the device from which all of the other endpoints are hosted. + + +### Available Operations + +* [getAvailableGrabbers](#getavailablegrabbers) - Get available grabbers +* [listDevices](#listdevices) - Get all devices +* [addDevice](#adddevice) - Add a device +* [discoverDevices](#discoverdevices) - Tell grabbers to discover devices +* [removeDevice](#removedevice) - Remove a device +* [getDeviceDetails](#getdevicedetails) - Get device details +* [modifyDevice](#modifydevice) - Enable or disable a device +* [setChannelmap](#setchannelmap) - Set a device's channel mapping +* [getDevicesChannels](#getdeviceschannels) - Get a device's channels +* [setDevicePreferences](#setdevicepreferences) - Set device preferences +* [stopScan](#stopscan) - Tell a device to stop scanning for channels +* [scan](#scan) - Tell a device to scan for channels +* [getThumb](#getthumb) - Get device thumb + +## getAvailableGrabbers + +Get available grabbers visible to the server + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.devices.getAvailableGrabbers({ + protocol: "livetv", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { devicesGetAvailableGrabbers } from "@lukehagar/plexjs/funcs/devicesGetAvailableGrabbers.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await devicesGetAvailableGrabbers(plexAPI, { + protocol: "livetv", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("devicesGetAvailableGrabbers failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAvailableGrabbersRequest](../../sdk/models/operations/getavailablegrabbersrequest.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. | + +### Response + +**Promise\<[operations.GetAvailableGrabbersResponse](../../sdk/models/operations/getavailablegrabbersresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listDevices + +Get the list of all devices present + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI(); + +async function run() { + const result = await plexAPI.devices.listDevices(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { devicesListDevices } from "@lukehagar/plexjs/funcs/devicesListDevices.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore(); + +async function run() { + const res = await devicesListDevices(plexAPI); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("devicesListDevices failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| 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. | + +### Response + +**Promise\<[operations.ListDevicesResponse](../../sdk/models/operations/listdevicesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## addDevice + +This endpoint adds a device to an existing grabber. The device is identified, and added to the correct grabber. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.devices.addDevice({ + uri: "http://10.0.0.5", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { devicesAddDevice } from "@lukehagar/plexjs/funcs/devicesAddDevice.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await devicesAddDevice(plexAPI, { + uri: "http://10.0.0.5", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("devicesAddDevice failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AddDeviceRequest](../../sdk/models/operations/adddevicerequest.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. | + +### Response + +**Promise\<[operations.AddDeviceResponse](../../sdk/models/operations/adddeviceresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## discoverDevices + +Tell grabbers to discover devices + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI(); + +async function run() { + const result = await plexAPI.devices.discoverDevices(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { devicesDiscoverDevices } from "@lukehagar/plexjs/funcs/devicesDiscoverDevices.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore(); + +async function run() { + const res = await devicesDiscoverDevices(plexAPI); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("devicesDiscoverDevices failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| 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. | + +### Response + +**Promise\<[operations.DiscoverDevicesResponse](../../sdk/models/operations/discoverdevicesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## removeDevice + +Remove a devices by its id along with its channel mappings + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.devices.removeDevice({ + deviceId: 685908, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { devicesRemoveDevice } from "@lukehagar/plexjs/funcs/devicesRemoveDevice.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await devicesRemoveDevice(plexAPI, { + deviceId: 685908, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("devicesRemoveDevice failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RemoveDeviceRequest](../../sdk/models/operations/removedevicerequest.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. | + +### Response + +**Promise\<[operations.RemoveDeviceResponse](../../sdk/models/operations/removedeviceresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getDeviceDetails + +Get a device's details by its id + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.devices.getDeviceDetails({ + deviceId: 170949, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { devicesGetDeviceDetails } from "@lukehagar/plexjs/funcs/devicesGetDeviceDetails.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await devicesGetDeviceDetails(plexAPI, { + deviceId: 170949, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("devicesGetDeviceDetails failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetDeviceDetailsRequest](../../sdk/models/operations/getdevicedetailsrequest.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. | + +### Response + +**Promise\<[operations.GetDeviceDetailsResponse](../../sdk/models/operations/getdevicedetailsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## modifyDevice + +Enable or disable a device by its id + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.devices.modifyDevice({ + deviceId: 879135, + enabled: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { devicesModifyDevice } from "@lukehagar/plexjs/funcs/devicesModifyDevice.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await devicesModifyDevice(plexAPI, { + deviceId: 879135, + enabled: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("devicesModifyDevice failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ModifyDeviceRequest](../../sdk/models/operations/modifydevicerequest.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. | + +### Response + +**Promise\<[operations.ModifyDeviceResponse](../../sdk/models/operations/modifydeviceresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## setChannelmap + +Set a device's channel mapping + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.devices.setChannelmap({ + deviceId: 937661, + channelMapping: {}, + channelMappingByKey: {}, + channelsEnabled: [ + "4", + "6", + ".", + "1", + ",", + "4", + "4", + ".", + "1", + ",", + "4", + "5", + ".", + "1", + ], + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { devicesSetChannelmap } from "@lukehagar/plexjs/funcs/devicesSetChannelmap.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await devicesSetChannelmap(plexAPI, { + deviceId: 937661, + channelMapping: {}, + channelMappingByKey: {}, + channelsEnabled: [ + "4", + "6", + ".", + "1", + ",", + "4", + "4", + ".", + "1", + ",", + "4", + "5", + ".", + "1", + ], + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("devicesSetChannelmap failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SetChannelmapRequest](../../sdk/models/operations/setchannelmaprequest.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. | + +### Response + +**Promise\<[operations.SetChannelmapResponse](../../sdk/models/operations/setchannelmapresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getDevicesChannels + +Get a device's channels by its id + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.devices.getDevicesChannels({ + deviceId: 517209, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { devicesGetDevicesChannels } from "@lukehagar/plexjs/funcs/devicesGetDevicesChannels.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await devicesGetDevicesChannels(plexAPI, { + deviceId: 517209, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("devicesGetDevicesChannels failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetDevicesChannelsRequest](../../sdk/models/operations/getdeviceschannelsrequest.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. | + +### Response + +**Promise\<[operations.GetDevicesChannelsResponse](../../sdk/models/operations/getdeviceschannelsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## setDevicePreferences + +Set device preferences by its id + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.devices.setDevicePreferences({ + deviceId: 420973, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { devicesSetDevicePreferences } from "@lukehagar/plexjs/funcs/devicesSetDevicePreferences.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await devicesSetDevicePreferences(plexAPI, { + deviceId: 420973, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("devicesSetDevicePreferences failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SetDevicePreferencesRequest](../../sdk/models/operations/setdevicepreferencesrequest.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. | + +### Response + +**Promise\<[operations.SetDevicePreferencesResponse](../../sdk/models/operations/setdevicepreferencesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## stopScan + +Tell a device to stop scanning for channels + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.devices.stopScan({ + deviceId: 576494, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { devicesStopScan } from "@lukehagar/plexjs/funcs/devicesStopScan.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await devicesStopScan(plexAPI, { + deviceId: 576494, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("devicesStopScan failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.StopScanRequest](../../sdk/models/operations/stopscanrequest.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. | + +### Response + +**Promise\<[operations.StopScanResponse](../../sdk/models/operations/stopscanresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## scan + +Tell a device to scan for channels + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.devices.scan({ + deviceId: 57391, + source: "Cable", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { devicesScan } from "@lukehagar/plexjs/funcs/devicesScan.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await devicesScan(plexAPI, { + deviceId: 57391, + source: "Cable", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("devicesScan failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ScanRequest](../../sdk/models/operations/scanrequest.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. | + +### Response + +**Promise\<[operations.ScanResponse](../../sdk/models/operations/scanresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getThumb + +Get a device's thumb for display to the user + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.devices.getThumb({ + deviceId: 960617, + version: 1025, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { devicesGetThumb } from "@lukehagar/plexjs/funcs/devicesGetThumb.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await devicesGetThumb(plexAPI, { + deviceId: 960617, + version: 1025, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("devicesGetThumb failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetThumbRequest](../../sdk/models/operations/getthumbrequest.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. | + +### Response + +**Promise\<[operations.GetThumbResponse](../../sdk/models/operations/getthumbresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/downloadqueue/README.md b/docs/sdks/downloadqueue/README.md new file mode 100644 index 00000000..4647d595 --- /dev/null +++ b/docs/sdks/downloadqueue/README.md @@ -0,0 +1,928 @@ +# DownloadQueue +(*downloadQueue*) + +## Overview + +API Operations against the Download Queue + +### Available Operations + +* [createDownloadQueue](#createdownloadqueue) - Create download queue +* [getDownloadQueue](#getdownloadqueue) - Get a download queue +* [addDownloadQueueItems](#adddownloadqueueitems) - Add to download queue +* [listDownloadQueueItems](#listdownloadqueueitems) - Get download queue items +* [getItemDecision](#getitemdecision) - Grab download queue item decision +* [getDownloadQueueMedia](#getdownloadqueuemedia) - Grab download queue media +* [removeDownloadQueueItems](#removedownloadqueueitems) - Delete download queue items +* [getDownloadQueueItems](#getdownloadqueueitems) - Get download queue items +* [restartProcessingDownloadQueueItems](#restartprocessingdownloadqueueitems) - Restart processing of items from the decision + +## createDownloadQueue + +Available: 0.2.0 + +Creates a download queue for this client if one doesn't exist, or returns the existing queue for this client and user. + + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI(); + +async function run() { + const result = await plexAPI.downloadQueue.createDownloadQueue(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { downloadQueueCreateDownloadQueue } from "@lukehagar/plexjs/funcs/downloadQueueCreateDownloadQueue.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore(); + +async function run() { + const res = await downloadQueueCreateDownloadQueue(plexAPI); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("downloadQueueCreateDownloadQueue failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| 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. | + +### Response + +**Promise\<[operations.CreateDownloadQueueResponse](../../sdk/models/operations/createdownloadqueueresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getDownloadQueue + +Available: 0.2.0 + +Get a download queue by its id + + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.downloadQueue.getDownloadQueue({ + queueId: 922802, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { downloadQueueGetDownloadQueue } from "@lukehagar/plexjs/funcs/downloadQueueGetDownloadQueue.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await downloadQueueGetDownloadQueue(plexAPI, { + queueId: 922802, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("downloadQueueGetDownloadQueue failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetDownloadQueueRequest](../../sdk/models/operations/getdownloadqueuerequest.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. | + +### Response + +**Promise\<[operations.GetDownloadQueueResponse](../../sdk/models/operations/getdownloadqueueresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## addDownloadQueueItems + +Available: 0.2.0 + +Add items to the download queue + + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { AdvancedSubtitles, BoolInt, LocationParameter, Protocol } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.downloadQueue.addDownloadQueueItems({ + queueId: 984925, + keys: [ + "/library/metadata/3", + "/library/metadata/6", + ], + advancedSubtitles: AdvancedSubtitles.Burn, + audioBoost: 50, + audioChannelCount: 5, + autoAdjustQuality: BoolInt.One, + autoAdjustSubtitle: BoolInt.One, + directPlay: BoolInt.One, + directStream: BoolInt.One, + directStreamAudio: BoolInt.One, + disableResolutionRotation: BoolInt.One, + hasMDE: BoolInt.One, + location: LocationParameter.Wan, + mediaBufferSize: 102400, + mediaIndex: 0, + musicBitrate: 5000, + offset: 90.5, + partIndex: 0, + path: "/library/metadata/151671", + peakBitrate: 12000, + photoResolution: "1080x1080", + protocol: Protocol.Dash, + secondsPerSegment: 5, + subtitleSize: 50, + videoBitrate: 12000, + videoQuality: 50, + videoResolution: "1080x1080", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { downloadQueueAddDownloadQueueItems } from "@lukehagar/plexjs/funcs/downloadQueueAddDownloadQueueItems.js"; +import { AdvancedSubtitles, BoolInt, LocationParameter, Protocol } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await downloadQueueAddDownloadQueueItems(plexAPI, { + queueId: 984925, + keys: [ + "/library/metadata/3", + "/library/metadata/6", + ], + advancedSubtitles: AdvancedSubtitles.Burn, + audioBoost: 50, + audioChannelCount: 5, + autoAdjustQuality: BoolInt.One, + autoAdjustSubtitle: BoolInt.One, + directPlay: BoolInt.One, + directStream: BoolInt.One, + directStreamAudio: BoolInt.One, + disableResolutionRotation: BoolInt.One, + hasMDE: BoolInt.One, + location: LocationParameter.Wan, + mediaBufferSize: 102400, + mediaIndex: 0, + musicBitrate: 5000, + offset: 90.5, + partIndex: 0, + path: "/library/metadata/151671", + peakBitrate: 12000, + photoResolution: "1080x1080", + protocol: Protocol.Dash, + secondsPerSegment: 5, + subtitleSize: 50, + videoBitrate: 12000, + videoQuality: 50, + videoResolution: "1080x1080", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("downloadQueueAddDownloadQueueItems failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AddDownloadQueueItemsRequest](../../sdk/models/operations/adddownloadqueueitemsrequest.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. | + +### Response + +**Promise\<[operations.AddDownloadQueueItemsResponse](../../sdk/models/operations/adddownloadqueueitemsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listDownloadQueueItems + +Available: 0.2.0 + +Get items from a download queue + + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.downloadQueue.listDownloadQueueItems({ + queueId: 524138, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { downloadQueueListDownloadQueueItems } from "@lukehagar/plexjs/funcs/downloadQueueListDownloadQueueItems.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await downloadQueueListDownloadQueueItems(plexAPI, { + queueId: 524138, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("downloadQueueListDownloadQueueItems failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListDownloadQueueItemsRequest](../../sdk/models/operations/listdownloadqueueitemsrequest.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. | + +### Response + +**Promise\<[operations.ListDownloadQueueItemsResponse](../../sdk/models/operations/listdownloadqueueitemsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getItemDecision + +Available: 0.2.0 + +Grab the decision for a download queue item + + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.downloadQueue.getItemDecision({ + queueId: 231605, + itemId: 32, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { downloadQueueGetItemDecision } from "@lukehagar/plexjs/funcs/downloadQueueGetItemDecision.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await downloadQueueGetItemDecision(plexAPI, { + queueId: 231605, + itemId: 32, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("downloadQueueGetItemDecision failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetItemDecisionRequest](../../sdk/models/operations/getitemdecisionrequest.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. | + +### Response + +**Promise\<[operations.GetItemDecisionResponse](../../sdk/models/operations/getitemdecisionresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getDownloadQueueMedia + +Available: 0.2.0 + +Grab the media for a download queue item + + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.downloadQueue.getDownloadQueueMedia({ + queueId: 663184, + itemId: 32, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { downloadQueueGetDownloadQueueMedia } from "@lukehagar/plexjs/funcs/downloadQueueGetDownloadQueueMedia.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await downloadQueueGetDownloadQueueMedia(plexAPI, { + queueId: 663184, + itemId: 32, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("downloadQueueGetDownloadQueueMedia failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetDownloadQueueMediaRequest](../../sdk/models/operations/getdownloadqueuemediarequest.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. | + +### Response + +**Promise\<[operations.GetDownloadQueueMediaResponse](../../sdk/models/operations/getdownloadqueuemediaresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## removeDownloadQueueItems + +delete items from a download queue + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.downloadQueue.removeDownloadQueueItems({ + queueId: 946275, + itemId: [ + 32, + 345, + 23, + ], + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { downloadQueueRemoveDownloadQueueItems } from "@lukehagar/plexjs/funcs/downloadQueueRemoveDownloadQueueItems.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await downloadQueueRemoveDownloadQueueItems(plexAPI, { + queueId: 946275, + itemId: [ + 32, + 345, + 23, + ], + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("downloadQueueRemoveDownloadQueueItems failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RemoveDownloadQueueItemsRequest](../../sdk/models/operations/removedownloadqueueitemsrequest.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. | + +### Response + +**Promise\<[operations.RemoveDownloadQueueItemsResponse](../../sdk/models/operations/removedownloadqueueitemsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getDownloadQueueItems + +Available: 0.2.0 + +Get items from a download queue + + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.downloadQueue.getDownloadQueueItems({ + queueId: 809886, + itemId: [ + 32, + 345, + 23, + ], + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { downloadQueueGetDownloadQueueItems } from "@lukehagar/plexjs/funcs/downloadQueueGetDownloadQueueItems.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await downloadQueueGetDownloadQueueItems(plexAPI, { + queueId: 809886, + itemId: [ + 32, + 345, + 23, + ], + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("downloadQueueGetDownloadQueueItems failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetDownloadQueueItemsRequest](../../sdk/models/operations/getdownloadqueueitemsrequest.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. | + +### Response + +**Promise\<[operations.GetDownloadQueueItemsResponse](../../sdk/models/operations/getdownloadqueueitemsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## restartProcessingDownloadQueueItems + +Available: 0.2.0 + +Reprocess download queue items with previous decision parameters + + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.downloadQueue.restartProcessingDownloadQueueItems({ + queueId: 713001, + itemId: [ + 32, + 345, + 23, + ], + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { downloadQueueRestartProcessingDownloadQueueItems } from "@lukehagar/plexjs/funcs/downloadQueueRestartProcessingDownloadQueueItems.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await downloadQueueRestartProcessingDownloadQueueItems(plexAPI, { + queueId: 713001, + itemId: [ + 32, + 345, + 23, + ], + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("downloadQueueRestartProcessingDownloadQueueItems failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RestartProcessingDownloadQueueItemsRequest](../../sdk/models/operations/restartprocessingdownloadqueueitemsrequest.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. | + +### Response + +**Promise\<[operations.RestartProcessingDownloadQueueItemsResponse](../../sdk/models/operations/restartprocessingdownloadqueueitemsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/dvrs/README.md b/docs/sdks/dvrs/README.md new file mode 100644 index 00000000..19f47b4e --- /dev/null +++ b/docs/sdks/dvrs/README.md @@ -0,0 +1,1209 @@ +# DVRs +(*dvRs*) + +## Overview + +The DVR provides means to watch and record live TV. This section of endpoints describes how to setup the DVR itself + + +### Available Operations + +* [listDVRs](#listdvrs) - Get DVRs +* [createDVR](#createdvr) - Create a DVR +* [deleteDVR](#deletedvr) - Delete a single DVR +* [getDVR](#getdvr) - Get a single DVR +* [deleteLineup](#deletelineup) - Delete a DVR Lineup +* [addLineup](#addlineup) - Add a DVR Lineup +* [setDVRPreferences](#setdvrpreferences) - Set DVR preferences +* [stopDVRReload](#stopdvrreload) - Tell a DVR to stop reloading program guide +* [reloadGuide](#reloadguide) - Tell a DVR to reload program guide +* [tuneChannel](#tunechannel) - Tune a channel on a DVR +* [removeDeviceFromDVR](#removedevicefromdvr) - Remove a device from an existing DVR +* [addDeviceToDVR](#adddevicetodvr) - Add a device to an existing DVR + +## listDVRs + +Get the list of all available DVRs + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI(); + +async function run() { + const result = await plexAPI.dvRs.listDVRs(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { dvRsListDVRs } from "@lukehagar/plexjs/funcs/dvRsListDVRs.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore(); + +async function run() { + const res = await dvRsListDVRs(plexAPI); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dvRsListDVRs failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| 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. | + +### Response + +**Promise\<[operations.ListDVRsResponse](../../sdk/models/operations/listdvrsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## createDVR + +Creation of a DVR, after creation of a devcie and a lineup is selected + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.dvRs.createDVR({ + lineup: "lineup://tv.plex.providers.epg.onconnect/USA-HI51418-DEFAULT", + device: [ + "d", + "e", + "v", + "i", + "c", + "e", + "[", + "]", + "=", + "d", + "e", + "v", + "i", + "c", + "e", + ":", + "/", + "/", + "t", + "v", + ".", + "p", + "l", + "e", + "x", + ".", + "g", + "r", + "a", + "b", + "b", + "e", + "r", + "s", + ".", + "h", + "d", + "h", + "o", + "m", + "e", + "r", + "u", + "n", + "/", + "1", + "0", + "5", + "3", + "C", + "0", + "C", + "A", + ], + language: "eng", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { dvRsCreateDVR } from "@lukehagar/plexjs/funcs/dvRsCreateDVR.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await dvRsCreateDVR(plexAPI, { + lineup: "lineup://tv.plex.providers.epg.onconnect/USA-HI51418-DEFAULT", + device: [ + "d", + "e", + "v", + "i", + "c", + "e", + "[", + "]", + "=", + "d", + "e", + "v", + "i", + "c", + "e", + ":", + "/", + "/", + "t", + "v", + ".", + "p", + "l", + "e", + "x", + ".", + "g", + "r", + "a", + "b", + "b", + "e", + "r", + "s", + ".", + "h", + "d", + "h", + "o", + "m", + "e", + "r", + "u", + "n", + "/", + "1", + "0", + "5", + "3", + "C", + "0", + "C", + "A", + ], + language: "eng", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dvRsCreateDVR failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateDVRRequest](../../sdk/models/operations/createdvrrequest.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. | + +### Response + +**Promise\<[operations.CreateDVRResponse](../../sdk/models/operations/createdvrresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deleteDVR + +Delete a single DVR by its id (key) + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.dvRs.deleteDVR({ + dvrId: 855088, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { dvRsDeleteDVR } from "@lukehagar/plexjs/funcs/dvRsDeleteDVR.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await dvRsDeleteDVR(plexAPI, { + dvrId: 855088, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dvRsDeleteDVR failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteDVRRequest](../../sdk/models/operations/deletedvrrequest.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. | + +### Response + +**Promise\<[operations.DeleteDVRResponse](../../sdk/models/operations/deletedvrresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getDVR + +Get a single DVR by its id (key) + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.dvRs.getDVR({ + dvrId: 973518, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { dvRsGetDVR } from "@lukehagar/plexjs/funcs/dvRsGetDVR.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await dvRsGetDVR(plexAPI, { + dvrId: 973518, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dvRsGetDVR failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetDVRRequest](../../sdk/models/operations/getdvrrequest.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. | + +### Response + +**Promise\<[operations.GetDVRResponse](../../sdk/models/operations/getdvrresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deleteLineup + +Deletes a DVR device's lineup. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.dvRs.deleteLineup({ + dvrId: 454470, + lineup: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { dvRsDeleteLineup } from "@lukehagar/plexjs/funcs/dvRsDeleteLineup.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await dvRsDeleteLineup(plexAPI, { + dvrId: 454470, + lineup: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dvRsDeleteLineup failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteLineupRequest](../../sdk/models/operations/deletelineuprequest.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. | + +### Response + +**Promise\<[operations.DeleteLineupResponse](../../sdk/models/operations/deletelineupresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## addLineup + +Add a lineup to a DVR device's set of lineups. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.dvRs.addLineup({ + dvrId: 945235, + lineup: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { dvRsAddLineup } from "@lukehagar/plexjs/funcs/dvRsAddLineup.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await dvRsAddLineup(plexAPI, { + dvrId: 945235, + lineup: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dvRsAddLineup failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AddLineupRequest](../../sdk/models/operations/addlineuprequest.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. | + +### Response + +**Promise\<[operations.AddLineupResponse](../../sdk/models/operations/addlineupresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## setDVRPreferences + +Set DVR preferences by name avd value + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.dvRs.setDVRPreferences({ + dvrId: 116357, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { dvRsSetDVRPreferences } from "@lukehagar/plexjs/funcs/dvRsSetDVRPreferences.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await dvRsSetDVRPreferences(plexAPI, { + dvrId: 116357, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dvRsSetDVRPreferences failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SetDVRPreferencesRequest](../../sdk/models/operations/setdvrpreferencesrequest.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. | + +### Response + +**Promise\<[operations.SetDVRPreferencesResponse](../../sdk/models/operations/setdvrpreferencesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## stopDVRReload + +Tell a DVR to stop reloading program guide + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.dvRs.stopDVRReload({ + dvrId: 348053, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { dvRsStopDVRReload } from "@lukehagar/plexjs/funcs/dvRsStopDVRReload.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await dvRsStopDVRReload(plexAPI, { + dvrId: 348053, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dvRsStopDVRReload failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.StopDVRReloadRequest](../../sdk/models/operations/stopdvrreloadrequest.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. | + +### Response + +**Promise\<[operations.StopDVRReloadResponse](../../sdk/models/operations/stopdvrreloadresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## reloadGuide + +Tell a DVR to reload program guide + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.dvRs.reloadGuide({ + dvrId: 140753, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { dvRsReloadGuide } from "@lukehagar/plexjs/funcs/dvRsReloadGuide.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await dvRsReloadGuide(plexAPI, { + dvrId: 140753, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dvRsReloadGuide failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ReloadGuideRequest](../../sdk/models/operations/reloadguiderequest.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. | + +### Response + +**Promise\<[operations.ReloadGuideResponse](../../sdk/models/operations/reloadguideresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## tuneChannel + +Tune a channel on a DVR to the provided channel + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.dvRs.tuneChannel({ + dvrId: 834281, + channel: "2.1", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { dvRsTuneChannel } from "@lukehagar/plexjs/funcs/dvRsTuneChannel.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await dvRsTuneChannel(plexAPI, { + dvrId: 834281, + channel: "2.1", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dvRsTuneChannel failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.TuneChannelRequest](../../sdk/models/operations/tunechannelrequest.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. | + +### Response + +**Promise\<[operations.TuneChannelResponse](../../sdk/models/operations/tunechannelresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## removeDeviceFromDVR + +Remove a device from an existing DVR + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.dvRs.removeDeviceFromDVR({ + dvrId: 945416, + deviceId: 260761, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { dvRsRemoveDeviceFromDVR } from "@lukehagar/plexjs/funcs/dvRsRemoveDeviceFromDVR.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await dvRsRemoveDeviceFromDVR(plexAPI, { + dvrId: 945416, + deviceId: 260761, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dvRsRemoveDeviceFromDVR failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RemoveDeviceFromDVRRequest](../../sdk/models/operations/removedevicefromdvrrequest.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. | + +### Response + +**Promise\<[operations.RemoveDeviceFromDVRResponse](../../sdk/models/operations/removedevicefromdvrresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## addDeviceToDVR + +Add a device to an existing DVR + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.dvRs.addDeviceToDVR({ + dvrId: 334755, + deviceId: 852930, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { dvRsAddDeviceToDVR } from "@lukehagar/plexjs/funcs/dvRsAddDeviceToDVR.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await dvRsAddDeviceToDVR(plexAPI, { + dvrId: 334755, + deviceId: 852930, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dvRsAddDeviceToDVR failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AddDeviceToDVRRequest](../../sdk/models/operations/adddevicetodvrrequest.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. | + +### Response + +**Promise\<[operations.AddDeviceToDVRResponse](../../sdk/models/operations/adddevicetodvrresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/epg/README.md b/docs/sdks/epg/README.md new file mode 100644 index 00000000..2b91791a --- /dev/null +++ b/docs/sdks/epg/README.md @@ -0,0 +1,802 @@ +# Epg +(*epg*) + +## Overview + +The EPG (Electronic Program Guide) is responsible for obtaining metadata for what is airing on each channel and when + + +### Available Operations + +* [computeChannelMap](#computechannelmap) - Compute the best channel map +* [getChannels](#getchannels) - Get channels for a lineup +* [getCountries](#getcountries) - Get all countries +* [getAllLanguages](#getalllanguages) - Get all languages +* [getLineup](#getlineup) - Compute the best lineup +* [getLineupChannels](#getlineupchannels) - Get the channels for mulitple lineups +* [getCountriesLineups](#getcountrieslineups) - Get lineups for a country via postal code +* [getCountryRegions](#getcountryregions) - Get regions for a country +* [listLineups](#listlineups) - Get lineups for a region + +## computeChannelMap + +Compute the best channel map, given device and lineup + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.epg.computeChannelMap({ + device: "Mobile", + lineup: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { epgComputeChannelMap } from "@lukehagar/plexjs/funcs/epgComputeChannelMap.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await epgComputeChannelMap(plexAPI, { + device: "Mobile", + lineup: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("epgComputeChannelMap failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ComputeChannelMapRequest](../../sdk/models/operations/computechannelmaprequest.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. | + +### Response + +**Promise\<[operations.ComputeChannelMapResponse](../../sdk/models/operations/computechannelmapresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getChannels + +Get channels for a lineup within an EPG provider + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.epg.getChannels({ + lineup: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { epgGetChannels } from "@lukehagar/plexjs/funcs/epgGetChannels.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await epgGetChannels(plexAPI, { + lineup: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("epgGetChannels failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetChannelsRequest](../../sdk/models/operations/getchannelsrequest.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. | + +### Response + +**Promise\<[operations.GetChannelsResponse](../../sdk/models/operations/getchannelsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getCountries + +This endpoint returns a list of countries which EPG data is available for. There are three flavors, as specfied by the `flavor` attribute + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI(); + +async function run() { + const result = await plexAPI.epg.getCountries(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { epgGetCountries } from "@lukehagar/plexjs/funcs/epgGetCountries.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore(); + +async function run() { + const res = await epgGetCountries(plexAPI); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("epgGetCountries failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| 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. | + +### Response + +**Promise\<[operations.GetCountriesResponse](../../sdk/models/operations/getcountriesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getAllLanguages + +Returns a list of all possible languages for EPG data. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI(); + +async function run() { + const result = await plexAPI.epg.getAllLanguages(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { epgGetAllLanguages } from "@lukehagar/plexjs/funcs/epgGetAllLanguages.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore(); + +async function run() { + const res = await epgGetAllLanguages(plexAPI); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("epgGetAllLanguages failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| 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. | + +### Response + +**Promise\<[operations.GetAllLanguagesResponse](../../sdk/models/operations/getalllanguagesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getLineup + +Compute the best lineup, given lineup group and device + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.epg.getLineup({ + device: "Desktop", + lineupGroup: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { epgGetLineup } from "@lukehagar/plexjs/funcs/epgGetLineup.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await epgGetLineup(plexAPI, { + device: "Desktop", + lineupGroup: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("epgGetLineup failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetLineupRequest](../../sdk/models/operations/getlineuprequest.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. | + +### Response + +**Promise\<[operations.GetLineupResponse](../../sdk/models/operations/getlineupresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getLineupChannels + +Get the channels across multiple lineups + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.epg.getLineupChannels({ + lineup: [ + "", + "", + ], + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { epgGetLineupChannels } from "@lukehagar/plexjs/funcs/epgGetLineupChannels.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await epgGetLineupChannels(plexAPI, { + lineup: [ + "", + "", + ], + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("epgGetLineupChannels failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetLineupChannelsRequest](../../sdk/models/operations/getlineupchannelsrequest.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. | + +### Response + +**Promise\<[operations.GetLineupChannelsResponse](../../sdk/models/operations/getlineupchannelsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getCountriesLineups + +Returns a list of lineups for a given country, EPG provider and postal code + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.epg.getCountriesLineups({ + country: "Malawi", + epgId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { epgGetCountriesLineups } from "@lukehagar/plexjs/funcs/epgGetCountriesLineups.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await epgGetCountriesLineups(plexAPI, { + country: "Malawi", + epgId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("epgGetCountriesLineups failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCountriesLineupsRequest](../../sdk/models/operations/getcountrieslineupsrequest.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. | + +### Response + +**Promise\<[operations.GetCountriesLineupsResponse](../../sdk/models/operations/getcountrieslineupsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getCountryRegions + +Get regions for a country within an EPG provider + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.epg.getCountryRegions({ + country: "Morocco", + epgId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { epgGetCountryRegions } from "@lukehagar/plexjs/funcs/epgGetCountryRegions.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await epgGetCountryRegions(plexAPI, { + country: "Morocco", + epgId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("epgGetCountryRegions failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCountryRegionsRequest](../../sdk/models/operations/getcountryregionsrequest.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. | + +### Response + +**Promise\<[operations.GetCountryRegionsResponse](../../sdk/models/operations/getcountryregionsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listLineups + +Get lineups for a region within an EPG provider + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.epg.listLineups({ + country: "Vanuatu", + epgId: "", + region: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { epgListLineups } from "@lukehagar/plexjs/funcs/epgListLineups.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await epgListLineups(plexAPI, { + country: "Vanuatu", + epgId: "", + region: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("epgListLineups failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListLineupsRequest](../../sdk/models/operations/listlineupsrequest.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. | + +### Response + +**Promise\<[operations.ListLineupsResponse](../../sdk/models/operations/listlineupsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/events/README.md b/docs/sdks/events/README.md new file mode 100644 index 00000000..45f49c43 --- /dev/null +++ b/docs/sdks/events/README.md @@ -0,0 +1,188 @@ +# Events +(*events*) + +## Overview + +The server can notify clients in real-time of a wide range of events, from library scanning, to preferences being modified, to changes to media, and many other things. This is also the mechanism by which activity progress is reported. + +Two protocols for receiving the events are available: EventSource (also known as SSE), and WebSocket. + + +### Available Operations + +* [getNotifications](#getnotifications) - Connect to Eventsource +* [connectWebSocket](#connectwebsocket) - Connect to WebSocket + +## getNotifications + +Connect to the event source to get a stream of events + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.events.getNotifications({}); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { eventsGetNotifications } from "@lukehagar/plexjs/funcs/eventsGetNotifications.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await eventsGetNotifications(plexAPI, {}); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("eventsGetNotifications failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetNotificationsRequest](../../sdk/models/operations/getnotificationsrequest.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. | + +### Response + +**Promise\<[operations.GetNotificationsResponse](../../sdk/models/operations/getnotificationsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## connectWebSocket + +Connect to the web socket to get a stream of events + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.events.connectWebSocket({}); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { eventsConnectWebSocket } from "@lukehagar/plexjs/funcs/eventsConnectWebSocket.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await eventsConnectWebSocket(plexAPI, {}); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("eventsConnectWebSocket failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ConnectWebSocketRequest](../../sdk/models/operations/connectwebsocketrequest.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. | + +### Response + +**Promise\<[operations.ConnectWebSocketResponse](../../sdk/models/operations/connectwebsocketresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/general/README.md b/docs/sdks/general/README.md new file mode 100644 index 00000000..fcec5e38 --- /dev/null +++ b/docs/sdks/general/README.md @@ -0,0 +1,355 @@ +# General +(*general*) + +## Overview + +General endpoints for basic PMS operation not specific to any media provider + +### Available Operations + +* [getServerInfo](#getserverinfo) - Get PMS info +* [getIdentity](#getidentity) - Get PMS identity +* [getSourceConnectionInformation](#getsourceconnectioninformation) - Get Source Connection Information +* [getTransientToken](#gettransienttoken) - Get Transient Tokens + +## getServerInfo + +Information about this PMS setup and configuration + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.general.getServerInfo({}); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { generalGetServerInfo } from "@lukehagar/plexjs/funcs/generalGetServerInfo.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await generalGetServerInfo(plexAPI, {}); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("generalGetServerInfo failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetServerInfoRequest](../../sdk/models/operations/getserverinforequest.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. | + +### Response + +**Promise\<[operations.GetServerInfoResponse](../../sdk/models/operations/getserverinforesponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getIdentity + +Get details about this PMS's identity + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI(); + +async function run() { + const result = await plexAPI.general.getIdentity(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { generalGetIdentity } from "@lukehagar/plexjs/funcs/generalGetIdentity.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore(); + +async function run() { + const res = await generalGetIdentity(plexAPI); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("generalGetIdentity failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| 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. | + +### Response + +**Promise\<[operations.GetIdentityResponse](../../sdk/models/operations/getidentityresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getSourceConnectionInformation + +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. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.general.getSourceConnectionInformation({ + source: "server://client-identifier", + refresh: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { generalGetSourceConnectionInformation } from "@lukehagar/plexjs/funcs/generalGetSourceConnectionInformation.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await generalGetSourceConnectionInformation(plexAPI, { + source: "server://client-identifier", + refresh: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("generalGetSourceConnectionInformation failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetSourceConnectionInformationRequest](../../sdk/models/operations/getsourceconnectioninformationrequest.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. | + +### Response + +**Promise\<[operations.GetSourceConnectionInformationResponse](../../sdk/models/operations/getsourceconnectioninformationresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getTransientToken + +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. +Note: This endpoint responds to all HTTP verbs but POST in preferred + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { GetTransientTokenScope, GetTransientTokenType } from "@lukehagar/plexjs/sdk/models/operations"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.general.getTransientToken({ + type: GetTransientTokenType.Delegation, + scope: GetTransientTokenScope.All, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { generalGetTransientToken } from "@lukehagar/plexjs/funcs/generalGetTransientToken.js"; +import { GetTransientTokenScope, GetTransientTokenType } from "@lukehagar/plexjs/sdk/models/operations"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await generalGetTransientToken(plexAPI, { + type: GetTransientTokenType.Delegation, + scope: GetTransientTokenScope.All, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("generalGetTransientToken failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetTransientTokenRequest](../../sdk/models/operations/gettransienttokenrequest.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. | + +### Response + +**Promise\<[operations.GetTransientTokenResponse](../../sdk/models/operations/gettransienttokenresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/hubs/README.md b/docs/sdks/hubs/README.md index 1183f7cb..75fc8011 100644 --- a/docs/sdks/hubs/README.md +++ b/docs/sdks/hubs/README.md @@ -3,109 +3,52 @@ ## Overview -Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows. - +The hubs within a media provider ### Available Operations -* [getGlobalHubs](#getglobalhubs) - Get Global Hubs -* [getRecentlyAdded](#getrecentlyadded) - Get Recently Added -* [getLibraryHubs](#getlibraryhubs) - Get library specific hubs +* [getAllHubs](#getallhubs) - Get global hubs +* [getContinueWatching](#getcontinuewatching) - Get the continue watching hub +* [getHubItems](#gethubitems) - Get a hub's items +* [getPromotedHubs](#getpromotedhubs) - Get the hubs which are promoted +* [getMetadataHubs](#getmetadatahubs) - Get hubs for section by metadata item +* [getPostplayHubs](#getpostplayhubs) - Get postplay hubs +* [getRelatedHubs](#getrelatedhubs) - Get related hubs +* [getSectionHubs](#getsectionhubs) - Get section hubs +* [resetSectionDefaults](#resetsectiondefaults) - Reset hubs to defaults +* [listHubs](#listhubs) - Get hubs +* [createCustomHub](#createcustomhub) - Create a custom hub +* [moveHub](#movehub) - Move Hub +* [deleteCustomHub](#deletecustomhub) - Delete a custom hub +* [updateHubVisibility](#updatehubvisibility) - Change hub visibility -## getGlobalHubs +## getAllHubs -Get Global Hubs filtered by the parameters provided. +Get the global hubs in this PMS ### Example Usage - + ```typescript import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.hubs.getGlobalHubs(); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { hubsGetGlobalHubs } from "@lukehagar/plexjs/funcs/hubsGetGlobalHubs.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await hubsGetGlobalHubs(plexAPI); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("hubsGetGlobalHubs failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `count` | *number* | :heavy_minus_sign: | The number of items to return with each hub. | -| `onlyTransient` | [operations.OnlyTransient](../../sdk/models/operations/onlytransient.md) | :heavy_minus_sign: | 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). | -| `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. | - -### Response - -**Promise\<[operations.GetGlobalHubsResponse](../../sdk/models/operations/getglobalhubsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------------- | -------------------------------- | -------------------------------- | -| errors.GetGlobalHubsBadRequest | 400 | application/json | -| errors.GetGlobalHubsUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getRecentlyAdded - -This endpoint will return the recently added content. - - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; -import { IncludeMeta, Type } from "@lukehagar/plexjs/sdk/models/operations"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.hubs.getRecentlyAdded({ - contentDirectoryID: 39486, - sectionID: 2, - type: Type.TvShow, - includeMeta: IncludeMeta.Enable, + const result = await plexAPI.hubs.getAllHubs({ + onlyTransient: BoolInt.One, }); console.log(result); @@ -120,27 +63,33 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { hubsGetRecentlyAdded } from "@lukehagar/plexjs/funcs/hubsGetRecentlyAdded.js"; -import { IncludeMeta, Type } from "@lukehagar/plexjs/sdk/models/operations"; +import { hubsGetAllHubs } from "@lukehagar/plexjs/funcs/hubsGetAllHubs.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. const plexAPI = new PlexAPICore({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const res = await hubsGetRecentlyAdded(plexAPI, { - contentDirectoryID: 39486, - sectionID: 2, - type: Type.TvShow, - includeMeta: IncludeMeta.Enable, + const res = await hubsGetAllHubs(plexAPI, { + onlyTransient: BoolInt.One, }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("hubsGetRecentlyAdded failed:", res.error); + console.log("hubsGetAllHubs failed:", res.error); } } @@ -151,14 +100,14 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetRecentlyAddedRequest](../../sdk/models/operations/getrecentlyaddedrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetAllHubsRequest](../../sdk/models/operations/getallhubsrequest.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. | ### Response -**Promise\<[operations.GetRecentlyAddedResponse](../../sdk/models/operations/getrecentlyaddedresponse.md)\>** +**Promise\<[operations.GetAllHubsResponse](../../sdk/models/operations/getallhubsresponse.md)\>** ### Errors @@ -166,23 +115,31 @@ run(); | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* | -## getLibraryHubs - -This endpoint will return a list of library specific hubs +## getContinueWatching +Get the global continue watching hub ### Example Usage - + ```typescript import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.hubs.getLibraryHubs(492.74); + const result = await plexAPI.hubs.getContinueWatching({}); console.log(result); } @@ -196,21 +153,30 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { hubsGetLibraryHubs } from "@lukehagar/plexjs/funcs/hubsGetLibraryHubs.js"; +import { hubsGetContinueWatching } from "@lukehagar/plexjs/funcs/hubsGetContinueWatching.js"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. const plexAPI = new PlexAPICore({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const res = await hubsGetLibraryHubs(plexAPI, 492.74); + const res = await hubsGetContinueWatching(plexAPI, {}); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("hubsGetLibraryHubs failed:", res.error); + console.log("hubsGetContinueWatching failed:", res.error); } } @@ -221,21 +187,1153 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `sectionId` | *number* | :heavy_check_mark: | the Id of the library to query | -| `count` | *number* | :heavy_minus_sign: | The number of items to return with each hub. | -| `onlyTransient` | [operations.QueryParamOnlyTransient](../../sdk/models/operations/queryparamonlytransient.md) | :heavy_minus_sign: | 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). | +| `request` | [operations.GetContinueWatchingRequest](../../sdk/models/operations/getcontinuewatchingrequest.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. | ### Response -**Promise\<[operations.GetLibraryHubsResponse](../../sdk/models/operations/getlibraryhubsresponse.md)\>** +**Promise\<[operations.GetContinueWatchingResponse](../../sdk/models/operations/getcontinuewatchingresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.GetLibraryHubsBadRequest | 400 | application/json | -| errors.GetLibraryHubsUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getHubItems + +Get the items within a single hub specified by identifier + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.hubs.getHubItems({ + identifier: [ + "", + "", + "", + ], + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { hubsGetHubItems } from "@lukehagar/plexjs/funcs/hubsGetHubItems.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await hubsGetHubItems(plexAPI, { + identifier: [ + "", + "", + "", + ], + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("hubsGetHubItems failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetHubItemsRequest](../../sdk/models/operations/gethubitemsrequest.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. | + +### Response + +**Promise\<[operations.GetHubItemsResponse](../../sdk/models/operations/gethubitemsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getPromotedHubs + +Get the global hubs which are promoted (should be displayed on the home screen) + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.hubs.getPromotedHubs({}); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { hubsGetPromotedHubs } from "@lukehagar/plexjs/funcs/hubsGetPromotedHubs.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await hubsGetPromotedHubs(plexAPI, {}); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("hubsGetPromotedHubs failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPromotedHubsRequest](../../sdk/models/operations/getpromotedhubsrequest.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. | + +### Response + +**Promise\<[operations.GetPromotedHubsResponse](../../sdk/models/operations/getpromotedhubsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getMetadataHubs + +Get the hubs for a section by metadata item. Currently only for music sections + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.hubs.getMetadataHubs({ + metadataId: 605482, + onlyTransient: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { hubsGetMetadataHubs } from "@lukehagar/plexjs/funcs/hubsGetMetadataHubs.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await hubsGetMetadataHubs(plexAPI, { + metadataId: 605482, + onlyTransient: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("hubsGetMetadataHubs failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetMetadataHubsRequest](../../sdk/models/operations/getmetadatahubsrequest.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. | + +### Response + +**Promise\<[operations.GetMetadataHubsResponse](../../sdk/models/operations/getmetadatahubsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getPostplayHubs + +Get the hubs for a metadata to be displayed in post play + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.hubs.getPostplayHubs({ + metadataId: 441419, + onlyTransient: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { hubsGetPostplayHubs } from "@lukehagar/plexjs/funcs/hubsGetPostplayHubs.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await hubsGetPostplayHubs(plexAPI, { + metadataId: 441419, + onlyTransient: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("hubsGetPostplayHubs failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPostplayHubsRequest](../../sdk/models/operations/getpostplayhubsrequest.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. | + +### Response + +**Promise\<[operations.GetPostplayHubsResponse](../../sdk/models/operations/getpostplayhubsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getRelatedHubs + +Get the hubs for a metadata related to the provided metadata item + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.hubs.getRelatedHubs({ + metadataId: 8858, + onlyTransient: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { hubsGetRelatedHubs } from "@lukehagar/plexjs/funcs/hubsGetRelatedHubs.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await hubsGetRelatedHubs(plexAPI, { + metadataId: 8858, + onlyTransient: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("hubsGetRelatedHubs failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetRelatedHubsRequest](../../sdk/models/operations/getrelatedhubsrequest.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. | + +### Response + +**Promise\<[operations.GetRelatedHubsResponse](../../sdk/models/operations/getrelatedhubsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getSectionHubs + +Get the hubs for a single section + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.hubs.getSectionHubs({ + sectionId: 336924, + onlyTransient: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { hubsGetSectionHubs } from "@lukehagar/plexjs/funcs/hubsGetSectionHubs.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await hubsGetSectionHubs(plexAPI, { + sectionId: 336924, + onlyTransient: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("hubsGetSectionHubs failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetSectionHubsRequest](../../sdk/models/operations/getsectionhubsrequest.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. | + +### Response + +**Promise\<[operations.GetSectionHubsResponse](../../sdk/models/operations/getsectionhubsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## resetSectionDefaults + +Reset hubs for this section to defaults and delete custom hubs + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.hubs.resetSectionDefaults({ + sectionId: 383022, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { hubsResetSectionDefaults } from "@lukehagar/plexjs/funcs/hubsResetSectionDefaults.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await hubsResetSectionDefaults(plexAPI, { + sectionId: 383022, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("hubsResetSectionDefaults failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ResetSectionDefaultsRequest](../../sdk/models/operations/resetsectiondefaultsrequest.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. | + +### Response + +**Promise\<[operations.ResetSectionDefaultsResponse](../../sdk/models/operations/resetsectiondefaultsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listHubs + +Get the list of hubs including both built-in and custom + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.hubs.listHubs({ + sectionId: 442546, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { hubsListHubs } from "@lukehagar/plexjs/funcs/hubsListHubs.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await hubsListHubs(plexAPI, { + sectionId: 442546, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("hubsListHubs failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListHubsRequest](../../sdk/models/operations/listhubsrequest.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. | + +### Response + +**Promise\<[operations.ListHubsResponse](../../sdk/models/operations/listhubsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## createCustomHub + +Create a custom hub based on a metadata item + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.hubs.createCustomHub({ + sectionId: 869922, + metadataItemId: 703843, + promotedToRecommended: BoolInt.One, + promotedToOwnHome: BoolInt.One, + promotedToSharedHome: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { hubsCreateCustomHub } from "@lukehagar/plexjs/funcs/hubsCreateCustomHub.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await hubsCreateCustomHub(plexAPI, { + sectionId: 869922, + metadataItemId: 703843, + promotedToRecommended: BoolInt.One, + promotedToOwnHome: BoolInt.One, + promotedToSharedHome: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("hubsCreateCustomHub failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateCustomHubRequest](../../sdk/models/operations/createcustomhubrequest.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. | + +### Response + +**Promise\<[operations.CreateCustomHubResponse](../../sdk/models/operations/createcustomhubresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## moveHub + +Changed the ordering of a hub among others hubs + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.hubs.moveHub({ + sectionId: 755710, + identifier: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { hubsMoveHub } from "@lukehagar/plexjs/funcs/hubsMoveHub.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await hubsMoveHub(plexAPI, { + sectionId: 755710, + identifier: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("hubsMoveHub failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MoveHubRequest](../../sdk/models/operations/movehubrequest.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. | + +### Response + +**Promise\<[operations.MoveHubResponse](../../sdk/models/operations/movehubresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deleteCustomHub + +Delete a custom hub from the server + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.hubs.deleteCustomHub({ + sectionId: 625677, + identifier: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { hubsDeleteCustomHub } from "@lukehagar/plexjs/funcs/hubsDeleteCustomHub.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await hubsDeleteCustomHub(plexAPI, { + sectionId: 625677, + identifier: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("hubsDeleteCustomHub failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteCustomHubRequest](../../sdk/models/operations/deletecustomhubrequest.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. | + +### Response + +**Promise\<[operations.DeleteCustomHubResponse](../../sdk/models/operations/deletecustomhubresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## updateHubVisibility + +Changed the visibility of a hub for both the admin and shared users + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.hubs.updateHubVisibility({ + sectionId: 341650, + identifier: "", + promotedToRecommended: BoolInt.One, + promotedToOwnHome: BoolInt.One, + promotedToSharedHome: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { hubsUpdateHubVisibility } from "@lukehagar/plexjs/funcs/hubsUpdateHubVisibility.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await hubsUpdateHubVisibility(plexAPI, { + sectionId: 341650, + identifier: "", + promotedToRecommended: BoolInt.One, + promotedToOwnHome: BoolInt.One, + promotedToSharedHome: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("hubsUpdateHubVisibility failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateHubVisibilityRequest](../../sdk/models/operations/updatehubvisibilityrequest.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. | + +### Response + +**Promise\<[operations.UpdateHubVisibilityResponse](../../sdk/models/operations/updatehubvisibilityresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/library/README.md b/docs/sdks/library/README.md index d109991a..52c3bdfb 100644 --- a/docs/sdks/library/README.md +++ b/docs/sdks/library/README.md @@ -3,523 +3,115 @@ ## Overview -API Calls interacting with Plex Media Server Libraries - +Library endpoints which are outside of the Media Provider API. Typically this is manipulation of the library (adding/removing sections, modifying preferences, etc). ### Available Operations -* [getFileHash](#getfilehash) - Get Hash Value -* [getRecentlyAddedLibrary](#getrecentlyaddedlibrary) - Get Recently Added -* [getAllLibraries](#getalllibraries) - Get All Libraries -* [getLibraryDetails](#getlibrarydetails) - Get Library Details -* [deleteLibrary](#deletelibrary) - Delete Library Section -* [getLibraryItems](#getlibraryitems) - Get Library Items -* [getLibrarySectionsAll](#getlibrarysectionsall) - Get Library section media by tag ALL -* [getRefreshLibraryMetadata](#getrefreshlibrarymetadata) - Refresh Metadata Of The Library -* [getSearchLibrary](#getsearchlibrary) - Search Library -* [getGenresLibrary](#getgenreslibrary) - Get Genres of library media -* [getCountriesLibrary](#getcountrieslibrary) - Get Countries of library media -* [getActorsLibrary](#getactorslibrary) - Get Actors of library media -* [getSearchAllLibraries](#getsearchalllibraries) - Search All Libraries -* [getMediaMetaData](#getmediametadata) - Get Media Metadata -* [getMediaArts](#getmediaarts) - Get Media Background Artwork -* [postMediaArts](#postmediaarts) - Upload Media Background Artwork -* [getMediaPosters](#getmediaposters) - Get Media Posters -* [postMediaPoster](#postmediaposter) - Upload Media Poster -* [getMetadataChildren](#getmetadatachildren) - Get Items Children -* [getTopWatchedContent](#gettopwatchedcontent) - Get Top Watched Content - -## getFileHash - -This resource returns hash values for local files - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.library.getFileHash("file://C:\\Image.png&type=13"); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { libraryGetFileHash } from "@lukehagar/plexjs/funcs/libraryGetFileHash.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await libraryGetFileHash(plexAPI, "file://C:\\Image.png&type=13"); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("libraryGetFileHash failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `url` | *string* | :heavy_check_mark: | This is the path to the local file, must be prefixed by `file://` | [object Object] | -| `type` | *number* | :heavy_minus_sign: | Item type | | -| `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. | | - -### Response - -**Promise\<[operations.GetFileHashResponse](../../sdk/models/operations/getfilehashresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------ | ------------------------------ | ------------------------------ | -| errors.GetFileHashBadRequest | 400 | application/json | -| errors.GetFileHashUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getRecentlyAddedLibrary - -This endpoint will return the recently added content. - - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; -import { QueryParamIncludeMeta, QueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.library.getRecentlyAddedLibrary({ - contentDirectoryID: 2, - pinnedContentDirectoryID: [ - 3, - 5, - 7, - 13, - 12, - 1, - 6, - 14, - 2, - 10, - 16, - 17, - ], - sectionID: 2, - type: QueryParamType.TvShow, - includeMeta: QueryParamIncludeMeta.Enable, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { libraryGetRecentlyAddedLibrary } from "@lukehagar/plexjs/funcs/libraryGetRecentlyAddedLibrary.js"; -import { QueryParamIncludeMeta, QueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await libraryGetRecentlyAddedLibrary(plexAPI, { - contentDirectoryID: 2, - pinnedContentDirectoryID: [ - 3, - 5, - 7, - 13, - 12, - 1, - 6, - 14, - 2, - 10, - 16, - 17, - ], - sectionID: 2, - type: QueryParamType.TvShow, - includeMeta: QueryParamIncludeMeta.Enable, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("libraryGetRecentlyAddedLibrary failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetRecentlyAddedLibraryRequest](../../sdk/models/operations/getrecentlyaddedlibraryrequest.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. | - -### Response - -**Promise\<[operations.GetRecentlyAddedLibraryResponse](../../sdk/models/operations/getrecentlyaddedlibraryresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| errors.GetRecentlyAddedLibraryBadRequest | 400 | application/json | -| errors.GetRecentlyAddedLibraryUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getAllLibraries - -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). - - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.library.getAllLibraries(); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { libraryGetAllLibraries } from "@lukehagar/plexjs/funcs/libraryGetAllLibraries.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await libraryGetAllLibraries(plexAPI); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("libraryGetAllLibraries failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| 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. | - -### Response - -**Promise\<[operations.GetAllLibrariesResponse](../../sdk/models/operations/getalllibrariesresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.GetAllLibrariesBadRequest | 400 | application/json | -| errors.GetAllLibrariesUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getLibraryDetails - -## 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. - - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.library.getLibraryDetails(9518); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { libraryGetLibraryDetails } from "@lukehagar/plexjs/funcs/libraryGetLibraryDetails.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await libraryGetLibraryDetails(plexAPI, 9518); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("libraryGetLibraryDetails failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| [object Object] | -| `includeDetails` | [operations.IncludeDetails](../../sdk/models/operations/includedetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts).
Only exists for backwards compatibility, media providers other than the server libraries have it on always.
| | -| `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. | | - -### Response - -**Promise\<[operations.GetLibraryDetailsResponse](../../sdk/models/operations/getlibrarydetailsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | -| errors.GetLibraryDetailsBadRequest | 400 | application/json | -| errors.GetLibraryDetailsUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## deleteLibrary - -Delete a library using a specific section id - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.library.deleteLibrary(9518); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { libraryDeleteLibrary } from "@lukehagar/plexjs/funcs/libraryDeleteLibrary.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await libraryDeleteLibrary(plexAPI, 9518); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("libraryDeleteLibrary failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| [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. | | - -### Response - -**Promise\<[operations.DeleteLibraryResponse](../../sdk/models/operations/deletelibraryresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------------- | -------------------------------- | -------------------------------- | -| errors.DeleteLibraryBadRequest | 400 | application/json | -| errors.DeleteLibraryUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +* [getLibraryItems](#getlibraryitems) - Get all items in library +* [deleteCaches](#deletecaches) - Delete library caches +* [cleanBundles](#cleanbundles) - Clean bundles +* [ingestTransientItem](#ingesttransientitem) - Ingest a transient item +* [getLibraryMatches](#getlibrarymatches) - Get library matches +* [optimizeDatabase](#optimizedatabase) - Optimize the Database +* [getRandomArtwork](#getrandomartwork) - Get random artwork +* [getSections](#getsections) - Get library sections (main Media Provider Only) +* [addSection](#addsection) - Add a library section +* [stopAllRefreshes](#stopallrefreshes) - Stop refresh +* [getSectionsPrefs](#getsectionsprefs) - Get section prefs +* [refreshSectionsMetadata](#refreshsectionsmetadata) - Refresh all sections +* [getTags](#gettags) - Get all library tags of a type +* [deleteMetadataItem](#deletemetadataitem) - Delete a metadata item +* [editMetadataItem](#editmetadataitem) - Edit a metadata item +* [detectAds](#detectads) - Ad-detect an item +* [getAllItemLeaves](#getallitemleaves) - Get the leaves of an item +* [analyzeMetadata](#analyzemetadata) - Analyze an item +* [generateThumbs](#generatethumbs) - Generate thumbs of chapters for an item +* [detectCredits](#detectcredits) - Credit detect a metadata item +* [getExtras](#getextras) - Get an item's extras +* [addExtras](#addextras) - Add to an item's extras +* [getFile](#getfile) - Get a file from a metadata or media bundle +* [startBifGeneration](#startbifgeneration) - Start BIF generation of an item +* [detectIntros](#detectintros) - Intro detect an item +* [createMarker](#createmarker) - Create a marker +* [matchItem](#matchitem) - Match a metadata item +* [listMatches](#listmatches) - Get metadata matches for an item +* [mergeItems](#mergeitems) - Merge a metadata item +* [listSonicallySimilar](#listsonicallysimilar) - Get nearest tracks to metadata item +* [setItemPreferences](#setitempreferences) - Set metadata preferences +* [refreshItemsMetadata](#refreshitemsmetadata) - Refresh a metadata item +* [getRelatedItems](#getrelateditems) - Get related items +* [listSimilar](#listsimilar) - Get similar items +* [splitItem](#splititem) - Split a metadata item +* [addSubtitles](#addsubtitles) - Add subtitles +* [getItemTree](#getitemtree) - Get metadata items as a tree +* [unmatch](#unmatch) - Unmatch a metadata item +* [listTopUsers](#listtopusers) - Get metadata top users +* [detectVoiceActivity](#detectvoiceactivity) - Detect voice activity +* [getAugmentationStatus](#getaugmentationstatus) - Get augmentation status +* [setStreamSelection](#setstreamselection) - Set stream selection +* [getPerson](#getperson) - Get person details +* [listPersonMedia](#listpersonmedia) - Get media for a person +* [deleteLibrarySection](#deletelibrarysection) - Delete a library section +* [getLibraryDetails](#getlibrarydetails) - Get a library section by id +* [editSection](#editsection) - Edit a library section +* [updateItems](#updateitems) - Set the fields of the filtered items +* [startAnalysis](#startanalysis) - Analyze a section +* [autocomplete](#autocomplete) - Get autocompletions for search +* [getCollections](#getcollections) - Get collections in a section +* [getCommon](#getcommon) - Get common fields for items +* [emptyTrash](#emptytrash) - Empty section trash +* [getSectionFilters](#getsectionfilters) - Get section filters +* [getFirstCharacters](#getfirstcharacters) - Get list of first characters +* [deleteIndexes](#deleteindexes) - Delete section indexes +* [deleteIntros](#deleteintros) - Delete section intro markers +* [getSectionPreferences](#getsectionpreferences) - Get section prefs +* [setSectionPreferences](#setsectionpreferences) - Set section prefs +* [cancelRefresh](#cancelrefresh) - Cancel section refresh +* [refreshSection](#refreshsection) - Refresh section +* [getAvailableSorts](#getavailablesorts) - Get a section sorts +* [getStreamLevels](#getstreamlevels) - Get loudness about a stream in json +* [getStreamLoudness](#getstreamloudness) - Get loudness about a stream +* [getChapterImage](#getchapterimage) - Get a chapter image +* [setItemArtwork](#setitemartwork) - Set an item's artwork, theme, etc +* [updateItemArtwork](#updateitemartwork) - Set an item's artwork, theme, etc +* [deleteMarker](#deletemarker) - Delete a marker +* [editMarker](#editmarker) - Edit a marker +* [deleteMediaItem](#deletemediaitem) - Delete a media item +* [getPartIndex](#getpartindex) - Get BIF index for a part +* [deleteCollection](#deletecollection) - Delete a collection +* [getSectionImage](#getsectionimage) - Get a section composite image +* [deleteStream](#deletestream) - Delete a stream +* [getStream](#getstream) - Get a stream +* [setStreamOffset](#setstreamoffset) - Set a stream offset +* [getItemArtwork](#getitemartwork) - Get an item's artwork, theme, etc +* [getMediaPart](#getmediapart) - Get a media part +* [getImageFromBif](#getimagefrombif) - Get an image from part BIF ## getLibraryItems -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. -- `albums`: Items categorized by album. - +Request all metadata items according to a query. ### Example Usage - + ```typescript import { PlexAPI } from "@lukehagar/plexjs"; -import { - GetLibraryItemsQueryParamIncludeMeta, - GetLibraryItemsQueryParamType, - IncludeGuids, - Tag, -} from "@lukehagar/plexjs/sdk/models/operations"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.library.getLibraryItems({ - tag: Tag.Newest, - includeGuids: IncludeGuids.Enable, - type: GetLibraryItemsQueryParamType.TvShow, - sectionKey: 9518, - includeMeta: GetLibraryItemsQueryParamIncludeMeta.Enable, - }); + const result = await plexAPI.library.getLibraryItems({}); console.log(result); } @@ -534,27 +126,24 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; import { libraryGetLibraryItems } from "@lukehagar/plexjs/funcs/libraryGetLibraryItems.js"; -import { - GetLibraryItemsQueryParamIncludeMeta, - GetLibraryItemsQueryParamType, - IncludeGuids, - Tag, -} from "@lukehagar/plexjs/sdk/models/operations"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. const plexAPI = new PlexAPICore({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const res = await libraryGetLibraryItems(plexAPI, { - tag: Tag.Newest, - includeGuids: IncludeGuids.Enable, - type: GetLibraryItemsQueryParamType.TvShow, - sectionKey: 9518, - includeMeta: GetLibraryItemsQueryParamIncludeMeta.Enable, - }); + const res = await libraryGetLibraryItems(plexAPI, {}); if (res.ok) { const { value: result } = res; console.log(result); @@ -581,45 +170,24 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.GetLibraryItemsBadRequest | 400 | application/json | -| errors.GetLibraryItemsUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | -## getLibrarySectionsAll - -Retrieves a list of all general media data for this library. +## deleteCaches +Delete the hub caches so they are recomputed on next request ### Example Usage - + ```typescript import { PlexAPI } from "@lukehagar/plexjs"; -import { - GetLibrarySectionsAllQueryParamIncludeMeta, - GetLibrarySectionsAllQueryParamType, - IncludeAdvanced, - QueryParamIncludeCollections, - QueryParamIncludeExternalMedia, - QueryParamIncludeGuids, -} from "@lukehagar/plexjs/sdk/models/operations"; -const plexAPI = new PlexAPI({ - accessToken: "", -}); +const plexAPI = new PlexAPI(); async function run() { - const result = await plexAPI.library.getLibrarySectionsAll({ - sectionKey: 9518, - type: GetLibrarySectionsAllQueryParamType.TvShow, - includeMeta: GetLibrarySectionsAllQueryParamIncludeMeta.Enable, - includeGuids: QueryParamIncludeGuids.Enable, - includeAdvanced: IncludeAdvanced.Enable, - includeCollections: QueryParamIncludeCollections.Enable, - includeExternalMedia: QueryParamIncludeExternalMedia.Enable, - }); + const result = await plexAPI.library.deleteCaches(); console.log(result); } @@ -633,37 +201,19 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { libraryGetLibrarySectionsAll } from "@lukehagar/plexjs/funcs/libraryGetLibrarySectionsAll.js"; -import { - GetLibrarySectionsAllQueryParamIncludeMeta, - GetLibrarySectionsAllQueryParamType, - IncludeAdvanced, - QueryParamIncludeCollections, - QueryParamIncludeExternalMedia, - QueryParamIncludeGuids, -} from "@lukehagar/plexjs/sdk/models/operations"; +import { libraryDeleteCaches } from "@lukehagar/plexjs/funcs/libraryDeleteCaches.js"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); +const plexAPI = new PlexAPICore(); async function run() { - const res = await libraryGetLibrarySectionsAll(plexAPI, { - sectionKey: 9518, - type: GetLibrarySectionsAllQueryParamType.TvShow, - includeMeta: GetLibrarySectionsAllQueryParamIncludeMeta.Enable, - includeGuids: QueryParamIncludeGuids.Enable, - includeAdvanced: IncludeAdvanced.Enable, - includeCollections: QueryParamIncludeCollections.Enable, - includeExternalMedia: QueryParamIncludeExternalMedia.Enable, - }); + const res = await libraryDeleteCaches(plexAPI); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("libraryGetLibrarySectionsAll failed:", res.error); + console.log("libraryDeleteCaches failed:", res.error); } } @@ -674,41 +224,34 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetLibrarySectionsAllRequest](../../sdk/models/operations/getlibrarysectionsallrequest.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. | ### Response -**Promise\<[operations.GetLibrarySectionsAllResponse](../../sdk/models/operations/getlibrarysectionsallresponse.md)\>** +**Promise\<[operations.DeleteCachesResponse](../../sdk/models/operations/deletecachesresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| errors.GetLibrarySectionsAllBadRequest | 400 | application/json | -| errors.GetLibrarySectionsAllUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | -## getRefreshLibraryMetadata - -This endpoint Refreshes all the Metadata of the library. +## cleanBundles +Clean out any now unused bundles. Bundles can become unused when media is deleted ### Example Usage - + ```typescript import { PlexAPI } from "@lukehagar/plexjs"; -import { Force } from "@lukehagar/plexjs/sdk/models/operations"; -const plexAPI = new PlexAPI({ - accessToken: "", -}); +const plexAPI = new PlexAPI(); async function run() { - const result = await plexAPI.library.getRefreshLibraryMetadata(9518, Force.Zero); + const result = await plexAPI.library.cleanBundles(); console.log(result); } @@ -722,22 +265,19 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { libraryGetRefreshLibraryMetadata } from "@lukehagar/plexjs/funcs/libraryGetRefreshLibraryMetadata.js"; -import { Force } from "@lukehagar/plexjs/sdk/models/operations"; +import { libraryCleanBundles } from "@lukehagar/plexjs/funcs/libraryCleanBundles.js"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); +const plexAPI = new PlexAPICore(); async function run() { - const res = await libraryGetRefreshLibraryMetadata(plexAPI, 9518, Force.Zero); + const res = await libraryCleanBundles(plexAPI); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("libraryGetRefreshLibraryMetadata failed:", res.error); + console.log("libraryCleanBundles failed:", res.error); } } @@ -746,61 +286,54 @@ run(); ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| [object Object] | -| `force` | [operations.Force](../../sdk/models/operations/force.md) | :heavy_minus_sign: | Force the refresh even if the library is already being refreshed. | [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. | | +| 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. | ### Response -**Promise\<[operations.GetRefreshLibraryMetadataResponse](../../sdk/models/operations/getrefreshlibrarymetadataresponse.md)\>** +**Promise\<[operations.CleanBundlesResponse](../../sdk/models/operations/cleanbundlesresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| errors.GetRefreshLibraryMetadataBadRequest | 400 | application/json | -| errors.GetRefreshLibraryMetadataUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | -## getSearchLibrary - -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. +## ingestTransientItem +This endpoint takes a file path specified in the `url` parameter, matches it using the scanner's match mechanism, downloads rich metadata, and then ingests the item as a transient item (without a library section). In the case where the file represents an episode, the entire tree (show, season, and episode) is added as transient items. At this time, movies and episodes are the only supported types, which are gleaned automatically from the file path. +Note that any of the parameters passed to the metadata details endpoint (e.g. `includeExtras=1`) work here. ### Example Usage - + ```typescript import { PlexAPI } from "@lukehagar/plexjs"; -import { GetSearchLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.library.getSearchLibrary(9518, GetSearchLibraryQueryParamType.TvShow); + const result = await plexAPI.library.ingestTransientItem({ + url: "file:///storage%2Femulated%2F0%2FArcher-S01E01.mkv", + virtualFilePath: "/Avatar.mkv", + computeHashes: BoolInt.One, + ingestNonMatches: BoolInt.One, + }); console.log(result); } @@ -814,22 +347,36 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { libraryGetSearchLibrary } from "@lukehagar/plexjs/funcs/libraryGetSearchLibrary.js"; -import { GetSearchLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; +import { libraryIngestTransientItem } from "@lukehagar/plexjs/funcs/libraryIngestTransientItem.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. const plexAPI = new PlexAPICore({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const res = await libraryGetSearchLibrary(plexAPI, 9518, GetSearchLibraryQueryParamType.TvShow); + const res = await libraryIngestTransientItem(plexAPI, { + url: "file:///storage%2Femulated%2F0%2FArcher-S01E01.mkv", + virtualFilePath: "/Avatar.mkv", + computeHashes: BoolInt.One, + ingestNonMatches: BoolInt.One, + }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("libraryGetSearchLibrary failed:", res.error); + console.log("libraryIngestTransientItem failed:", res.error); } } @@ -838,44 +385,57 @@ run(); ### Parameters -| Parameter | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| [object Object] | -| `type` | [operations.GetSearchLibraryQueryParamType](../../sdk/models/operations/getsearchlibraryqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
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
| [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. | | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.IngestTransientItemRequest](../../sdk/models/operations/ingesttransientitemrequest.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. | ### Response -**Promise\<[operations.GetSearchLibraryResponse](../../sdk/models/operations/getsearchlibraryresponse.md)\>** +**Promise\<[operations.IngestTransientItemResponse](../../sdk/models/operations/ingesttransientitemresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | -| errors.GetSearchLibraryBadRequest | 400 | application/json | -| errors.GetSearchLibraryUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | -## getGenresLibrary - -Retrieves a list of all the genres that are found for the media in this library. +## getLibraryMatches +The matches endpoint is used to match content external to the library with content inside the library. This is done by passing a series of semantic "hints" about the content (its type, name, or release year). Each type (e.g. movie) has a canonical set of minimal required hints. +This ability to match content is useful in a variety of scenarios. For example, in the DVR, the EPG uses the endpoint to match recording rules against airing content. And in the cloud, the UMP uses the endpoint to match up a piece of media with rich metadata. +The endpoint response can including multiple matches, if there is ambiguity, each one containing a `score` from 0 to 100. For somewhat historical reasons, anything over 85 is considered a positive match (we prefer false negatives over false positives in general for matching). +The `guid` hint is somewhat special, in that it generally represents a unique identity for a piece of media (e.g. the IMDB `ttXXX`) identifier, in contrast with other hints which can be much more ambiguous (e.g. a title of `Jane Eyre`, which could refer to the 1943 or the 2011 version). +Episodes require either a season/episode pair, or an air date (or both). Either the path must be sent, or the show title ### Example Usage - + ```typescript import { PlexAPI } from "@lukehagar/plexjs"; -import { GetGenresLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.library.getGenresLibrary(9518, GetGenresLibraryQueryParamType.TvShow); + const result = await plexAPI.library.getLibraryMatches({ + includeFullMetadata: BoolInt.One, + includeAncestorMetadata: BoolInt.One, + includeAlternateMetadataSources: BoolInt.One, + }); console.log(result); } @@ -889,22 +449,35 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { libraryGetGenresLibrary } from "@lukehagar/plexjs/funcs/libraryGetGenresLibrary.js"; -import { GetGenresLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; +import { libraryGetLibraryMatches } from "@lukehagar/plexjs/funcs/libraryGetLibraryMatches.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. const plexAPI = new PlexAPICore({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const res = await libraryGetGenresLibrary(plexAPI, 9518, GetGenresLibraryQueryParamType.TvShow); + const res = await libraryGetLibraryMatches(plexAPI, { + includeFullMetadata: BoolInt.One, + includeAncestorMetadata: BoolInt.One, + includeAlternateMetadataSources: BoolInt.One, + }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("libraryGetGenresLibrary failed:", res.error); + console.log("libraryGetLibraryMatches failed:", res.error); } } @@ -913,44 +486,51 @@ run(); ### Parameters -| Parameter | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| [object Object] | -| `type` | [operations.GetGenresLibraryQueryParamType](../../sdk/models/operations/getgenreslibraryqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
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
| [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. | | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetLibraryMatchesRequest](../../sdk/models/operations/getlibrarymatchesrequest.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. | ### Response -**Promise\<[operations.GetGenresLibraryResponse](../../sdk/models/operations/getgenreslibraryresponse.md)\>** +**Promise\<[operations.GetLibraryMatchesResponse](../../sdk/models/operations/getlibrarymatchesresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | -| errors.GetGenresLibraryBadRequest | 400 | application/json | -| errors.GetGenresLibraryUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | -## getCountriesLibrary - -Retrieves a list of all the countries that are found for the media in this library. +## optimizeDatabase +Initiate optimize on the database. ### Example Usage - + ```typescript import { PlexAPI } from "@lukehagar/plexjs"; -import { GetCountriesLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.library.getCountriesLibrary(9518, GetCountriesLibraryQueryParamType.TvShow); + const result = await plexAPI.library.optimizeDatabase({ + async: BoolInt.One, + }); console.log(result); } @@ -964,22 +544,33 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { libraryGetCountriesLibrary } from "@lukehagar/plexjs/funcs/libraryGetCountriesLibrary.js"; -import { GetCountriesLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; +import { libraryOptimizeDatabase } from "@lukehagar/plexjs/funcs/libraryOptimizeDatabase.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. const plexAPI = new PlexAPICore({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const res = await libraryGetCountriesLibrary(plexAPI, 9518, GetCountriesLibraryQueryParamType.TvShow); + const res = await libraryOptimizeDatabase(plexAPI, { + async: BoolInt.One, + }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("libraryGetCountriesLibrary failed:", res.error); + console.log("libraryOptimizeDatabase failed:", res.error); } } @@ -988,130 +579,55 @@ run(); ### Parameters -| Parameter | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| [object Object] | -| `type` | [operations.GetCountriesLibraryQueryParamType](../../sdk/models/operations/getcountrieslibraryqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
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
| [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. | | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.OptimizeDatabaseRequest](../../sdk/models/operations/optimizedatabaserequest.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. | ### Response -**Promise\<[operations.GetCountriesLibraryResponse](../../sdk/models/operations/getcountrieslibraryresponse.md)\>** +**Promise\<[operations.OptimizeDatabaseResponse](../../sdk/models/operations/optimizedatabaseresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.GetCountriesLibraryBadRequest | 400 | application/json | -| errors.GetCountriesLibraryUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | -## getActorsLibrary +## getRandomArtwork -Retrieves a list of all the actors that are found for the media in this library. +Get random artwork across sections. This is commonly used for a screensaver. + +This retrieves 100 random artwork paths in the specified sections and returns them. Restrictions are put in place to not return artwork for items the user is not allowed to access. Artwork will be for Movies, Shows, and Artists only. ### Example Usage - + ```typescript import { PlexAPI } from "@lukehagar/plexjs"; -import { GetActorsLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.library.getActorsLibrary(9518, GetActorsLibraryQueryParamType.TvShow); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { libraryGetActorsLibrary } from "@lukehagar/plexjs/funcs/libraryGetActorsLibrary.js"; -import { GetActorsLibraryQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await libraryGetActorsLibrary(plexAPI, 9518, GetActorsLibraryQueryParamType.TvShow); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("libraryGetActorsLibrary failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sectionKey` | *number* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| [object Object] | -| `type` | [operations.GetActorsLibraryQueryParamType](../../sdk/models/operations/getactorslibraryqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
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
| [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. | | - -### Response - -**Promise\<[operations.GetActorsLibraryResponse](../../sdk/models/operations/getactorslibraryresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | -| errors.GetActorsLibraryBadRequest | 400 | application/json | -| errors.GetActorsLibraryUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getSearchAllLibraries - -Search the provided query across all library sections, or a single section, and return matches as hubs, split up by type. - - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; -import { - GetSearchAllLibrariesQueryParamIncludeCollections, - GetSearchAllLibrariesQueryParamIncludeExternalMedia, - SearchTypes, -} from "@lukehagar/plexjs/sdk/models/operations"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.library.getSearchAllLibraries({ - query: "", - clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", - searchTypes: [ - SearchTypes.People, + const result = await plexAPI.library.getRandomArtwork({ + sections: [ + 5, + 6, ], - includeCollections: GetSearchAllLibrariesQueryParamIncludeCollections.Enable, - includeExternalMedia: GetSearchAllLibrariesQueryParamIncludeExternalMedia.Enable, }); console.log(result); @@ -1126,34 +642,35 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { libraryGetSearchAllLibraries } from "@lukehagar/plexjs/funcs/libraryGetSearchAllLibraries.js"; -import { - GetSearchAllLibrariesQueryParamIncludeCollections, - GetSearchAllLibrariesQueryParamIncludeExternalMedia, - SearchTypes, -} from "@lukehagar/plexjs/sdk/models/operations"; +import { libraryGetRandomArtwork } from "@lukehagar/plexjs/funcs/libraryGetRandomArtwork.js"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. const plexAPI = new PlexAPICore({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const res = await libraryGetSearchAllLibraries(plexAPI, { - query: "", - clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", - searchTypes: [ - SearchTypes.People, + const res = await libraryGetRandomArtwork(plexAPI, { + sections: [ + 5, + 6, ], - includeCollections: GetSearchAllLibrariesQueryParamIncludeCollections.Enable, - includeExternalMedia: GetSearchAllLibrariesQueryParamIncludeExternalMedia.Enable, }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("libraryGetSearchAllLibraries failed:", res.error); + console.log("libraryGetRandomArtwork failed:", res.error); } } @@ -1164,55 +681,123 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetSearchAllLibrariesRequest](../../sdk/models/operations/getsearchalllibrariesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetRandomArtworkRequest](../../sdk/models/operations/getrandomartworkrequest.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. | ### Response -**Promise\<[operations.GetSearchAllLibrariesResponse](../../sdk/models/operations/getsearchalllibrariesresponse.md)\>** +**Promise\<[operations.GetRandomArtworkResponse](../../sdk/models/operations/getrandomartworkresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| errors.GetSearchAllLibrariesBadRequest | 400 | application/json | -| errors.GetSearchAllLibrariesUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | -## getMediaMetaData - -This endpoint will return all the (meta)data of one or more library items specified by the ratingKey. -Multiple rating keys can be provided as a comma-separated list (e.g., "21119,21617"). +## getSections +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). ### Example Usage - + ```typescript import { PlexAPI } from "@lukehagar/plexjs"; +const plexAPI = new PlexAPI(); + +async function run() { + const result = await plexAPI.library.getSections(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetSections } from "@lukehagar/plexjs/funcs/libraryGetSections.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore(); + +async function run() { + const res = await libraryGetSections(plexAPI); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetSections failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| 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. | + +### Response + +**Promise\<[operations.GetSectionsResponse](../../sdk/models/operations/getsectionsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## addSection + +Add a new library section to the server + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.library.getMediaMetaData({ - ratingKey: "21119,21617", - includeConcerts: true, - includeExtras: true, - includeOnDeck: true, - includePopularLeaves: true, - includePreferences: true, - includeReviews: true, - includeChapters: true, - includeStations: true, - includeExternalMedia: true, - asyncAugmentMetadata: true, - asyncCheckFiles: true, - asyncRefreshAnalysis: true, - asyncRefreshLocalMediaAgent: true, + const result = await plexAPI.library.addSection({ + name: "", + type: 39544, + agent: "", + language: "", + locations: [ + "O:\fatboy\\Media\\Ripped\\Music", + "O:\fatboy\\Media\\My Music", + ], + prefs: {}, + relative: BoolInt.One, + importFromiTunes: BoolInt.One, }); console.log(result); @@ -1227,36 +812,43 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { libraryGetMediaMetaData } from "@lukehagar/plexjs/funcs/libraryGetMediaMetaData.js"; +import { libraryAddSection } from "@lukehagar/plexjs/funcs/libraryAddSection.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. const plexAPI = new PlexAPICore({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const res = await libraryGetMediaMetaData(plexAPI, { - ratingKey: "21119,21617", - includeConcerts: true, - includeExtras: true, - includeOnDeck: true, - includePopularLeaves: true, - includePreferences: true, - includeReviews: true, - includeChapters: true, - includeStations: true, - includeExternalMedia: true, - asyncAugmentMetadata: true, - asyncCheckFiles: true, - asyncRefreshAnalysis: true, - asyncRefreshLocalMediaAgent: true, + const res = await libraryAddSection(plexAPI, { + name: "", + type: 39544, + agent: "", + language: "", + locations: [ + "O:\fatboy\\Media\\Ripped\\Music", + "O:\fatboy\\Media\\My Music", + ], + prefs: {}, + relative: BoolInt.One, + importFromiTunes: BoolInt.One, }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("libraryGetMediaMetaData failed:", res.error); + console.log("libraryAddSection failed:", res.error); } } @@ -1267,85 +859,14 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetMediaMetaDataRequest](../../sdk/models/operations/getmediametadatarequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.AddSectionRequest](../../sdk/models/operations/addsectionrequest.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. | ### Response -**Promise\<[operations.GetMediaMetaDataResponse](../../sdk/models/operations/getmediametadataresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | -| errors.GetMediaMetaDataBadRequest | 400 | application/json | -| errors.GetMediaMetaDataUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getMediaArts - -Returns the background artwork for a library item. - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.library.getMediaArts(16099); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { libraryGetMediaArts } from "@lukehagar/plexjs/funcs/libraryGetMediaArts.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await libraryGetMediaArts(plexAPI, 16099); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("libraryGetMediaArts failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the artwork of. | [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. | | - -### Response - -**Promise\<[operations.GetMediaArtsResponse](../../sdk/models/operations/getmediaartsresponse.md)\>** +**Promise\<[operations.AddSectionResponse](../../sdk/models/operations/addsectionresponse.md)\>** ### Errors @@ -1353,22 +874,20 @@ run(); | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* | -## postMediaArts +## stopAllRefreshes -Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL +Stop all refreshes across all sections ### Example Usage - + ```typescript import { PlexAPI } from "@lukehagar/plexjs"; -const plexAPI = new PlexAPI({ - accessToken: "", -}); +const plexAPI = new PlexAPI(); async function run() { - const result = await plexAPI.library.postMediaArts(2268, "https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b"); + const result = await plexAPI.library.stopAllRefreshes(); console.log(result); } @@ -1382,233 +901,19 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { libraryPostMediaArts } from "@lukehagar/plexjs/funcs/libraryPostMediaArts.js"; +import { libraryStopAllRefreshes } from "@lukehagar/plexjs/funcs/libraryStopAllRefreshes.js"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); +const plexAPI = new PlexAPICore(); async function run() { - const res = await libraryPostMediaArts(plexAPI, 2268, "https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b"); + const res = await libraryStopAllRefreshes(plexAPI); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("libraryPostMediaArts failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the posters of. | [object Object] | -| `url` | *string* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | [object Object] | -| `requestBody` | *ReadableStream* | :heavy_minus_sign: | The contents of the image, if uploading a local file | | -| `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. | | - -### Response - -**Promise\<[operations.PostMediaArtsResponse](../../sdk/models/operations/postmediaartsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getMediaPosters - -Returns the available posters for a library item. - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.library.getMediaPosters(16099); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { libraryGetMediaPosters } from "@lukehagar/plexjs/funcs/libraryGetMediaPosters.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await libraryGetMediaPosters(plexAPI, 16099); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("libraryGetMediaPosters failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the posters of. | [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. | | - -### Response - -**Promise\<[operations.GetMediaPostersResponse](../../sdk/models/operations/getmediapostersresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## postMediaPoster - -Uploads a poster to a library item, either from a local file or a remote URL - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.library.postMediaPoster(2268, "https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b"); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { libraryPostMediaPoster } from "@lukehagar/plexjs/funcs/libraryPostMediaPoster.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await libraryPostMediaPoster(plexAPI, 2268, "https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b"); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("libraryPostMediaPoster failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the posters of. | [object Object] | -| `url` | *string* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | [object Object] | -| `requestBody` | *ReadableStream* | :heavy_minus_sign: | The contents of the image, if uploading a local file | | -| `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. | | - -### Response - -**Promise\<[operations.PostMediaPosterResponse](../../sdk/models/operations/postmediaposterresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getMetadataChildren - -This endpoint will return the children of of a library item specified with the ratingKey. - - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.library.getMetadataChildren(2403.67, "Stream"); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { libraryGetMetadataChildren } from "@lukehagar/plexjs/funcs/libraryGetMetadataChildren.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await libraryGetMetadataChildren(plexAPI, 2403.67, "Stream"); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("libraryGetMetadataChildren failed:", res.error); + console.log("libraryStopAllRefreshes failed:", res.error); } } @@ -1619,42 +924,47 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `ratingKey` | *number* | :heavy_check_mark: | the id of the library item to return the children of. | -| `includeElements` | *string* | :heavy_minus_sign: | Adds additional elements to the response. Supported types are (Stream)
| | `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. | ### Response -**Promise\<[operations.GetMetadataChildrenResponse](../../sdk/models/operations/getmetadatachildrenresponse.md)\>** +**Promise\<[operations.StopAllRefreshesResponse](../../sdk/models/operations/stopallrefreshesresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.GetMetadataChildrenBadRequest | 400 | application/json | -| errors.GetMetadataChildrenUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | -## getTopWatchedContent - -This endpoint will return the top watched content from libraries of a certain type +## getSectionsPrefs +Get a section's preferences for a metadata type ### Example Usage - + ```typescript import { PlexAPI } from "@lukehagar/plexjs"; -import { GetTopWatchedContentQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.library.getTopWatchedContent(GetTopWatchedContentQueryParamType.TvShow); + const result = await plexAPI.library.getSectionsPrefs({ + type: 460221, + }); console.log(result); } @@ -1668,22 +978,32 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { libraryGetTopWatchedContent } from "@lukehagar/plexjs/funcs/libraryGetTopWatchedContent.js"; -import { GetTopWatchedContentQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; +import { libraryGetSectionsPrefs } from "@lukehagar/plexjs/funcs/libraryGetSectionsPrefs.js"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. const plexAPI = new PlexAPICore({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const res = await libraryGetTopWatchedContent(plexAPI, GetTopWatchedContentQueryParamType.TvShow); + const res = await libraryGetSectionsPrefs(plexAPI, { + type: 460221, + }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("libraryGetTopWatchedContent failed:", res.error); + console.log("libraryGetSectionsPrefs failed:", res.error); } } @@ -1692,22 +1012,6408 @@ run(); ### Parameters -| Parameter | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [operations.GetTopWatchedContentQueryParamType](../../sdk/models/operations/gettopwatchedcontentqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
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
| [object Object] | -| `includeGuids` | [operations.GetTopWatchedContentQueryParamIncludeGuids](../../sdk/models/operations/gettopwatchedcontentqueryparamincludeguids.md) | :heavy_minus_sign: | Adds the Guid object to the response
| [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. | | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetSectionsPrefsRequest](../../sdk/models/operations/getsectionsprefsrequest.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. | ### Response -**Promise\<[operations.GetTopWatchedContentResponse](../../sdk/models/operations/gettopwatchedcontentresponse.md)\>** +**Promise\<[operations.GetSectionsPrefsResponse](../../sdk/models/operations/getsectionsprefsresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | -| errors.GetTopWatchedContentBadRequest | 400 | application/json | -| errors.GetTopWatchedContentUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## refreshSectionsMetadata + +Tell PMS to refresh all section metadata + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.refreshSectionsMetadata({}); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryRefreshSectionsMetadata } from "@lukehagar/plexjs/funcs/libraryRefreshSectionsMetadata.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryRefreshSectionsMetadata(plexAPI, {}); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryRefreshSectionsMetadata failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RefreshSectionsMetadataRequest](../../sdk/models/operations/refreshsectionsmetadatarequest.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. | + +### Response + +**Promise\<[operations.RefreshSectionsMetadataResponse](../../sdk/models/operations/refreshsectionsmetadataresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getTags + +Get all library tags of a type + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getTags({}); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetTags } from "@lukehagar/plexjs/funcs/libraryGetTags.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetTags(plexAPI, {}); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetTags failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetTagsRequest](../../sdk/models/operations/gettagsrequest.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. | + +### Response + +**Promise\<[operations.GetTagsResponse](../../sdk/models/operations/gettagsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deleteMetadataItem + +Delete a single metadata item from the library, deleting media as well + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.deleteMetadataItem({ + ids: "", + proxy: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryDeleteMetadataItem } from "@lukehagar/plexjs/funcs/libraryDeleteMetadataItem.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryDeleteMetadataItem(plexAPI, { + ids: "", + proxy: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryDeleteMetadataItem failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteMetadataItemRequest](../../sdk/models/operations/deletemetadataitemrequest.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. | + +### Response + +**Promise\<[operations.DeleteMetadataItemResponse](../../sdk/models/operations/deletemetadataitemresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## editMetadataItem + +Edit metadata items setting fields + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.editMetadataItem({ + ids: [ + "", + "", + ], + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryEditMetadataItem } from "@lukehagar/plexjs/funcs/libraryEditMetadataItem.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryEditMetadataItem(plexAPI, { + ids: [ + "", + "", + ], + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryEditMetadataItem failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.EditMetadataItemRequest](../../sdk/models/operations/editmetadataitemrequest.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. | + +### Response + +**Promise\<[operations.EditMetadataItemResponse](../../sdk/models/operations/editmetadataitemresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## detectAds + +Start the detection of ads in a metadata item + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.detectAds({ + ids: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryDetectAds } from "@lukehagar/plexjs/funcs/libraryDetectAds.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryDetectAds(plexAPI, { + ids: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryDetectAds failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DetectAdsRequest](../../sdk/models/operations/detectadsrequest.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. | + +### Response + +**Promise\<[operations.DetectAdsResponse](../../sdk/models/operations/detectadsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getAllItemLeaves + +Get the leaves for a metadata item such as the episodes in a show + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getAllItemLeaves({ + ids: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetAllItemLeaves } from "@lukehagar/plexjs/funcs/libraryGetAllItemLeaves.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetAllItemLeaves(plexAPI, { + ids: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetAllItemLeaves failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAllItemLeavesRequest](../../sdk/models/operations/getallitemleavesrequest.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. | + +### Response + +**Promise\<[operations.GetAllItemLeavesResponse](../../sdk/models/operations/getallitemleavesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## analyzeMetadata + +Start the analysis of a metadata item + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.analyzeMetadata({ + ids: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryAnalyzeMetadata } from "@lukehagar/plexjs/funcs/libraryAnalyzeMetadata.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryAnalyzeMetadata(plexAPI, { + ids: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryAnalyzeMetadata failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AnalyzeMetadataRequest](../../sdk/models/operations/analyzemetadatarequest.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. | + +### Response + +**Promise\<[operations.AnalyzeMetadataResponse](../../sdk/models/operations/analyzemetadataresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## generateThumbs + +Start the chapter thumb generation for an item + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.generateThumbs({ + ids: "", + force: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGenerateThumbs } from "@lukehagar/plexjs/funcs/libraryGenerateThumbs.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGenerateThumbs(plexAPI, { + ids: "", + force: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGenerateThumbs failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GenerateThumbsRequest](../../sdk/models/operations/generatethumbsrequest.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. | + +### Response + +**Promise\<[operations.GenerateThumbsResponse](../../sdk/models/operations/generatethumbsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## detectCredits + +Start credit detection on a metadata item + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.detectCredits({ + ids: "", + force: BoolInt.One, + manual: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryDetectCredits } from "@lukehagar/plexjs/funcs/libraryDetectCredits.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryDetectCredits(plexAPI, { + ids: "", + force: BoolInt.One, + manual: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryDetectCredits failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DetectCreditsRequest](../../sdk/models/operations/detectcreditsrequest.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. | + +### Response + +**Promise\<[operations.DetectCreditsResponse](../../sdk/models/operations/detectcreditsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getExtras + +Get the extras for a metadata item + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getExtras({ + ids: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetExtras } from "@lukehagar/plexjs/funcs/libraryGetExtras.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetExtras(plexAPI, { + ids: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetExtras failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetExtrasRequest](../../sdk/models/operations/getextrasrequest.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. | + +### Response + +**Promise\<[operations.GetExtrasResponse](../../sdk/models/operations/getextrasresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## addExtras + +Add an extra to a metadata item + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.addExtras({ + ids: "", + url: "https://super-mortise.biz/", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryAddExtras } from "@lukehagar/plexjs/funcs/libraryAddExtras.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryAddExtras(plexAPI, { + ids: "", + url: "https://super-mortise.biz/", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryAddExtras failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AddExtrasRequest](../../sdk/models/operations/addextrasrequest.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. | + +### Response + +**Promise\<[operations.AddExtrasResponse](../../sdk/models/operations/addextrasresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getFile + +Get a bundle file for a metadata or media item. This is either an image or a mp3 (for a show's theme) + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getFile({ + ids: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetFile } from "@lukehagar/plexjs/funcs/libraryGetFile.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetFile(plexAPI, { + ids: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetFile failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetFileRequest](../../sdk/models/operations/getfilerequest.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. | + +### Response + +**Promise\<[operations.GetFileResponse](../../sdk/models/operations/getfileresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## startBifGeneration + +Start the indexing (BIF generation) of an item + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.startBifGeneration({ + ids: "", + force: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryStartBifGeneration } from "@lukehagar/plexjs/funcs/libraryStartBifGeneration.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryStartBifGeneration(plexAPI, { + ids: "", + force: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryStartBifGeneration failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.StartBifGenerationRequest](../../sdk/models/operations/startbifgenerationrequest.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. | + +### Response + +**Promise\<[operations.StartBifGenerationResponse](../../sdk/models/operations/startbifgenerationresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## detectIntros + +Start the detection of intros in a metadata item + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.detectIntros({ + ids: "", + force: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryDetectIntros } from "@lukehagar/plexjs/funcs/libraryDetectIntros.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryDetectIntros(plexAPI, { + ids: "", + force: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryDetectIntros failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DetectIntrosRequest](../../sdk/models/operations/detectintrosrequest.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. | + +### Response + +**Promise\<[operations.DetectIntrosResponse](../../sdk/models/operations/detectintrosresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## createMarker + +Create a marker for this user on the metadata item + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.createMarker({ + ids: "", + type: 248391, + startTimeOffset: 535191, + attributes: {}, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryCreateMarker } from "@lukehagar/plexjs/funcs/libraryCreateMarker.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryCreateMarker(plexAPI, { + ids: "", + type: 248391, + startTimeOffset: 535191, + attributes: {}, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryCreateMarker failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateMarkerRequest](../../sdk/models/operations/createmarkerrequest.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. | + +### Response + +**Promise\<[operations.CreateMarkerResponse](../../sdk/models/operations/createmarkerresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## matchItem + +Match a metadata item to a guid + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.matchItem({ + ids: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryMatchItem } from "@lukehagar/plexjs/funcs/libraryMatchItem.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryMatchItem(plexAPI, { + ids: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryMatchItem failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MatchItemRequest](../../sdk/models/operations/matchitemrequest.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. | + +### Response + +**Promise\<[operations.MatchItemResponse](../../sdk/models/operations/matchitemresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listMatches + +Get the list of metadata matches for a metadata item + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.listMatches({ + ids: "", + manual: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryListMatches } from "@lukehagar/plexjs/funcs/libraryListMatches.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryListMatches(plexAPI, { + ids: "", + manual: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryListMatches failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListMatchesRequest](../../sdk/models/operations/listmatchesrequest.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. | + +### Response + +**Promise\<[operations.ListMatchesResponse](../../sdk/models/operations/listmatchesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## mergeItems + +Merge a metadata item with other items + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.mergeItems({ + idsPathParameter: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryMergeItems } from "@lukehagar/plexjs/funcs/libraryMergeItems.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryMergeItems(plexAPI, { + idsPathParameter: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryMergeItems failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MergeItemsRequest](../../sdk/models/operations/mergeitemsrequest.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. | + +### Response + +**Promise\<[operations.MergeItemsResponse](../../sdk/models/operations/mergeitemsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listSonicallySimilar + +Get the nearest tracks, sonically, to the provided track + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.listSonicallySimilar({ + ids: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryListSonicallySimilar } from "@lukehagar/plexjs/funcs/libraryListSonicallySimilar.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryListSonicallySimilar(plexAPI, { + ids: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryListSonicallySimilar failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListSonicallySimilarRequest](../../sdk/models/operations/listsonicallysimilarrequest.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. | + +### Response + +**Promise\<[operations.ListSonicallySimilarResponse](../../sdk/models/operations/listsonicallysimilarresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## setItemPreferences + +Set the preferences on a metadata item + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.setItemPreferences({ + ids: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { librarySetItemPreferences } from "@lukehagar/plexjs/funcs/librarySetItemPreferences.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await librarySetItemPreferences(plexAPI, { + ids: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("librarySetItemPreferences failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SetItemPreferencesRequest](../../sdk/models/operations/setitempreferencesrequest.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. | + +### Response + +**Promise\<[operations.SetItemPreferencesResponse](../../sdk/models/operations/setitempreferencesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## refreshItemsMetadata + +Refresh a metadata item from the agent + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.refreshItemsMetadata({ + ids: "", + markUpdated: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryRefreshItemsMetadata } from "@lukehagar/plexjs/funcs/libraryRefreshItemsMetadata.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryRefreshItemsMetadata(plexAPI, { + ids: "", + markUpdated: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryRefreshItemsMetadata failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RefreshItemsMetadataRequest](../../sdk/models/operations/refreshitemsmetadatarequest.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. | + +### Response + +**Promise\<[operations.RefreshItemsMetadataResponse](../../sdk/models/operations/refreshitemsmetadataresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getRelatedItems + +Get a hub of related items to a metadata item + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getRelatedItems({ + ids: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetRelatedItems } from "@lukehagar/plexjs/funcs/libraryGetRelatedItems.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetRelatedItems(plexAPI, { + ids: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetRelatedItems failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetRelatedItemsRequest](../../sdk/models/operations/getrelateditemsrequest.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. | + +### Response + +**Promise\<[operations.GetRelatedItemsResponse](../../sdk/models/operations/getrelateditemsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listSimilar + +Get a list of similar items to a metadata item + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.listSimilar({ + ids: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryListSimilar } from "@lukehagar/plexjs/funcs/libraryListSimilar.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryListSimilar(plexAPI, { + ids: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryListSimilar failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListSimilarRequest](../../sdk/models/operations/listsimilarrequest.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. | + +### Response + +**Promise\<[operations.ListSimilarResponse](../../sdk/models/operations/listsimilarresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## splitItem + +Split a metadata item into multiple items + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.splitItem({ + ids: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { librarySplitItem } from "@lukehagar/plexjs/funcs/librarySplitItem.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await librarySplitItem(plexAPI, { + ids: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("librarySplitItem failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SplitItemRequest](../../sdk/models/operations/splititemrequest.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. | + +### Response + +**Promise\<[operations.SplitItemResponse](../../sdk/models/operations/splititemresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## addSubtitles + +Add a subtitle to a metadata item + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.addSubtitles({ + ids: "", + forced: BoolInt.One, + hearingImpaired: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryAddSubtitles } from "@lukehagar/plexjs/funcs/libraryAddSubtitles.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryAddSubtitles(plexAPI, { + ids: "", + forced: BoolInt.One, + hearingImpaired: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryAddSubtitles failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AddSubtitlesRequest](../../sdk/models/operations/addsubtitlesrequest.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. | + +### Response + +**Promise\<[operations.AddSubtitlesResponse](../../sdk/models/operations/addsubtitlesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getItemTree + +Get a tree of metadata items, such as the seasons/episodes of a show + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getItemTree({ + ids: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetItemTree } from "@lukehagar/plexjs/funcs/libraryGetItemTree.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetItemTree(plexAPI, { + ids: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetItemTree failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetItemTreeRequest](../../sdk/models/operations/getitemtreerequest.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. | + +### Response + +**Promise\<[operations.GetItemTreeResponse](../../sdk/models/operations/getitemtreeresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## unmatch + +Unmatch a metadata item to info fetched from the agent + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.unmatch({ + ids: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryUnmatch } from "@lukehagar/plexjs/funcs/libraryUnmatch.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryUnmatch(plexAPI, { + ids: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryUnmatch failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UnmatchRequest](../../sdk/models/operations/unmatchrequest.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. | + +### Response + +**Promise\<[operations.UnmatchResponse](../../sdk/models/operations/unmatchresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listTopUsers + +Get the list of users which have played this item starting with the most + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.listTopUsers({ + ids: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryListTopUsers } from "@lukehagar/plexjs/funcs/libraryListTopUsers.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryListTopUsers(plexAPI, { + ids: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryListTopUsers failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListTopUsersRequest](../../sdk/models/operations/listtopusersrequest.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. | + +### Response + +**Promise\<[operations.ListTopUsersResponse](../../sdk/models/operations/listtopusersresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## detectVoiceActivity + +Start the detection of voice in a metadata item + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.detectVoiceActivity({ + ids: "", + force: BoolInt.One, + manual: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryDetectVoiceActivity } from "@lukehagar/plexjs/funcs/libraryDetectVoiceActivity.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryDetectVoiceActivity(plexAPI, { + ids: "", + force: BoolInt.One, + manual: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryDetectVoiceActivity failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DetectVoiceActivityRequest](../../sdk/models/operations/detectvoiceactivityrequest.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. | + +### Response + +**Promise\<[operations.DetectVoiceActivityResponse](../../sdk/models/operations/detectvoiceactivityresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getAugmentationStatus + +Get augmentation status and potentially wait for completion + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getAugmentationStatus({ + augmentationId: "", + wait: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetAugmentationStatus } from "@lukehagar/plexjs/funcs/libraryGetAugmentationStatus.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetAugmentationStatus(plexAPI, { + augmentationId: "", + wait: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetAugmentationStatus failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAugmentationStatusRequest](../../sdk/models/operations/getaugmentationstatusrequest.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. | + +### Response + +**Promise\<[operations.GetAugmentationStatusResponse](../../sdk/models/operations/getaugmentationstatusresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## setStreamSelection + +Set which streams (audio/subtitle) are selected by this user + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.setStreamSelection({ + partId: 360489, + allParts: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { librarySetStreamSelection } from "@lukehagar/plexjs/funcs/librarySetStreamSelection.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await librarySetStreamSelection(plexAPI, { + partId: 360489, + allParts: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("librarySetStreamSelection failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SetStreamSelectionRequest](../../sdk/models/operations/setstreamselectionrequest.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. | + +### Response + +**Promise\<[operations.SetStreamSelectionResponse](../../sdk/models/operations/setstreamselectionresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getPerson + +Get details for a single actor. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getPerson({ + personId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetPerson } from "@lukehagar/plexjs/funcs/libraryGetPerson.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetPerson(plexAPI, { + personId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetPerson failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPersonRequest](../../sdk/models/operations/getpersonrequest.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. | + +### Response + +**Promise\<[operations.GetPersonResponse](../../sdk/models/operations/getpersonresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listPersonMedia + +Get all the media for a single actor. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.listPersonMedia({ + personId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryListPersonMedia } from "@lukehagar/plexjs/funcs/libraryListPersonMedia.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryListPersonMedia(plexAPI, { + personId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryListPersonMedia failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListPersonMediaRequest](../../sdk/models/operations/listpersonmediarequest.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. | + +### Response + +**Promise\<[operations.ListPersonMediaResponse](../../sdk/models/operations/listpersonmediaresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deleteLibrarySection + +Delete a library section by id + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.deleteLibrarySection({ + sectionId: "", + async: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryDeleteLibrarySection } from "@lukehagar/plexjs/funcs/libraryDeleteLibrarySection.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryDeleteLibrarySection(plexAPI, { + sectionId: "", + async: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryDeleteLibrarySection failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteLibrarySectionRequest](../../sdk/models/operations/deletelibrarysectionrequest.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. | + +### Response + +**Promise\<[operations.DeleteLibrarySectionResponse](../../sdk/models/operations/deletelibrarysectionresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getLibraryDetails + +Returns details for the library. This can be thought of as an interstitial endpoint because it contains information about the library, rather than content itself. It often contains a list of `Directory` metadata objects: These used to be used by clients to build a menuing system. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getLibraryDetails({ + sectionId: "", + includeDetails: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetLibraryDetails } from "@lukehagar/plexjs/funcs/libraryGetLibraryDetails.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetLibraryDetails(plexAPI, { + sectionId: "", + includeDetails: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetLibraryDetails failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetLibraryDetailsRequest](../../sdk/models/operations/getlibrarydetailsrequest.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. | + +### Response + +**Promise\<[operations.GetLibraryDetailsResponse](../../sdk/models/operations/getlibrarydetailsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## editSection + +Edit a library section by id setting parameters + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.editSection({ + sectionId: "", + agent: "", + locations: [ + "O:\fatboy\\Media\\Ripped\\Music", + "O:\fatboy\\Media\\My Music", + ], + prefs: {}, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryEditSection } from "@lukehagar/plexjs/funcs/libraryEditSection.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryEditSection(plexAPI, { + sectionId: "", + agent: "", + locations: [ + "O:\fatboy\\Media\\Ripped\\Music", + "O:\fatboy\\Media\\My Music", + ], + prefs: {}, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryEditSection failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.EditSectionRequest](../../sdk/models/operations/editsectionrequest.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. | + +### Response + +**Promise\<[operations.EditSectionResponse](../../sdk/models/operations/editsectionresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## updateItems + +This endpoint takes an large possible set of values. Here are some examples. +- **Parameters, extra documentation** + - artist.title.value + - When used with track, both artist.title.value and album.title.value need to be specified + - title.value usage + - Summary + - Tracks always rename and never merge + - Albums and Artists + - if single item and item without title does not exist, it is renamed. + - if single item and item with title does exist they are merged. + - if multiple they are always merged. + - Tracks + - Works as expected will update the track's title + - Single track: `/library/sections/{id}/all?type=10&id=42&title.value=NewName` + - Multiple tracks: `/library/sections/{id}/all?type=10&id=42,43,44&title.value=NewName` + - All tracks: `/library/sections/{id}/all?type=10&title.value=NewName` + - Albums + - Functionality changes depending on the existence of an album with the same title + - Album exists + - Single album: `/library/sections/{id}/all?type=9&id=42&title.value=Album 2` + - Album with id 42 is merged into album titled "Album 2" + - Multiple/All albums: `/library/sections/{id}/all?type=9&title.value=Moo Album` + - All albums are merged into the existing album titled "Moo Album" + - Album does not exist + - Single album: `/library/sections/{id}/all?type=9&id=42&title.value=NewAlbumTitle` + - Album with id 42 has title modified to "NewAlbumTitle" + - Multiple/All albums: `/library/sections/{id}/all?type=9&title.value=NewAlbumTitle` + - All albums are merged into a new album with title="NewAlbumTitle" + - Artists + - Functionaly changes depending on the existence of an artist with the same title. + - Artist exists + - Single artist: `/library/sections/{id}/all?type=8&id=42&title.value=Artist 2` + - Artist with id 42 is merged into existing artist titled "Artist 2" + - Multiple/All artists: `/library/sections/{id}/all?type=8&title.value=Artist 3` + - All artists are merged into the existing artist titled "Artist 3" + - Artist does not exist + - Single artist: `/library/sections/{id}/all?type=8&id=42&title.value=NewArtistTitle` + - Artist with id 42 has title modified to "NewArtistTitle" + - Multiple/All artists: `/library/sections/{id}/all?type=8&title.value=NewArtistTitle` + - All artists are merged into a new artist with title="NewArtistTitle" + +- **Notes** + - Technically square brackets are not allowed in an URI except the Internet Protocol Literal Address + - RFC3513: A host identified by an Internet Protocol literal address, version 6 [RFC3513] or later, is distinguished by enclosing the IP literal within square brackets ("[" and "]"). This is the only place where square bracket characters are allowed in the URI syntax. + - Escaped square brackets are allowed, but don't render well + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.updateItems({ + sectionId: "", + fieldLocked: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryUpdateItems } from "@lukehagar/plexjs/funcs/libraryUpdateItems.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryUpdateItems(plexAPI, { + sectionId: "", + fieldLocked: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryUpdateItems failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateItemsRequest](../../sdk/models/operations/updateitemsrequest.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. | + +### Response + +**Promise\<[operations.UpdateItemsResponse](../../sdk/models/operations/updateitemsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## startAnalysis + +Start analysis of all items in a section. If BIF generation is enabled, this will also be started on this section + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.startAnalysis({ + sectionId: 158829, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryStartAnalysis } from "@lukehagar/plexjs/funcs/libraryStartAnalysis.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryStartAnalysis(plexAPI, { + sectionId: 158829, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryStartAnalysis failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.StartAnalysisRequest](../../sdk/models/operations/startanalysisrequest.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. | + +### Response + +**Promise\<[operations.StartAnalysisResponse](../../sdk/models/operations/startanalysisresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## autocomplete + +The field to autocomplete on is specified by the {field}.query parameter. For example `genre.query` or `title.query`. +Returns a set of items from the filtered items whose {field} starts with {field}.query. In the results, a {field}.queryRange will be present to express the range of the match + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.autocomplete({ + sectionId: 942007, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryAutocomplete } from "@lukehagar/plexjs/funcs/libraryAutocomplete.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryAutocomplete(plexAPI, { + sectionId: 942007, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryAutocomplete failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AutocompleteRequest](../../sdk/models/operations/autocompleterequest.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. | + +### Response + +**Promise\<[operations.AutocompleteResponse](../../sdk/models/operations/autocompleteresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getCollections + +Get all collections in a section + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getCollections({ + sectionId: 348838, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetCollections } from "@lukehagar/plexjs/funcs/libraryGetCollections.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetCollections(plexAPI, { + sectionId: 348838, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetCollections failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCollectionsRequest](../../sdk/models/operations/getcollectionsrequest.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. | + +### Response + +**Promise\<[operations.GetCollectionsResponse](../../sdk/models/operations/getcollectionsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getCommon + +Represents a "Common" item. It contains only the common attributes of the items selected by the provided filter +Fields which are not common will be expressed in the `mixedFields` field + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getCommon({ + sectionId: 298154, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetCommon } from "@lukehagar/plexjs/funcs/libraryGetCommon.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetCommon(plexAPI, { + sectionId: 298154, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetCommon failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCommonRequest](../../sdk/models/operations/getcommonrequest.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. | + +### Response + +**Promise\<[operations.GetCommonResponse](../../sdk/models/operations/getcommonresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## emptyTrash + +Empty trash in the section, permanently deleting media/metadata for missing media + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.emptyTrash({ + sectionId: 30052, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryEmptyTrash } from "@lukehagar/plexjs/funcs/libraryEmptyTrash.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryEmptyTrash(plexAPI, { + sectionId: 30052, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryEmptyTrash failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.EmptyTrashRequest](../../sdk/models/operations/emptytrashrequest.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. | + +### Response + +**Promise\<[operations.EmptyTrashResponse](../../sdk/models/operations/emptytrashresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getSectionFilters + +Get common filters on a section + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getSectionFilters({ + sectionId: 380557, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetSectionFilters } from "@lukehagar/plexjs/funcs/libraryGetSectionFilters.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetSectionFilters(plexAPI, { + sectionId: 380557, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetSectionFilters failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetSectionFiltersRequest](../../sdk/models/operations/getsectionfiltersrequest.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. | + +### Response + +**Promise\<[operations.GetSectionFiltersResponse](../../sdk/models/operations/getsectionfiltersresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getFirstCharacters + +Get list of first characters in this section + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getFirstCharacters({ + sectionId: 3947, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetFirstCharacters } from "@lukehagar/plexjs/funcs/libraryGetFirstCharacters.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetFirstCharacters(plexAPI, { + sectionId: 3947, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetFirstCharacters failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetFirstCharactersRequest](../../sdk/models/operations/getfirstcharactersrequest.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. | + +### Response + +**Promise\<[operations.GetFirstCharactersResponse](../../sdk/models/operations/getfirstcharactersresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deleteIndexes + +Delete all the indexes in a section + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.deleteIndexes({ + sectionId: 588437, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryDeleteIndexes } from "@lukehagar/plexjs/funcs/libraryDeleteIndexes.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryDeleteIndexes(plexAPI, { + sectionId: 588437, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryDeleteIndexes failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteIndexesRequest](../../sdk/models/operations/deleteindexesrequest.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. | + +### Response + +**Promise\<[operations.DeleteIndexesResponse](../../sdk/models/operations/deleteindexesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deleteIntros + +Delete all the intro markers in a section + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.deleteIntros({ + sectionId: 498656, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryDeleteIntros } from "@lukehagar/plexjs/funcs/libraryDeleteIntros.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryDeleteIntros(plexAPI, { + sectionId: 498656, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryDeleteIntros failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteIntrosRequest](../../sdk/models/operations/deleteintrosrequest.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. | + +### Response + +**Promise\<[operations.DeleteIntrosResponse](../../sdk/models/operations/deleteintrosresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getSectionPreferences + +Get the prefs for a section by id and potentially overriding the agent + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getSectionPreferences({ + sectionId: 754869, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetSectionPreferences } from "@lukehagar/plexjs/funcs/libraryGetSectionPreferences.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetSectionPreferences(plexAPI, { + sectionId: 754869, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetSectionPreferences failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetSectionPreferencesRequest](../../sdk/models/operations/getsectionpreferencesrequest.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. | + +### Response + +**Promise\<[operations.GetSectionPreferencesResponse](../../sdk/models/operations/getsectionpreferencesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## setSectionPreferences + +Set the prefs for a section by id + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.setSectionPreferences({ + sectionId: 349936, + prefs: {}, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { librarySetSectionPreferences } from "@lukehagar/plexjs/funcs/librarySetSectionPreferences.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await librarySetSectionPreferences(plexAPI, { + sectionId: 349936, + prefs: {}, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("librarySetSectionPreferences failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SetSectionPreferencesRequest](../../sdk/models/operations/setsectionpreferencesrequest.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. | + +### Response + +**Promise\<[operations.SetSectionPreferencesResponse](../../sdk/models/operations/setsectionpreferencesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## cancelRefresh + +Cancel the refresh of a section + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.cancelRefresh({ + sectionId: 326852, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryCancelRefresh } from "@lukehagar/plexjs/funcs/libraryCancelRefresh.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryCancelRefresh(plexAPI, { + sectionId: 326852, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryCancelRefresh failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CancelRefreshRequest](../../sdk/models/operations/cancelrefreshrequest.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. | + +### Response + +**Promise\<[operations.CancelRefreshResponse](../../sdk/models/operations/cancelrefreshresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## refreshSection + +Start a refresh of this section + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.refreshSection({ + sectionId: 450300, + force: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryRefreshSection } from "@lukehagar/plexjs/funcs/libraryRefreshSection.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryRefreshSection(plexAPI, { + sectionId: 450300, + force: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryRefreshSection failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RefreshSectionRequest](../../sdk/models/operations/refreshsectionrequest.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. | + +### Response + +**Promise\<[operations.RefreshSectionResponse](../../sdk/models/operations/refreshsectionresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getAvailableSorts + +Get the sort mechanisms available in a section + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getAvailableSorts({ + sectionId: 212498, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetAvailableSorts } from "@lukehagar/plexjs/funcs/libraryGetAvailableSorts.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetAvailableSorts(plexAPI, { + sectionId: 212498, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetAvailableSorts failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAvailableSortsRequest](../../sdk/models/operations/getavailablesortsrequest.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. | + +### Response + +**Promise\<[operations.GetAvailableSortsResponse](../../sdk/models/operations/getavailablesortsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getStreamLevels + +The the loudness of a stream in db, one entry per 100ms + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getStreamLevels({ + streamId: 447611, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetStreamLevels } from "@lukehagar/plexjs/funcs/libraryGetStreamLevels.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetStreamLevels(plexAPI, { + streamId: 447611, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetStreamLevels failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetStreamLevelsRequest](../../sdk/models/operations/getstreamlevelsrequest.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. | + +### Response + +**Promise\<[operations.GetStreamLevelsResponse](../../sdk/models/operations/getstreamlevelsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getStreamLoudness + +The the loudness of a stream in db, one number per line, one entry per 100ms + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getStreamLoudness({ + streamId: 277271, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetStreamLoudness } from "@lukehagar/plexjs/funcs/libraryGetStreamLoudness.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetStreamLoudness(plexAPI, { + streamId: 277271, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetStreamLoudness failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetStreamLoudnessRequest](../../sdk/models/operations/getstreamloudnessrequest.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. | + +### Response + +**Promise\<[operations.GetStreamLoudnessResponse](../../sdk/models/operations/getstreamloudnessresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getChapterImage + +Get a single chapter image for a piece of media + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getChapterImage({ + mediaId: 892563, + chapter: 48348, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetChapterImage } from "@lukehagar/plexjs/funcs/libraryGetChapterImage.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetChapterImage(plexAPI, { + mediaId: 892563, + chapter: 48348, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetChapterImage failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetChapterImageRequest](../../sdk/models/operations/getchapterimagerequest.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. | + +### Response + +**Promise\<[operations.GetChapterImageResponse](../../sdk/models/operations/getchapterimageresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## setItemArtwork + +Set the artwork, thumb, element for a metadata item +Generally only the admin can perform this action. The exception is if the metadata is a playlist created by the user + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { SetItemArtworkElement } from "@lukehagar/plexjs/sdk/models/operations"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.setItemArtwork({ + ids: "", + element: SetItemArtworkElement.Banner, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { librarySetItemArtwork } from "@lukehagar/plexjs/funcs/librarySetItemArtwork.js"; +import { SetItemArtworkElement } from "@lukehagar/plexjs/sdk/models/operations"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await librarySetItemArtwork(plexAPI, { + ids: "", + element: SetItemArtworkElement.Banner, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("librarySetItemArtwork failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SetItemArtworkRequest](../../sdk/models/operations/setitemartworkrequest.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. | + +### Response + +**Promise\<[operations.SetItemArtworkResponse](../../sdk/models/operations/setitemartworkresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## updateItemArtwork + +Set the artwork, thumb, element for a metadata item +Generally only the admin can perform this action. The exception is if the metadata is a playlist created by the user + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { UpdateItemArtworkElement } from "@lukehagar/plexjs/sdk/models/operations"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.updateItemArtwork({ + ids: "", + element: UpdateItemArtworkElement.ClearLogo, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryUpdateItemArtwork } from "@lukehagar/plexjs/funcs/libraryUpdateItemArtwork.js"; +import { UpdateItemArtworkElement } from "@lukehagar/plexjs/sdk/models/operations"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryUpdateItemArtwork(plexAPI, { + ids: "", + element: UpdateItemArtworkElement.ClearLogo, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryUpdateItemArtwork failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateItemArtworkRequest](../../sdk/models/operations/updateitemartworkrequest.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. | + +### Response + +**Promise\<[operations.UpdateItemArtworkResponse](../../sdk/models/operations/updateitemartworkresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deleteMarker + +Delete a marker for this user on the metadata item + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.deleteMarker({ + ids: "", + marker: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryDeleteMarker } from "@lukehagar/plexjs/funcs/libraryDeleteMarker.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryDeleteMarker(plexAPI, { + ids: "", + marker: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryDeleteMarker failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteMarkerRequest](../../sdk/models/operations/deletemarkerrequest.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. | + +### Response + +**Promise\<[operations.DeleteMarkerResponse](../../sdk/models/operations/deletemarkerresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## editMarker + +Edit a marker for this user on the metadata item + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.editMarker({ + ids: "", + marker: "", + type: 884347, + startTimeOffset: 517251, + attributes: {}, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryEditMarker } from "@lukehagar/plexjs/funcs/libraryEditMarker.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryEditMarker(plexAPI, { + ids: "", + marker: "", + type: 884347, + startTimeOffset: 517251, + attributes: {}, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryEditMarker failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.EditMarkerRequest](../../sdk/models/operations/editmarkerrequest.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. | + +### Response + +**Promise\<[operations.EditMarkerResponse](../../sdk/models/operations/editmarkerresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deleteMediaItem + +Delete a single media from a metadata item in the library + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.deleteMediaItem({ + ids: "", + mediaItem: "", + proxy: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryDeleteMediaItem } from "@lukehagar/plexjs/funcs/libraryDeleteMediaItem.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryDeleteMediaItem(plexAPI, { + ids: "", + mediaItem: "", + proxy: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryDeleteMediaItem failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteMediaItemRequest](../../sdk/models/operations/deletemediaitemrequest.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. | + +### Response + +**Promise\<[operations.DeleteMediaItemResponse](../../sdk/models/operations/deletemediaitemresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getPartIndex + +Get BIF index for a part by index type + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { GetPartIndexIndex } from "@lukehagar/plexjs/sdk/models/operations"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getPartIndex({ + partId: 724750, + index: GetPartIndexIndex.Sd, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetPartIndex } from "@lukehagar/plexjs/funcs/libraryGetPartIndex.js"; +import { GetPartIndexIndex } from "@lukehagar/plexjs/sdk/models/operations"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetPartIndex(plexAPI, { + partId: 724750, + index: GetPartIndexIndex.Sd, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetPartIndex failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPartIndexRequest](../../sdk/models/operations/getpartindexrequest.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. | + +### Response + +**Promise\<[operations.GetPartIndexResponse](../../sdk/models/operations/getpartindexresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deleteCollection + +Delete a library collection from the PMS + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.deleteCollection({ + sectionId: 283619, + collectionId: 680895, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryDeleteCollection } from "@lukehagar/plexjs/funcs/libraryDeleteCollection.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryDeleteCollection(plexAPI, { + sectionId: 283619, + collectionId: 680895, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryDeleteCollection failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteCollectionRequest](../../sdk/models/operations/deletecollectionrequest.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. | + +### Response + +**Promise\<[operations.DeleteCollectionResponse](../../sdk/models/operations/deletecollectionresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getSectionImage + +Get a composite image of images in this section + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getSectionImage({ + sectionId: 925611, + updatedAt: 117413, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetSectionImage } from "@lukehagar/plexjs/funcs/libraryGetSectionImage.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetSectionImage(plexAPI, { + sectionId: 925611, + updatedAt: 117413, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetSectionImage failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetSectionImageRequest](../../sdk/models/operations/getsectionimagerequest.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. | + +### Response + +**Promise\<[operations.GetSectionImageResponse](../../sdk/models/operations/getsectionimageresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deleteStream + +Delete a stream. Only applies to downloaded subtitle streams or a sidecar subtitle when media deletion is enabled. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.deleteStream({ + streamId: 841510, + ext: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryDeleteStream } from "@lukehagar/plexjs/funcs/libraryDeleteStream.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryDeleteStream(plexAPI, { + streamId: 841510, + ext: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryDeleteStream failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteStreamRequest](../../sdk/models/operations/deletestreamrequest.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. | + +### Response + +**Promise\<[operations.DeleteStreamResponse](../../sdk/models/operations/deletestreamresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getStream + +Get a stream (such as a sidecar subtitle stream) + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getStream({ + streamId: 314506, + ext: "", + autoAdjustSubtitle: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetStream } from "@lukehagar/plexjs/funcs/libraryGetStream.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetStream(plexAPI, { + streamId: 314506, + ext: "", + autoAdjustSubtitle: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetStream failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetStreamRequest](../../sdk/models/operations/getstreamrequest.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. | + +### Response + +**Promise\<[operations.GetStreamResponse](../../sdk/models/operations/getstreamresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## setStreamOffset + +Set a stream offset in ms. This may not be respected by all clients + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.setStreamOffset({ + streamId: 606295, + ext: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { librarySetStreamOffset } from "@lukehagar/plexjs/funcs/librarySetStreamOffset.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await librarySetStreamOffset(plexAPI, { + streamId: 606295, + ext: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("librarySetStreamOffset failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SetStreamOffsetRequest](../../sdk/models/operations/setstreamoffsetrequest.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. | + +### Response + +**Promise\<[operations.SetStreamOffsetResponse](../../sdk/models/operations/setstreamoffsetresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getItemArtwork + +Get the artwork, thumb, element for a metadata item + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { GetItemArtworkElement } from "@lukehagar/plexjs/sdk/models/operations"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getItemArtwork({ + ids: "", + element: GetItemArtworkElement.Poster, + timestamp: 999555, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetItemArtwork } from "@lukehagar/plexjs/funcs/libraryGetItemArtwork.js"; +import { GetItemArtworkElement } from "@lukehagar/plexjs/sdk/models/operations"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetItemArtwork(plexAPI, { + ids: "", + element: GetItemArtworkElement.Poster, + timestamp: 999555, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetItemArtwork failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetItemArtworkRequest](../../sdk/models/operations/getitemartworkrequest.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. | + +### Response + +**Promise\<[operations.GetItemArtworkResponse](../../sdk/models/operations/getitemartworkresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getMediaPart + +Get a media part for streaming or download. + - streaming: This is the default scenario. Bandwidth usage on this endpoint will be guaranteed (on the server's end) to be at least the bandwidth reservation given in the decision. If no decision exists, an ad-hoc decision will be created if sufficient bandwidth exists. Clients should not rely on ad-hoc decisions being made as this may be removed in the future. + - download: Indicated if the query parameter indicates this is a download. Bandwidth will be prioritized behind playbacks and will get a fair share of what remains. + + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getMediaPart({ + partId: 877105, + changestamp: 970622, + filename: "example.file", + download: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetMediaPart } from "@lukehagar/plexjs/funcs/libraryGetMediaPart.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetMediaPart(plexAPI, { + partId: 877105, + changestamp: 970622, + filename: "example.file", + download: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetMediaPart failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetMediaPartRequest](../../sdk/models/operations/getmediapartrequest.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. | + +### Response + +**Promise\<[operations.GetMediaPartResponse](../../sdk/models/operations/getmediapartresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getImageFromBif + +Extract an image from the BIF for a part at a particular offset + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { GetImageFromBifIndex } from "@lukehagar/plexjs/sdk/models/operations"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.library.getImageFromBif({ + partId: 304273, + index: GetImageFromBifIndex.Sd, + offset: 939569, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryGetImageFromBif } from "@lukehagar/plexjs/funcs/libraryGetImageFromBif.js"; +import { GetImageFromBifIndex } from "@lukehagar/plexjs/sdk/models/operations"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryGetImageFromBif(plexAPI, { + partId: 304273, + index: GetImageFromBifIndex.Sd, + offset: 939569, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryGetImageFromBif failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetImageFromBifRequest](../../sdk/models/operations/getimagefrombifrequest.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. | + +### Response + +**Promise\<[operations.GetImageFromBifResponse](../../sdk/models/operations/getimagefrombifresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/librarycollections/README.md b/docs/sdks/librarycollections/README.md new file mode 100644 index 00000000..a6839948 --- /dev/null +++ b/docs/sdks/librarycollections/README.md @@ -0,0 +1,291 @@ +# LibraryCollections +(*libraryCollections*) + +## Overview + +Endpoints for manipulating collections. In addition to these endpoints, `/library/collections/:collectionId/X` will be rerouted to `/library/metadata/:collectionId/X` and respond to those endpoints as well. + +### Available Operations + +* [addCollectionItems](#addcollectionitems) - Add items to a collection +* [deleteCollectionItem](#deletecollectionitem) - Delete an item from a collection +* [moveCollectionItem](#movecollectionitem) - Reorder an item in the collection + +## addCollectionItems + +Add items to a collection by uri + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.libraryCollections.addCollectionItems({ + collectionId: 338144, + uri: "https://expensive-bakeware.com", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryCollectionsAddCollectionItems } from "@lukehagar/plexjs/funcs/libraryCollectionsAddCollectionItems.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryCollectionsAddCollectionItems(plexAPI, { + collectionId: 338144, + uri: "https://expensive-bakeware.com", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryCollectionsAddCollectionItems failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AddCollectionItemsRequest](../../sdk/models/operations/addcollectionitemsrequest.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. | + +### Response + +**Promise\<[operations.AddCollectionItemsResponse](../../sdk/models/operations/addcollectionitemsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deleteCollectionItem + +Delete an item from a collection + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.libraryCollections.deleteCollectionItem({ + collectionId: 320928, + itemId: 406983, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryCollectionsDeleteCollectionItem } from "@lukehagar/plexjs/funcs/libraryCollectionsDeleteCollectionItem.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryCollectionsDeleteCollectionItem(plexAPI, { + collectionId: 320928, + itemId: 406983, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryCollectionsDeleteCollectionItem failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteCollectionItemRequest](../../sdk/models/operations/deletecollectionitemrequest.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. | + +### Response + +**Promise\<[operations.DeleteCollectionItemResponse](../../sdk/models/operations/deletecollectionitemresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## moveCollectionItem + +Reorder items in a collection with one item after another + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.libraryCollections.moveCollectionItem({ + collectionId: 239532, + itemId: 513864, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryCollectionsMoveCollectionItem } from "@lukehagar/plexjs/funcs/libraryCollectionsMoveCollectionItem.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryCollectionsMoveCollectionItem(plexAPI, { + collectionId: 239532, + itemId: 513864, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryCollectionsMoveCollectionItem failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MoveCollectionItemRequest](../../sdk/models/operations/movecollectionitemrequest.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. | + +### Response + +**Promise\<[operations.MoveCollectionItemResponse](../../sdk/models/operations/movecollectionitemresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/libraryplaylists/README.md b/docs/sdks/libraryplaylists/README.md new file mode 100644 index 00000000..7ea2ee55 --- /dev/null +++ b/docs/sdks/libraryplaylists/README.md @@ -0,0 +1,1259 @@ +# LibraryPlaylists +(*libraryPlaylists*) + +## Overview + +Endpoints for manipulating playlists. + +### Available Operations + +* [createPlaylist](#createplaylist) - Create a Playlist +* [uploadPlaylist](#uploadplaylist) - Upload +* [deletePlaylist](#deleteplaylist) - Delete a Playlist +* [updatePlaylist](#updateplaylist) - Editing a Playlist +* [getPlaylistGenerators](#getplaylistgenerators) - Get a playlist's generators +* [clearPlaylistItems](#clearplaylistitems) - Clearing a playlist +* [addPlaylistItems](#addplaylistitems) - Adding to a Playlist +* [deletePlaylistItem](#deleteplaylistitem) - Delete a Generator +* [getPlaylistGenerator](#getplaylistgenerator) - Get a playlist generator +* [modifyPlaylistGenerator](#modifyplaylistgenerator) - Modify a Generator +* [getPlaylistGeneratorItems](#getplaylistgeneratoritems) - Get a playlist generator's items +* [movePlaylistItem](#moveplaylistitem) - Moving items in a playlist +* [refreshPlaylist](#refreshplaylist) - Reprocess a generator + +## createPlaylist + +Create a new playlist. By default the playlist is blank. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.libraryPlaylists.createPlaylist({ + uri: "https://short-term-disconnection.name/", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryPlaylistsCreatePlaylist } from "@lukehagar/plexjs/funcs/libraryPlaylistsCreatePlaylist.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryPlaylistsCreatePlaylist(plexAPI, { + uri: "https://short-term-disconnection.name/", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryPlaylistsCreatePlaylist failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreatePlaylistRequest](../../sdk/models/operations/createplaylistrequest.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. | + +### Response + +**Promise\<[operations.CreatePlaylistResponse](../../sdk/models/operations/createplaylistresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## uploadPlaylist + +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. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.libraryPlaylists.uploadPlaylist({ + path: "/home/barkley/playlist.m3u", + force: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryPlaylistsUploadPlaylist } from "@lukehagar/plexjs/funcs/libraryPlaylistsUploadPlaylist.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryPlaylistsUploadPlaylist(plexAPI, { + path: "/home/barkley/playlist.m3u", + force: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryPlaylistsUploadPlaylist failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UploadPlaylistRequest](../../sdk/models/operations/uploadplaylistrequest.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. | + +### Response + +**Promise\<[operations.UploadPlaylistResponse](../../sdk/models/operations/uploadplaylistresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deletePlaylist + +Deletes a playlist by provided id + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.libraryPlaylists.deletePlaylist({ + playlistId: 343293, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryPlaylistsDeletePlaylist } from "@lukehagar/plexjs/funcs/libraryPlaylistsDeletePlaylist.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryPlaylistsDeletePlaylist(plexAPI, { + playlistId: 343293, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryPlaylistsDeletePlaylist failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeletePlaylistRequest](../../sdk/models/operations/deleteplaylistrequest.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. | + +### Response + +**Promise\<[operations.DeletePlaylistResponse](../../sdk/models/operations/deleteplaylistresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## updatePlaylist + +Edits a playlist in the same manner as [editing metadata](#tag/Provider/operation/metadataPutItem) + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.libraryPlaylists.updatePlaylist({ + playlistId: 157966, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryPlaylistsUpdatePlaylist } from "@lukehagar/plexjs/funcs/libraryPlaylistsUpdatePlaylist.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryPlaylistsUpdatePlaylist(plexAPI, { + playlistId: 157966, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryPlaylistsUpdatePlaylist failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdatePlaylistRequest](../../sdk/models/operations/updateplaylistrequest.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. | + +### Response + +**Promise\<[operations.UpdatePlaylistResponse](../../sdk/models/operations/updateplaylistresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getPlaylistGenerators + +Get all the generators in a playlist + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.libraryPlaylists.getPlaylistGenerators({ + playlistId: 162342, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryPlaylistsGetPlaylistGenerators } from "@lukehagar/plexjs/funcs/libraryPlaylistsGetPlaylistGenerators.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryPlaylistsGetPlaylistGenerators(plexAPI, { + playlistId: 162342, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryPlaylistsGetPlaylistGenerators failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPlaylistGeneratorsRequest](../../sdk/models/operations/getplaylistgeneratorsrequest.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. | + +### Response + +**Promise\<[operations.GetPlaylistGeneratorsResponse](../../sdk/models/operations/getplaylistgeneratorsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## clearPlaylistItems + +Clears a playlist, only works with dumb playlists. Returns the playlist. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.libraryPlaylists.clearPlaylistItems({ + playlistId: 552140, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryPlaylistsClearPlaylistItems } from "@lukehagar/plexjs/funcs/libraryPlaylistsClearPlaylistItems.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryPlaylistsClearPlaylistItems(plexAPI, { + playlistId: 552140, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryPlaylistsClearPlaylistItems failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ClearPlaylistItemsRequest](../../sdk/models/operations/clearplaylistitemsrequest.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. | + +### Response + +**Promise\<[operations.ClearPlaylistItemsResponse](../../sdk/models/operations/clearplaylistitemsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## addPlaylistItems + +Adds a generator to a playlist, same parameters as the POST above. 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. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.libraryPlaylists.addPlaylistItems({ + playlistId: 533723, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryPlaylistsAddPlaylistItems } from "@lukehagar/plexjs/funcs/libraryPlaylistsAddPlaylistItems.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryPlaylistsAddPlaylistItems(plexAPI, { + playlistId: 533723, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryPlaylistsAddPlaylistItems failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AddPlaylistItemsRequest](../../sdk/models/operations/addplaylistitemsrequest.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. | + +### Response + +**Promise\<[operations.AddPlaylistItemsResponse](../../sdk/models/operations/addplaylistitemsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deletePlaylistItem + +Deletes an item from a playlist. Only works with dumb playlists. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.libraryPlaylists.deletePlaylistItem({ + playlistId: 981646, + generatorId: 194010, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryPlaylistsDeletePlaylistItem } from "@lukehagar/plexjs/funcs/libraryPlaylistsDeletePlaylistItem.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryPlaylistsDeletePlaylistItem(plexAPI, { + playlistId: 981646, + generatorId: 194010, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryPlaylistsDeletePlaylistItem failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeletePlaylistItemRequest](../../sdk/models/operations/deleteplaylistitemrequest.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. | + +### Response + +**Promise\<[operations.DeletePlaylistItemResponse](../../sdk/models/operations/deleteplaylistitemresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getPlaylistGenerator + +Get a playlist's generator. Only used for optimized versions + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.libraryPlaylists.getPlaylistGenerator({ + playlistId: 744880, + generatorId: 322168, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryPlaylistsGetPlaylistGenerator } from "@lukehagar/plexjs/funcs/libraryPlaylistsGetPlaylistGenerator.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryPlaylistsGetPlaylistGenerator(plexAPI, { + playlistId: 744880, + generatorId: 322168, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryPlaylistsGetPlaylistGenerator failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPlaylistGeneratorRequest](../../sdk/models/operations/getplaylistgeneratorrequest.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. | + +### Response + +**Promise\<[operations.GetPlaylistGeneratorResponse](../../sdk/models/operations/getplaylistgeneratorresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## modifyPlaylistGenerator + +Modify a playlist generator. Only used for optimizer + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { ModifyPlaylistGeneratorScope } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.libraryPlaylists.modifyPlaylistGenerator({ + playlistId: 972007, + generatorId: 208334, + item: { + location: { + uri: "library://82503060-0d68-4603-b594-8b071d54819e/item/%2Flibrary%2Fmetadata%2F146", + }, + locationID: -1, + policy: { + scope: ModifyPlaylistGeneratorScope.All, + unwatched: BoolInt.Zero, + }, + target: "", + targetTagID: 1, + title: "Jack-Jack Attack", + type: 42, + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryPlaylistsModifyPlaylistGenerator } from "@lukehagar/plexjs/funcs/libraryPlaylistsModifyPlaylistGenerator.js"; +import { ModifyPlaylistGeneratorScope } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryPlaylistsModifyPlaylistGenerator(plexAPI, { + playlistId: 972007, + generatorId: 208334, + item: { + location: { + uri: "library://82503060-0d68-4603-b594-8b071d54819e/item/%2Flibrary%2Fmetadata%2F146", + }, + locationID: -1, + policy: { + scope: ModifyPlaylistGeneratorScope.All, + unwatched: BoolInt.Zero, + }, + target: "", + targetTagID: 1, + title: "Jack-Jack Attack", + type: 42, + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryPlaylistsModifyPlaylistGenerator failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ModifyPlaylistGeneratorRequest](../../sdk/models/operations/modifyplaylistgeneratorrequest.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. | + +### Response + +**Promise\<[operations.ModifyPlaylistGeneratorResponse](../../sdk/models/operations/modifyplaylistgeneratorresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getPlaylistGeneratorItems + +Get a playlist generator's items + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.libraryPlaylists.getPlaylistGeneratorItems({ + playlistId: 77230, + generatorId: 979714, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryPlaylistsGetPlaylistGeneratorItems } from "@lukehagar/plexjs/funcs/libraryPlaylistsGetPlaylistGeneratorItems.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryPlaylistsGetPlaylistGeneratorItems(plexAPI, { + playlistId: 77230, + generatorId: 979714, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryPlaylistsGetPlaylistGeneratorItems failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPlaylistGeneratorItemsRequest](../../sdk/models/operations/getplaylistgeneratoritemsrequest.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. | + +### Response + +**Promise\<[operations.GetPlaylistGeneratorItemsResponse](../../sdk/models/operations/getplaylistgeneratoritemsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## movePlaylistItem + +Moves an item in a playlist. Only works with dumb playlists. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.libraryPlaylists.movePlaylistItem({ + playlistId: 940298, + playlistItemId: 375626, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryPlaylistsMovePlaylistItem } from "@lukehagar/plexjs/funcs/libraryPlaylistsMovePlaylistItem.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryPlaylistsMovePlaylistItem(plexAPI, { + playlistId: 940298, + playlistItemId: 375626, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryPlaylistsMovePlaylistItem failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MovePlaylistItemRequest](../../sdk/models/operations/moveplaylistitemrequest.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. | + +### Response + +**Promise\<[operations.MovePlaylistItemResponse](../../sdk/models/operations/moveplaylistitemresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## refreshPlaylist + +Make a generator reprocess (refresh) + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { Action } from "@lukehagar/plexjs/sdk/models/operations"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.libraryPlaylists.refreshPlaylist({ + playlistId: 895314, + generatorId: 629742, + metadataId: 724422, + action: Action.Disable, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { libraryPlaylistsRefreshPlaylist } from "@lukehagar/plexjs/funcs/libraryPlaylistsRefreshPlaylist.js"; +import { Action } from "@lukehagar/plexjs/sdk/models/operations"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await libraryPlaylistsRefreshPlaylist(plexAPI, { + playlistId: 895314, + generatorId: 629742, + metadataId: 724422, + action: Action.Disable, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("libraryPlaylistsRefreshPlaylist failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RefreshPlaylistRequest](../../sdk/models/operations/refreshplaylistrequest.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. | + +### Response + +**Promise\<[operations.RefreshPlaylistResponse](../../sdk/models/operations/refreshplaylistresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/livetv/README.md b/docs/sdks/livetv/README.md new file mode 100644 index 00000000..fcea6f35 --- /dev/null +++ b/docs/sdks/livetv/README.md @@ -0,0 +1,357 @@ +# LiveTV +(*liveTV*) + +## Overview + +LiveTV contains the playback sessions of a channel from a DVR device + + +### Available Operations + +* [getSessions](#getsessions) - Get all sessions +* [getLiveTVSession](#getlivetvsession) - Get a single session +* [getSessionPlaylistIndex](#getsessionplaylistindex) - Get a session playlist index +* [getSessionSegment](#getsessionsegment) - Get a single session segment + +## getSessions + +Get all livetv sessions and metadata + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI(); + +async function run() { + const result = await plexAPI.liveTV.getSessions(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { liveTVGetSessions } from "@lukehagar/plexjs/funcs/liveTVGetSessions.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore(); + +async function run() { + const res = await liveTVGetSessions(plexAPI); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("liveTVGetSessions failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| 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. | + +### Response + +**Promise\<[operations.GetSessionsResponse](../../sdk/models/operations/getsessionsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getLiveTVSession + +Get a single livetv session and metadata + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.liveTV.getLiveTVSession({ + sessionId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { liveTVGetLiveTVSession } from "@lukehagar/plexjs/funcs/liveTVGetLiveTVSession.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await liveTVGetLiveTVSession(plexAPI, { + sessionId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("liveTVGetLiveTVSession failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetLiveTVSessionRequest](../../sdk/models/operations/getlivetvsessionrequest.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. | + +### Response + +**Promise\<[operations.GetLiveTVSessionResponse](../../sdk/models/operations/getlivetvsessionresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getSessionPlaylistIndex + +Get a playlist index for playing this session + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.liveTV.getSessionPlaylistIndex({ + sessionId: "", + consumerId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { liveTVGetSessionPlaylistIndex } from "@lukehagar/plexjs/funcs/liveTVGetSessionPlaylistIndex.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await liveTVGetSessionPlaylistIndex(plexAPI, { + sessionId: "", + consumerId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("liveTVGetSessionPlaylistIndex failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetSessionPlaylistIndexRequest](../../sdk/models/operations/getsessionplaylistindexrequest.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. | + +### Response + +**Promise\<[operations.GetSessionPlaylistIndexResponse](../../sdk/models/operations/getsessionplaylistindexresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getSessionSegment + +Get a single LiveTV session segment + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.liveTV.getSessionSegment({ + sessionId: "", + consumerId: "", + segmentId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { liveTVGetSessionSegment } from "@lukehagar/plexjs/funcs/liveTVGetSessionSegment.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await liveTVGetSessionSegment(plexAPI, { + sessionId: "", + consumerId: "", + segmentId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("liveTVGetSessionSegment failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetSessionSegmentRequest](../../sdk/models/operations/getsessionsegmentrequest.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. | + +### Response + +**Promise\<[operations.GetSessionSegmentResponse](../../sdk/models/operations/getsessionsegmentresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/log/README.md b/docs/sdks/log/README.md index 2340dad1..59a0ed96 100644 --- a/docs/sdks/log/README.md +++ b/docs/sdks/log/README.md @@ -3,33 +3,110 @@ ## Overview -Submit logs to the Log Handler for Plex Media Server - +Logging mechanism to allow clients to log to the server ### Available Operations -* [logLine](#logline) - Logging a single line message. -* [logMultiLine](#logmultiline) - Logging a multi-line message -* [enablePaperTrail](#enablepapertrail) - Enabling Papertrail +* [writeLog](#writelog) - Logging a multi-line message to the Plex Media Server log +* [writeMessage](#writemessage) - Logging a single-line message to the Plex Media Server log +* [enablePapertrail](#enablepapertrail) - Enabling Papertrail -## logLine +## writeLog + +This endpoint will write multiple lines to the main Plex Media Server log in a single request. It takes a set of query strings as would normally sent to the above PUT endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above. + + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { openAsBlob } from "node:fs"; + +const plexAPI = new PlexAPI(); + +async function run() { + const result = await plexAPI.log.writeLog(await openAsBlob("example.file")); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { logWriteLog } from "@lukehagar/plexjs/funcs/logWriteLog.js"; +import { openAsBlob } from "node:fs"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore(); + +async function run() { + const res = await logWriteLog(plexAPI, await openAsBlob("example.file")); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("logWriteLog failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [ReadableStream](../../models/.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. | + +### Response + +**Promise\<[operations.WriteLogResponse](../../sdk/models/operations/writelogresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## writeMessage This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. +Note: This endpoint responds to all HTTP verbs **except POST** but PUT is preferred + ### Example Usage - + ```typescript import { PlexAPI } from "@lukehagar/plexjs"; -import { Level } from "@lukehagar/plexjs/sdk/models/operations"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.log.logLine(Level.Three, "Test log message", "Postman"); + const result = await plexAPI.log.writeMessage({}); console.log(result); } @@ -43,120 +120,30 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { logLogLine } from "@lukehagar/plexjs/funcs/logLogLine.js"; -import { Level } from "@lukehagar/plexjs/sdk/models/operations"; +import { logWriteMessage } from "@lukehagar/plexjs/funcs/logWriteMessage.js"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. const plexAPI = new PlexAPICore({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const res = await logLogLine(plexAPI, Level.Three, "Test log message", "Postman"); + const res = await logWriteMessage(plexAPI, {}); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("logLogLine failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `level` | [operations.Level](../../sdk/models/operations/level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with.
0: Error
1: Warning
2: Info
3: Debug
4: Verbose
| | -| `message` | *string* | :heavy_check_mark: | The text of the message to write to the log. | [object Object] | -| `source` | *string* | :heavy_check_mark: | a string indicating the source of the message. | [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. | | - -### Response - -**Promise\<[operations.LogLineResponse](../../sdk/models/operations/loglineresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.LogLineBadRequest | 400 | application/json | -| errors.LogLineUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## logMultiLine - -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. - - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.log.logMultiLine("level=4&message=Test%20message%201&source=postman\n" + - "level=3&message=Test%20message%202&source=postman\n" + - "level=1&message=Test%20message%203&source=postman"); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { logLogMultiLine } from "@lukehagar/plexjs/funcs/logLogMultiLine.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await logLogMultiLine(plexAPI, "level=4&message=Test%20message%201&source=postman\n" + - "level=3&message=Test%20message%202&source=postman\n" + - "level=1&message=Test%20message%203&source=postman"); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("logLogMultiLine failed:", res.error); + console.log("logWriteMessage failed:", res.error); } } @@ -167,40 +154,49 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [string](../../models/.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.WriteMessageRequest](../../sdk/models/operations/writemessagerequest.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. | ### Response -**Promise\<[operations.LogMultiLineResponse](../../sdk/models/operations/logmultilineresponse.md)\>** +**Promise\<[operations.WriteMessageResponse](../../sdk/models/operations/writemessageresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------- | ------------------------------- | ------------------------------- | -| errors.LogMultiLineBadRequest | 400 | application/json | -| errors.LogMultiLineUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | -## enablePaperTrail +## enablePapertrail -This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time. +This endpoint will enable all Plex Media Server logs to be sent to the Papertrail networked logging site for a period of time + +Note: This endpoint responds to all HTTP verbs but POST is preferred ### Example Usage - + ```typescript import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.log.enablePaperTrail(); + const result = await plexAPI.log.enablePapertrail({}); console.log(result); } @@ -214,21 +210,30 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { logEnablePaperTrail } from "@lukehagar/plexjs/funcs/logEnablePaperTrail.js"; +import { logEnablePapertrail } from "@lukehagar/plexjs/funcs/logEnablePapertrail.js"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. const plexAPI = new PlexAPICore({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const res = await logEnablePaperTrail(plexAPI); + const res = await logEnablePapertrail(plexAPI, {}); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("logEnablePaperTrail failed:", res.error); + console.log("logEnablePapertrail failed:", res.error); } } @@ -239,18 +244,17 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.EnablePapertrailRequest](../../sdk/models/operations/enablepapertrailrequest.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. | ### Response -**Promise\<[operations.EnablePaperTrailResponse](../../sdk/models/operations/enablepapertrailresponse.md)\>** +**Promise\<[operations.EnablePapertrailResponse](../../sdk/models/operations/enablepapertrailresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | -| errors.EnablePaperTrailBadRequest | 400 | application/json | -| errors.EnablePaperTrailUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/media/README.md b/docs/sdks/media/README.md deleted file mode 100644 index 2254f74d..00000000 --- a/docs/sdks/media/README.md +++ /dev/null @@ -1,401 +0,0 @@ -# Media -(*media*) - -## Overview - -API Calls interacting with Plex Media Server Media - - -### Available Operations - -* [markPlayed](#markplayed) - Mark Media Played -* [markUnplayed](#markunplayed) - Mark Media Unplayed -* [updatePlayProgress](#updateplayprogress) - Update Media Play Progress -* [getBannerImage](#getbannerimage) - Get Banner Image -* [getThumbImage](#getthumbimage) - Get Thumb Image - -## markPlayed - -This will mark the provided media key as Played. - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.media.markPlayed(59398); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { mediaMarkPlayed } from "@lukehagar/plexjs/funcs/mediaMarkPlayed.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await mediaMarkPlayed(plexAPI, 59398); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("mediaMarkPlayed failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `key` | *number* | :heavy_check_mark: | The media key to mark as played | [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. | | - -### Response - -**Promise\<[operations.MarkPlayedResponse](../../sdk/models/operations/markplayedresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------------- | ----------------------------- | ----------------------------- | -| errors.MarkPlayedBadRequest | 400 | application/json | -| errors.MarkPlayedUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## markUnplayed - -This will mark the provided media key as Unplayed. - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.media.markUnplayed(59398); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { mediaMarkUnplayed } from "@lukehagar/plexjs/funcs/mediaMarkUnplayed.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await mediaMarkUnplayed(plexAPI, 59398); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("mediaMarkUnplayed failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `key` | *number* | :heavy_check_mark: | The media key to mark as Unplayed | [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. | | - -### Response - -**Promise\<[operations.MarkUnplayedResponse](../../sdk/models/operations/markunplayedresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------- | ------------------------------- | ------------------------------- | -| errors.MarkUnplayedBadRequest | 400 | application/json | -| errors.MarkUnplayedUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## updatePlayProgress - -This API command can be used to update the play progress of a media item. - - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.media.updatePlayProgress("", 90000, "played"); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { mediaUpdatePlayProgress } from "@lukehagar/plexjs/funcs/mediaUpdatePlayProgress.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await mediaUpdatePlayProgress(plexAPI, "", 90000, "played"); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("mediaUpdatePlayProgress failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `key` | *string* | :heavy_check_mark: | the media key | | -| `time` | *number* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | [object Object] | -| `state` | *string* | :heavy_check_mark: | The playback state of the media item. | [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. | | - -### Response - -**Promise\<[operations.UpdatePlayProgressResponse](../../sdk/models/operations/updateplayprogressresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | -| errors.UpdatePlayProgressBadRequest | 400 | application/json | -| errors.UpdatePlayProgressUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getBannerImage - -Gets the banner image of the media item - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.media.getBannerImage({ - ratingKey: 9518, - width: 396, - height: 396, - minSize: 1, - upscale: 1, - xPlexToken: "CV5xoxjTpFKUzBTShsaf", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { mediaGetBannerImage } from "@lukehagar/plexjs/funcs/mediaGetBannerImage.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await mediaGetBannerImage(plexAPI, { - ratingKey: 9518, - width: 396, - height: 396, - minSize: 1, - upscale: 1, - xPlexToken: "CV5xoxjTpFKUzBTShsaf", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("mediaGetBannerImage failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetBannerImageRequest](../../sdk/models/operations/getbannerimagerequest.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. | - -### Response - -**Promise\<[operations.GetBannerImageResponse](../../sdk/models/operations/getbannerimageresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.GetBannerImageBadRequest | 400 | application/json | -| errors.GetBannerImageUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getThumbImage - -Gets the thumbnail image of the media item - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.media.getThumbImage({ - ratingKey: 9518, - width: 396, - height: 396, - minSize: 1, - upscale: 1, - xPlexToken: "CV5xoxjTpFKUzBTShsaf", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { mediaGetThumbImage } from "@lukehagar/plexjs/funcs/mediaGetThumbImage.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await mediaGetThumbImage(plexAPI, { - ratingKey: 9518, - width: 396, - height: 396, - minSize: 1, - upscale: 1, - xPlexToken: "CV5xoxjTpFKUzBTShsaf", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("mediaGetThumbImage failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetThumbImageRequest](../../sdk/models/operations/getthumbimagerequest.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. | - -### Response - -**Promise\<[operations.GetThumbImageResponse](../../sdk/models/operations/getthumbimageresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------------- | -------------------------------- | -------------------------------- | -| errors.GetThumbImageBadRequest | 400 | application/json | -| errors.GetThumbImageUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/playlist/README.md b/docs/sdks/playlist/README.md new file mode 100644 index 00000000..43623f6a --- /dev/null +++ b/docs/sdks/playlist/README.md @@ -0,0 +1,282 @@ +# Playlist +(*playlist*) + +## Overview + +Media playlists that can be created and played back + +### Available Operations + +* [listPlaylists](#listplaylists) - List playlists +* [getPlaylist](#getplaylist) - Retrieve Playlist +* [getPlaylistItems](#getplaylistitems) - Retrieve Playlist Contents + +## listPlaylists + +Gets a list of playlists and playlist folders for a user. General filters are permitted, such as `sort=lastViewedAt:desc`. A flat playlist list can be retrieved using `type=15` to limit the collection to just playlists. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.playlist.listPlaylists({}); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { playlistListPlaylists } from "@lukehagar/plexjs/funcs/playlistListPlaylists.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await playlistListPlaylists(plexAPI, {}); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("playlistListPlaylists failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListPlaylistsRequest](../../sdk/models/operations/listplaylistsrequest.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. | + +### Response + +**Promise\<[operations.ListPlaylistsResponse](../../sdk/models/operations/listplaylistsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getPlaylist + +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. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.playlist.getPlaylist({ + playlistId: 841953, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { playlistGetPlaylist } from "@lukehagar/plexjs/funcs/playlistGetPlaylist.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await playlistGetPlaylist(plexAPI, { + playlistId: 841953, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("playlistGetPlaylist failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPlaylistRequest](../../sdk/models/operations/getplaylistrequest.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. | + +### Response + +**Promise\<[operations.GetPlaylistResponse](../../sdk/models/operations/getplaylistresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getPlaylistItems + +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. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.playlist.getPlaylistItems({ + playlistId: 118195, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { playlistGetPlaylistItems } from "@lukehagar/plexjs/funcs/playlistGetPlaylistItems.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await playlistGetPlaylistItems(plexAPI, { + playlistId: 118195, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("playlistGetPlaylistItems failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPlaylistItemsRequest](../../sdk/models/operations/getplaylistitemsrequest.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. | + +### Response + +**Promise\<[operations.GetPlaylistItemsResponse](../../sdk/models/operations/getplaylistitemsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/playlists/README.md b/docs/sdks/playlists/README.md deleted file mode 100644 index 4bbb408d..00000000 --- a/docs/sdks/playlists/README.md +++ /dev/null @@ -1,700 +0,0 @@ -# Playlists -(*playlists*) - -## Overview - -Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017"). -They can be organized in (optionally nesting) folders. -Retrieving a playlist, or its items, will trigger a refresh of its metadata. -This may cause the duration and number of items to change. - - -### Available Operations - -* [createPlaylist](#createplaylist) - Create a Playlist -* [getPlaylists](#getplaylists) - Get All Playlists -* [getPlaylist](#getplaylist) - Retrieve Playlist -* [deletePlaylist](#deleteplaylist) - Deletes a Playlist -* [updatePlaylist](#updateplaylist) - Update a Playlist -* [getPlaylistContents](#getplaylistcontents) - Retrieve Playlist Contents -* [clearPlaylistContents](#clearplaylistcontents) - Delete Playlist Contents -* [addPlaylistContents](#addplaylistcontents) - Adding to a Playlist -* [uploadPlaylist](#uploadplaylist) - Upload Playlist - -## createPlaylist - -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. - - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; -import { CreatePlaylistQueryParamType, Smart } from "@lukehagar/plexjs/sdk/models/operations"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.playlists.createPlaylist({ - title: "", - type: CreatePlaylistQueryParamType.Audio, - smart: Smart.One, - uri: "https://short-term-disconnection.name/", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { playlistsCreatePlaylist } from "@lukehagar/plexjs/funcs/playlistsCreatePlaylist.js"; -import { CreatePlaylistQueryParamType, Smart } from "@lukehagar/plexjs/sdk/models/operations"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await playlistsCreatePlaylist(plexAPI, { - title: "", - type: CreatePlaylistQueryParamType.Audio, - smart: Smart.One, - uri: "https://short-term-disconnection.name/", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("playlistsCreatePlaylist failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreatePlaylistRequest](../../sdk/models/operations/createplaylistrequest.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. | - -### Response - -**Promise\<[operations.CreatePlaylistResponse](../../sdk/models/operations/createplaylistresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.CreatePlaylistBadRequest | 400 | application/json | -| errors.CreatePlaylistUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getPlaylists - -Get All Playlists given the specified filters. - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.playlists.getPlaylists(); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { playlistsGetPlaylists } from "@lukehagar/plexjs/funcs/playlistsGetPlaylists.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await playlistsGetPlaylists(plexAPI); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("playlistsGetPlaylists failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `playlistType` | [operations.PlaylistType](../../sdk/models/operations/playlisttype.md) | :heavy_minus_sign: | limit to a type of playlist. | -| `smart` | [operations.QueryParamSmart](../../sdk/models/operations/queryparamsmart.md) | :heavy_minus_sign: | type of playlists to return (default is all). | -| `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. | - -### Response - -**Promise\<[operations.GetPlaylistsResponse](../../sdk/models/operations/getplaylistsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------- | ------------------------------- | ------------------------------- | -| errors.GetPlaylistsBadRequest | 400 | application/json | -| errors.GetPlaylistsUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getPlaylist - -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. - - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.playlists.getPlaylist(8419.53); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { playlistsGetPlaylist } from "@lukehagar/plexjs/funcs/playlistsGetPlaylist.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await playlistsGetPlaylist(plexAPI, 8419.53); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("playlistsGetPlaylist failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | -| `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. | - -### Response - -**Promise\<[operations.GetPlaylistResponse](../../sdk/models/operations/getplaylistresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------ | ------------------------------ | ------------------------------ | -| errors.GetPlaylistBadRequest | 400 | application/json | -| errors.GetPlaylistUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## deletePlaylist - -This endpoint will delete a playlist - - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.playlists.deletePlaylist(3432.93); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { playlistsDeletePlaylist } from "@lukehagar/plexjs/funcs/playlistsDeletePlaylist.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await playlistsDeletePlaylist(plexAPI, 3432.93); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("playlistsDeletePlaylist failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | -| `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. | - -### Response - -**Promise\<[operations.DeletePlaylistResponse](../../sdk/models/operations/deleteplaylistresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.DeletePlaylistBadRequest | 400 | application/json | -| errors.DeletePlaylistUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## updatePlaylist - -From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}` - - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.playlists.updatePlaylist(1579.66); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { playlistsUpdatePlaylist } from "@lukehagar/plexjs/funcs/playlistsUpdatePlaylist.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await playlistsUpdatePlaylist(plexAPI, 1579.66); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("playlistsUpdatePlaylist failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | -| `title` | *string* | :heavy_minus_sign: | name of the playlist | -| `summary` | *string* | :heavy_minus_sign: | summary description of the playlist | -| `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. | - -### Response - -**Promise\<[operations.UpdatePlaylistResponse](../../sdk/models/operations/updateplaylistresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.UpdatePlaylistBadRequest | 400 | application/json | -| errors.UpdatePlaylistUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getPlaylistContents - -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. - - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; -import { GetPlaylistContentsQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.playlists.getPlaylistContents(5535.42, GetPlaylistContentsQueryParamType.TvShow); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { playlistsGetPlaylistContents } from "@lukehagar/plexjs/funcs/playlistsGetPlaylistContents.js"; -import { GetPlaylistContentsQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await playlistsGetPlaylistContents(plexAPI, 5535.42, GetPlaylistContentsQueryParamType.TvShow); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("playlistsGetPlaylistContents failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | | -| `type` | [operations.GetPlaylistContentsQueryParamType](../../sdk/models/operations/getplaylistcontentsqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
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
| [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. | | - -### Response - -**Promise\<[operations.GetPlaylistContentsResponse](../../sdk/models/operations/getplaylistcontentsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.GetPlaylistContentsBadRequest | 400 | application/json | -| errors.GetPlaylistContentsUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## clearPlaylistContents - -Clears a playlist, only works with dumb playlists. Returns the playlist. - - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.playlists.clearPlaylistContents(4137.37); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { playlistsClearPlaylistContents } from "@lukehagar/plexjs/funcs/playlistsClearPlaylistContents.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await playlistsClearPlaylistContents(plexAPI, 4137.37); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("playlistsClearPlaylistContents failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | -| `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. | - -### Response - -**Promise\<[operations.ClearPlaylistContentsResponse](../../sdk/models/operations/clearplaylistcontentsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| errors.ClearPlaylistContentsBadRequest | 400 | application/json | -| errors.ClearPlaylistContentsUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## addPlaylistContents - -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. - - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.playlists.addPlaylistContents(7013.44, "server://12345/com.plexapp.plugins.library/library/metadata/1", 123); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { playlistsAddPlaylistContents } from "@lukehagar/plexjs/funcs/playlistsAddPlaylistContents.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await playlistsAddPlaylistContents(plexAPI, 7013.44, "server://12345/com.plexapp.plugins.library/library/metadata/1", 123); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("playlistsAddPlaylistContents failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `playlistID` | *number* | :heavy_check_mark: | the ID of the playlist | | -| `uri` | *string* | :heavy_check_mark: | the content URI for the playlist | [object Object] | -| `playQueueID` | *number* | :heavy_minus_sign: | the play queue to add to a playlist | [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. | | - -### Response - -**Promise\<[operations.AddPlaylistContentsResponse](../../sdk/models/operations/addplaylistcontentsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.AddPlaylistContentsBadRequest | 400 | application/json | -| errors.AddPlaylistContentsUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## uploadPlaylist - -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. - - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; -import { QueryParamForce } from "@lukehagar/plexjs/sdk/models/operations"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.playlists.uploadPlaylist("/home/barkley/playlist.m3u", QueryParamForce.One, 1); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { playlistsUploadPlaylist } from "@lukehagar/plexjs/funcs/playlistsUploadPlaylist.js"; -import { QueryParamForce } from "@lukehagar/plexjs/sdk/models/operations"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await playlistsUploadPlaylist(plexAPI, "/home/barkley/playlist.m3u", QueryParamForce.One, 1); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("playlistsUploadPlaylist failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `path` | *string* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.
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.
| [object Object] | -| `force` | [operations.QueryParamForce](../../sdk/models/operations/queryparamforce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.
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.
| | -| `sectionID` | *number* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | [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. | | - -### Response - -**Promise\<[operations.UploadPlaylistResponse](../../sdk/models/operations/uploadplaylistresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.UploadPlaylistBadRequest | 400 | application/json | -| errors.UploadPlaylistUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/playqueue/README.md b/docs/sdks/playqueue/README.md new file mode 100644 index 00000000..e5993a5b --- /dev/null +++ b/docs/sdks/playqueue/README.md @@ -0,0 +1,873 @@ +# PlayQueue +(*playQueue*) + +## Overview + +The playqueue feature within a media provider +A play queue represents the current list of media for playback. Although queues are persisted by the server, they should be regarded by the user as a fairly lightweight, an ephemeral list of items queued up for playback in a session. There is generally one active queue for each type of media (music, video, photos) that can be added to or destroyed and replaced with a fresh queue. +Play Queues has a region, which we refer to in this doc (partially for historical reasons) as "Up Next". This region is defined by `playQueueLastAddedItemID` existing on the media container. This follows iTunes' terminology. It is a special region after the currently playing item but before the originally-played items. This enables "Party Mode" listening/viewing, where items can be added on-the-fly, and normal queue playback resumed when completed. +You can visualize the play queue as a sliding window in the complete list of media queued for playback. This model is important when scaling to larger play queues (e.g. shuffling 40,000 audio tracks). The client only needs visibility into small areas of the queue at any given time, and the server can optimize access in this fashion. +All created play queues will have an empty "Up Next" area - unless the item is an album and no `key` is provided. In this case the "Up Next" area will be populated by the contents of the album. This is to allow queueing of multiple albums - since the 'Add to Up Next' will insert after all the tracks. This means that If you're creating a PQ from an album, you can only shuffle it if you set `key`. This is due to the above implicit queueing of albums when no `key` is provided as well as the current limitation that you cannot shuffle a PQ with an "Up Next" area. +The play queue window advances as the server receives timeline requests. The client needs to retrieve the play queue as the “now playing” item changes. There is no play queue API to update the playing item. + +### Available Operations + +* [createPlayQueue](#createplayqueue) - Create a play queue +* [getPlayQueue](#getplayqueue) - Retrieve a play queue +* [addToPlayQueue](#addtoplayqueue) - Add a generator or playlist to a play queue +* [clearPlayQueue](#clearplayqueue) - Clear a play queue +* [resetPlayQueue](#resetplayqueue) - Reset a play queue +* [shuffle](#shuffle) - Shuffle a play queue +* [unshuffle](#unshuffle) - Unshuffle a play queue +* [deletePlayQueueItem](#deleteplayqueueitem) - Delete an item from a play queue +* [movePlayQueueItem](#moveplayqueueitem) - Move an item in a play queue + +## createPlayQueue + +Makes a new play queue for a device. The source of the playqueue can either be a URI, or a playlist. The response is a media container with the initial items in the queue. Each item in the queue will be a regular item but with `playQueueItemID` - a unique ID since the queue could have repeated items with the same `ratingKey`. +Note: Either `uri` or `playlistID` must be specified + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { CreatePlayQueueType } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.playQueue.createPlayQueue({ + type: CreatePlayQueueType.Audio, + shuffle: BoolInt.One, + repeat: BoolInt.One, + continuous: BoolInt.One, + recursive: BoolInt.One, + onDeck: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { playQueueCreatePlayQueue } from "@lukehagar/plexjs/funcs/playQueueCreatePlayQueue.js"; +import { CreatePlayQueueType } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await playQueueCreatePlayQueue(plexAPI, { + type: CreatePlayQueueType.Audio, + shuffle: BoolInt.One, + repeat: BoolInt.One, + continuous: BoolInt.One, + recursive: BoolInt.One, + onDeck: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("playQueueCreatePlayQueue failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreatePlayQueueRequest](../../sdk/models/operations/createplayqueuerequest.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. | + +### Response + +**Promise\<[operations.CreatePlayQueueResponse](../../sdk/models/operations/createplayqueueresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getPlayQueue + +Retrieves the play queue, centered at current item. This can be treated as a regular container by play queue-oblivious clients, but they may wish to request a large window onto the queue since they won't know to refresh. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.playQueue.getPlayQueue({ + playQueueId: 210646, + own: BoolInt.One, + includeBefore: BoolInt.One, + includeAfter: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { playQueueGetPlayQueue } from "@lukehagar/plexjs/funcs/playQueueGetPlayQueue.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await playQueueGetPlayQueue(plexAPI, { + playQueueId: 210646, + own: BoolInt.One, + includeBefore: BoolInt.One, + includeAfter: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("playQueueGetPlayQueue failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPlayQueueRequest](../../sdk/models/operations/getplayqueuerequest.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. | + +### Response + +**Promise\<[operations.GetPlayQueueResponse](../../sdk/models/operations/getplayqueueresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## addToPlayQueue + +Adds an item to a play queue (e.g. party mode). Increments the version of the play queue. Takes the following parameters (`uri` and `playlistID` are mutually exclusive). Returns the modified play queue. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.playQueue.addToPlayQueue({ + playQueueId: 919248, + next: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { playQueueAddToPlayQueue } from "@lukehagar/plexjs/funcs/playQueueAddToPlayQueue.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await playQueueAddToPlayQueue(plexAPI, { + playQueueId: 919248, + next: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("playQueueAddToPlayQueue failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AddToPlayQueueRequest](../../sdk/models/operations/addtoplayqueuerequest.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. | + +### Response + +**Promise\<[operations.AddToPlayQueueResponse](../../sdk/models/operations/addtoplayqueueresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## clearPlayQueue + +Deletes all items in the play queue, and increases the version of the play queue. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.playQueue.clearPlayQueue({ + playQueueId: 86357, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { playQueueClearPlayQueue } from "@lukehagar/plexjs/funcs/playQueueClearPlayQueue.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await playQueueClearPlayQueue(plexAPI, { + playQueueId: 86357, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("playQueueClearPlayQueue failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ClearPlayQueueRequest](../../sdk/models/operations/clearplayqueuerequest.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. | + +### Response + +**Promise\<[operations.ClearPlayQueueResponse](../../sdk/models/operations/clearplayqueueresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## resetPlayQueue + +Reset a play queue to the first item being the current item + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.playQueue.resetPlayQueue({ + playQueueId: 581891, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { playQueueResetPlayQueue } from "@lukehagar/plexjs/funcs/playQueueResetPlayQueue.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await playQueueResetPlayQueue(plexAPI, { + playQueueId: 581891, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("playQueueResetPlayQueue failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ResetPlayQueueRequest](../../sdk/models/operations/resetplayqueuerequest.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. | + +### Response + +**Promise\<[operations.ResetPlayQueueResponse](../../sdk/models/operations/resetplayqueueresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## shuffle + +Shuffle a play queue (or reshuffles if already shuffled). The currently selected item is maintained. Note that this is currently only supported for play queues *without* an Up Next area. Returns the modified play queue. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.playQueue.shuffle({ + playQueueId: 316150, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { playQueueShuffle } from "@lukehagar/plexjs/funcs/playQueueShuffle.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await playQueueShuffle(plexAPI, { + playQueueId: 316150, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("playQueueShuffle failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ShuffleRequest](../../sdk/models/operations/shufflerequest.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. | + +### Response + +**Promise\<[operations.ShuffleResponse](../../sdk/models/operations/shuffleresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## unshuffle + +Unshuffles a play queue and restores "natural order". Note that this is currently only supported for play queues *without* an Up Next area. Returns the modified play queue. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.playQueue.unshuffle({ + playQueueId: 484388, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { playQueueUnshuffle } from "@lukehagar/plexjs/funcs/playQueueUnshuffle.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await playQueueUnshuffle(plexAPI, { + playQueueId: 484388, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("playQueueUnshuffle failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UnshuffleRequest](../../sdk/models/operations/unshufflerequest.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. | + +### Response + +**Promise\<[operations.UnshuffleResponse](../../sdk/models/operations/unshuffleresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deletePlayQueueItem + +Deletes an item in a play queue. Increments the version of the play queue. Returns the modified play queue. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.playQueue.deletePlayQueueItem({ + playQueueId: 285738, + playQueueItemId: 464354, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { playQueueDeletePlayQueueItem } from "@lukehagar/plexjs/funcs/playQueueDeletePlayQueueItem.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await playQueueDeletePlayQueueItem(plexAPI, { + playQueueId: 285738, + playQueueItemId: 464354, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("playQueueDeletePlayQueueItem failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeletePlayQueueItemRequest](../../sdk/models/operations/deleteplayqueueitemrequest.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. | + +### Response + +**Promise\<[operations.DeletePlayQueueItemResponse](../../sdk/models/operations/deleteplayqueueitemresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## movePlayQueueItem + +Moves an item in a play queue, and increases the version of the play queue. Returns the modified play queue. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.playQueue.movePlayQueueItem({ + playQueueId: 31341, + playQueueItemId: 495865, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { playQueueMovePlayQueueItem } from "@lukehagar/plexjs/funcs/playQueueMovePlayQueueItem.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await playQueueMovePlayQueueItem(plexAPI, { + playQueueId: 31341, + playQueueItemId: 495865, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("playQueueMovePlayQueueItem failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MovePlayQueueItemRequest](../../sdk/models/operations/moveplayqueueitemrequest.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. | + +### Response + +**Promise\<[operations.MovePlayQueueItemResponse](../../sdk/models/operations/moveplayqueueitemresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/plex/README.md b/docs/sdks/plex/README.md deleted file mode 100644 index 899570c1..00000000 --- a/docs/sdks/plex/README.md +++ /dev/null @@ -1,532 +0,0 @@ -# Plex -(*plex*) - -## Overview - -API Calls that perform operations directly against https://Plex.tv - - -### Available Operations - -* [getCompanionsData](#getcompanionsdata) - Get Companions Data -* [getUserFriends](#getuserfriends) - Get list of friends of the user logged in -* [getGeoData](#getgeodata) - Get Geo Data -* [getHomeData](#gethomedata) - Get Plex Home Data -* [getServerResources](#getserverresources) - Get Server Resources -* [getPin](#getpin) - Get a Pin -* [getTokenByPinId](#gettokenbypinid) - Get Access Token by PinId - -## getCompanionsData - -Get Companions Data - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.plex.getCompanionsData(); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { plexGetCompanionsData } from "@lukehagar/plexjs/funcs/plexGetCompanionsData.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await plexGetCompanionsData(plexAPI); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("plexGetCompanionsData failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| 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.GetCompanionsDataResponse](../../sdk/models/operations/getcompanionsdataresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | -| errors.GetCompanionsDataBadRequest | 400 | application/json | -| errors.GetCompanionsDataUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getUserFriends - -Get friends of provided auth token. - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.plex.getUserFriends(); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { plexGetUserFriends } from "@lukehagar/plexjs/funcs/plexGetUserFriends.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await plexGetUserFriends(plexAPI); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("plexGetUserFriends failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| 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.GetUserFriendsResponse](../../sdk/models/operations/getuserfriendsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.GetUserFriendsBadRequest | 400 | application/json | -| errors.GetUserFriendsUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getGeoData - -Returns the geolocation and locale data of the caller - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI(); - -async function run() { - const result = await plexAPI.plex.getGeoData(); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { plexGetGeoData } from "@lukehagar/plexjs/funcs/plexGetGeoData.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore(); - -async function run() { - const res = await plexGetGeoData(plexAPI); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("plexGetGeoData failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| 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.GetGeoDataResponse](../../sdk/models/operations/getgeodataresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------------- | ----------------------------- | ----------------------------- | -| errors.GetGeoDataBadRequest | 400 | application/json | -| errors.GetGeoDataUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getHomeData - -Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status. - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.plex.getHomeData(); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { plexGetHomeData } from "@lukehagar/plexjs/funcs/plexGetHomeData.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await plexGetHomeData(plexAPI); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("plexGetHomeData failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| 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. | - -### Response - -**Promise\<[operations.GetHomeDataResponse](../../sdk/models/operations/gethomedataresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------ | ------------------------------ | ------------------------------ | -| errors.GetHomeDataBadRequest | 400 | application/json | -| errors.GetHomeDataUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getServerResources - -Get Plex server access tokens and server connections - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.plex.getServerResources("3381b62b-9ab7-4e37-827b-203e9809eb58"); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { plexGetServerResources } from "@lukehagar/plexjs/funcs/plexGetServerResources.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await plexGetServerResources(plexAPI, "3381b62b-9ab7-4e37-827b-203e9809eb58"); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("plexGetServerResources failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `clientID` | *string* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | [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 - -**Promise\<[operations.GetServerResourcesResponse](../../sdk/models/operations/getserverresourcesresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | -| errors.GetServerResourcesBadRequest | 400 | application/json | -| errors.GetServerResourcesUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getPin - -Retrieve a Pin ID from Plex.tv to use for authentication flows - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI(); - -async function run() { - const result = await plexAPI.plex.getPin({ - clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", - clientName: "Plex for Roku", - deviceNickname: "Roku 3", - clientVersion: "2.4.1", - platform: "Roku", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { plexGetPin } from "@lukehagar/plexjs/funcs/plexGetPin.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore(); - -async function run() { - const res = await plexGetPin(plexAPI, { - clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", - clientName: "Plex for Roku", - deviceNickname: "Roku 3", - clientVersion: "2.4.1", - platform: "Roku", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("plexGetPin failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetPinRequest](../../sdk/models/operations/getpinrequest.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. | - -### Response - -**Promise\<[operations.GetPinResponse](../../sdk/models/operations/getpinresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| errors.GetPinBadRequest | 400 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getTokenByPinId - -Retrieve an Access Token from Plex.tv after the Pin has been authenticated - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI(); - -async function run() { - const result = await plexAPI.plex.getTokenByPinId({ - pinID: 232248, - clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", - clientName: "Plex for Roku", - deviceNickname: "Roku 3", - clientVersion: "2.4.1", - platform: "Roku", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { plexGetTokenByPinId } from "@lukehagar/plexjs/funcs/plexGetTokenByPinId.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore(); - -async function run() { - const res = await plexGetTokenByPinId(plexAPI, { - pinID: 232248, - clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", - clientName: "Plex for Roku", - deviceNickname: "Roku 3", - clientVersion: "2.4.1", - platform: "Roku", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("plexGetTokenByPinId failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTokenByPinIdRequest](../../sdk/models/operations/gettokenbypinidrequest.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. | - -### Response - -**Promise\<[operations.GetTokenByPinIdResponse](../../sdk/models/operations/gettokenbypinidresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.GetTokenByPinIdBadRequest | 400 | application/json | -| errors.GetTokenByPinIdResponseBody | 404 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/plexapi/README.md b/docs/sdks/plexapi/README.md deleted file mode 100644 index 1e395e44..00000000 --- a/docs/sdks/plexapi/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# PlexAPI SDK - -## Overview - -# Plex Media Server OpenAPI Specification - -An Open Source OpenAPI Specification for Plex Media Server - -Automation and SDKs provided by [Speakeasy](https://speakeasyapi.dev/) - -## Documentation - -[API Documentation](https://plexapi.dev) - -## SDKs - -The following SDKs are generated from the OpenAPI Specification. They are automatically generated and may not be fully tested. If you find any issues, please open an issue on the [main specification Repository](https://github.com/LukeHagar/plex-api-spec). - -| Language | Repository | Releases | Other | -| --------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------- | -| Python | [GitHub](https://github.com/LukeHagar/plexpy) | [PyPI](https://pypi.org/project/plex-api-client/) | - | -| JavaScript/TypeScript | [GitHub](https://github.com/LukeHagar/plexjs) | [NPM](https://www.npmjs.com/package/@lukehagar/plexjs) \ [JSR](https://jsr.io/@lukehagar/plexjs) | - | -| Go | [GitHub](https://github.com/LukeHagar/plexgo) | [Releases](https://github.com/LukeHagar/plexgo/releases) | [GoDoc](https://pkg.go.dev/github.com/LukeHagar/plexgo) | -| Ruby | [GitHub](https://github.com/LukeHagar/plexruby) | [Releases](https://github.com/LukeHagar/plexruby/releases) | - | -| Swift | [GitHub](https://github.com/LukeHagar/plexswift) | [Releases](https://github.com/LukeHagar/plexswift/releases) | - | -| PHP | [GitHub](https://github.com/LukeHagar/plexphp) | [Releases](https://github.com/LukeHagar/plexphp/releases) | - | -| Java | [GitHub](https://github.com/LukeHagar/plexjava) | [Releases](https://github.com/LukeHagar/plexjava/releases) | - | -| C# | [GitHub](https://github.com/LukeHagar/plexcsharp) | [Releases](https://github.com/LukeHagar/plexcsharp/releases) | - - - -### Available Operations diff --git a/docs/sdks/preferences/README.md b/docs/sdks/preferences/README.md new file mode 100644 index 00000000..f6c73f4f --- /dev/null +++ b/docs/sdks/preferences/README.md @@ -0,0 +1,254 @@ +# Preferences +(*preferences*) + +## Overview + +API Operations against the Preferences + +### Available Operations + +* [getAllPreferences](#getallpreferences) - Get all preferences +* [setPreferences](#setpreferences) - Set preferences +* [getPreference](#getpreference) - Get a preferences + +## getAllPreferences + +Get the list of all preferences + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI(); + +async function run() { + const result = await plexAPI.preferences.getAllPreferences(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { preferencesGetAllPreferences } from "@lukehagar/plexjs/funcs/preferencesGetAllPreferences.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore(); + +async function run() { + const res = await preferencesGetAllPreferences(plexAPI); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("preferencesGetAllPreferences failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| 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. | + +### Response + +**Promise\<[operations.GetAllPreferencesResponse](../../sdk/models/operations/getallpreferencesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## setPreferences + +Set a set of preferences in query parameters + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.preferences.setPreferences({ + prefs: {}, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { preferencesSetPreferences } from "@lukehagar/plexjs/funcs/preferencesSetPreferences.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await preferencesSetPreferences(plexAPI, { + prefs: {}, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("preferencesSetPreferences failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SetPreferencesRequest](../../sdk/models/operations/setpreferencesrequest.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. | + +### Response + +**Promise\<[operations.SetPreferencesResponse](../../sdk/models/operations/setpreferencesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getPreference + +Get a single preference and value + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.preferences.getPreference({}); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { preferencesGetPreference } from "@lukehagar/plexjs/funcs/preferencesGetPreference.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await preferencesGetPreference(plexAPI, {}); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("preferencesGetPreference failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPreferenceRequest](../../sdk/models/operations/getpreferencerequest.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. | + +### Response + +**Promise\<[operations.GetPreferenceResponse](../../sdk/models/operations/getpreferenceresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/provider/README.md b/docs/sdks/provider/README.md new file mode 100644 index 00000000..82643b9f --- /dev/null +++ b/docs/sdks/provider/README.md @@ -0,0 +1,323 @@ +# Provider +(*provider*) + +## Overview + +Media providers are the starting points for the entire Plex Media Server media library API. It defines the paths for the groups of endpoints. The `/media/providers` should be the only hard-coded path in clients when accessing the media library. Non-media library endpoints are outside the scope of the media provider. See the description in See [the section in API Info](#section/API-Info/Media-Providers) for more information on how to use media providers. + +### Available Operations + +* [listProviders](#listproviders) - Get the list of available media providers +* [addProvider](#addprovider) - Add a media provider +* [refreshProviders](#refreshproviders) - Refresh media providers +* [deleteMediaProvider](#deletemediaprovider) - Delete a media provider + +## listProviders + +Get the list of all available media providers for this PMS. This will generally include the library provider and possibly EPG if DVR is set up. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI(); + +async function run() { + const result = await plexAPI.provider.listProviders(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { providerListProviders } from "@lukehagar/plexjs/funcs/providerListProviders.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore(); + +async function run() { + const res = await providerListProviders(plexAPI); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("providerListProviders failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| 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. | + +### Response + +**Promise\<[operations.ListProvidersResponse](../../sdk/models/operations/listprovidersresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## addProvider + +This endpoint registers a media provider with the server. Once registered, the media server acts as a reverse proxy to the provider, allowing both local and remote providers to work. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.provider.addProvider({ + url: "https://steep-obedience.name/", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { providerAddProvider } from "@lukehagar/plexjs/funcs/providerAddProvider.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await providerAddProvider(plexAPI, { + url: "https://steep-obedience.name/", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("providerAddProvider failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AddProviderRequest](../../sdk/models/operations/addproviderrequest.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. | + +### Response + +**Promise\<[operations.AddProviderResponse](../../sdk/models/operations/addproviderresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## refreshProviders + +Refresh all known media providers. This is useful in case a provider has updated features. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI(); + +async function run() { + const result = await plexAPI.provider.refreshProviders(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { providerRefreshProviders } from "@lukehagar/plexjs/funcs/providerRefreshProviders.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore(); + +async function run() { + const res = await providerRefreshProviders(plexAPI); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("providerRefreshProviders failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| 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. | + +### Response + +**Promise\<[operations.RefreshProvidersResponse](../../sdk/models/operations/refreshprovidersresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deleteMediaProvider + +Deletes a media provider with the given id + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.provider.deleteMediaProvider({ + provider: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { providerDeleteMediaProvider } from "@lukehagar/plexjs/funcs/providerDeleteMediaProvider.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await providerDeleteMediaProvider(plexAPI, { + provider: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("providerDeleteMediaProvider failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteMediaProviderRequest](../../sdk/models/operations/deletemediaproviderrequest.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. | + +### Response + +**Promise\<[operations.DeleteMediaProviderResponse](../../sdk/models/operations/deletemediaproviderresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/rate/README.md b/docs/sdks/rate/README.md new file mode 100644 index 00000000..a5df27a2 --- /dev/null +++ b/docs/sdks/rate/README.md @@ -0,0 +1,106 @@ +# Rate +(*rate*) + +## Overview + +Operations for rating media items (thumbs up/down, star ratings, etc.) + +### Available Operations + +* [setRating](#setrating) - Rate an item + +## setRating + +Set the rating on an item. +This API does respond to the GET verb but applications should use PUT + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.rate.setRating({ + identifier: "", + key: "", + rating: 8722.46, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { rateSetRating } from "@lukehagar/plexjs/funcs/rateSetRating.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await rateSetRating(plexAPI, { + identifier: "", + key: "", + rating: 8722.46, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("rateSetRating failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SetRatingRequest](../../sdk/models/operations/setratingrequest.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. | + +### Response + +**Promise\<[operations.SetRatingResponse](../../sdk/models/operations/setratingresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 67a45476..7772b01c 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -3,16 +3,16 @@ ## Overview -API Calls that perform search operations with Plex Media Server - +The search feature within a media provider ### Available Operations -* [performSearch](#performsearch) - Perform a search -* [performVoiceSearch](#performvoicesearch) - Perform a voice search -* [getSearchResults](#getsearchresults) - Get Search Results +* [searchHubs](#searchhubs) - Search Hub +* [voiceSearchHubs](#voicesearchhubs) - Voice Search Hub -## performSearch +## searchHubs + +Perform a search and get the result as hubs 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). @@ -30,16 +30,28 @@ This request is intended to be very fast, and called as the user types. ### Example Usage - + ```typescript import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.search.performSearch("arnold"); + const result = await plexAPI.search.searchHubs({ + query: "", + sectionId: 1, + }); console.log(result); } @@ -53,21 +65,33 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { searchPerformSearch } from "@lukehagar/plexjs/funcs/searchPerformSearch.js"; +import { searchSearchHubs } from "@lukehagar/plexjs/funcs/searchSearchHubs.js"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. const plexAPI = new PlexAPICore({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const res = await searchPerformSearch(plexAPI, "arnold"); + const res = await searchSearchHubs(plexAPI, { + query: "", + sectionId: 1, + }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("searchPerformSearch failed:", res.error); + console.log("searchSearchHubs failed:", res.error); } } @@ -76,47 +100,55 @@ run(); ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `query` | *string* | :heavy_check_mark: | The query term | [object Object] | -| `sectionId` | *number* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs | | -| `limit` | *number* | :heavy_minus_sign: | The number of items to return per hub | [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. | | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SearchHubsRequest](../../sdk/models/operations/searchhubsrequest.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. | ### Response -**Promise\<[operations.PerformSearchResponse](../../sdk/models/operations/performsearchresponse.md)\>** +**Promise\<[operations.SearchHubsResponse](../../sdk/models/operations/searchhubsresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------- | -------------------------------- | -------------------------------- | -| errors.PerformSearchBadRequest | 400 | application/json | -| errors.PerformSearchUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | -## performVoiceSearch +## voiceSearchHubs + +Perform a search tailored to voice input and get the result as hubs + +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. -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. ### Example Usage - + ```typescript import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.search.performVoiceSearch("dead+poop"); + const result = await plexAPI.search.voiceSearchHubs({ + query: "", + }); console.log(result); } @@ -130,21 +162,32 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { searchPerformVoiceSearch } from "@lukehagar/plexjs/funcs/searchPerformVoiceSearch.js"; +import { searchVoiceSearchHubs } from "@lukehagar/plexjs/funcs/searchVoiceSearchHubs.js"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. const plexAPI = new PlexAPICore({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const res = await searchPerformVoiceSearch(plexAPI, "dead+poop"); + const res = await searchVoiceSearchHubs(plexAPI, { + query: "", + }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("searchPerformVoiceSearch failed:", res.error); + console.log("searchVoiceSearchHubs failed:", res.error); } } @@ -153,94 +196,19 @@ run(); ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `query` | *string* | :heavy_check_mark: | The query term | [object Object] | -| `sectionId` | *number* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs | | -| `limit` | *number* | :heavy_minus_sign: | The number of items to return per hub | [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. | | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.VoiceSearchHubsRequest](../../sdk/models/operations/voicesearchhubsrequest.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. | ### Response -**Promise\<[operations.PerformVoiceSearchResponse](../../sdk/models/operations/performvoicesearchresponse.md)\>** +**Promise\<[operations.VoiceSearchHubsResponse](../../sdk/models/operations/voicesearchhubsresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | -| errors.PerformVoiceSearchBadRequest | 400 | application/json | -| errors.PerformVoiceSearchUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getSearchResults - -This will search the database for the string provided. - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.search.getSearchResults("110"); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { searchGetSearchResults } from "@lukehagar/plexjs/funcs/searchGetSearchResults.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await searchGetSearchResults(plexAPI, "110"); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("searchGetSearchResults failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `query` | *string* | :heavy_check_mark: | The search query string to use | [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. | | - -### Response - -**Promise\<[operations.GetSearchResultsResponse](../../sdk/models/operations/getsearchresultsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | -| errors.GetSearchResultsBadRequest | 400 | application/json | -| errors.GetSearchResultsUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md deleted file mode 100644 index 2a947cf8..00000000 --- a/docs/sdks/server/README.md +++ /dev/null @@ -1,663 +0,0 @@ -# Server -(*server*) - -## Overview - -Operations against the Plex Media Server System. - - -### Available Operations - -* [getServerCapabilities](#getservercapabilities) - Get Server Capabilities -* [getServerPreferences](#getserverpreferences) - Get Server Preferences -* [getAvailableClients](#getavailableclients) - Get Available Clients -* [getDevices](#getdevices) - Get Devices -* [getServerIdentity](#getserveridentity) - Get Server Identity -* [getMyPlexAccount](#getmyplexaccount) - Get MyPlex Account -* [getResizedPhoto](#getresizedphoto) - Get a Resized Photo -* [getMediaProviders](#getmediaproviders) - Get Media Providers -* [getServerList](#getserverlist) - Get Server List - -## getServerCapabilities - -Get Server Capabilities - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.server.getServerCapabilities(); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { serverGetServerCapabilities } from "@lukehagar/plexjs/funcs/serverGetServerCapabilities.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await serverGetServerCapabilities(plexAPI); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("serverGetServerCapabilities failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| 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. | - -### Response - -**Promise\<[operations.GetServerCapabilitiesResponse](../../sdk/models/operations/getservercapabilitiesresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| errors.GetServerCapabilitiesBadRequest | 400 | application/json | -| errors.GetServerCapabilitiesUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getServerPreferences - -Get Server Preferences - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.server.getServerPreferences(); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { serverGetServerPreferences } from "@lukehagar/plexjs/funcs/serverGetServerPreferences.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await serverGetServerPreferences(plexAPI); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("serverGetServerPreferences failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| 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. | - -### Response - -**Promise\<[operations.GetServerPreferencesResponse](../../sdk/models/operations/getserverpreferencesresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | -| errors.GetServerPreferencesBadRequest | 400 | application/json | -| errors.GetServerPreferencesUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getAvailableClients - -Get Available Clients - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.server.getAvailableClients(); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { serverGetAvailableClients } from "@lukehagar/plexjs/funcs/serverGetAvailableClients.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await serverGetAvailableClients(plexAPI); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("serverGetAvailableClients failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| 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. | - -### Response - -**Promise\<[operations.GetAvailableClientsResponse](../../sdk/models/operations/getavailableclientsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.GetAvailableClientsBadRequest | 400 | application/json | -| errors.GetAvailableClientsUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getDevices - -Get Devices - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.server.getDevices(); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { serverGetDevices } from "@lukehagar/plexjs/funcs/serverGetDevices.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await serverGetDevices(plexAPI); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("serverGetDevices failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| 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. | - -### Response - -**Promise\<[operations.GetDevicesResponse](../../sdk/models/operations/getdevicesresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------------- | ----------------------------- | ----------------------------- | -| errors.GetDevicesBadRequest | 400 | application/json | -| errors.GetDevicesUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getServerIdentity - -This request is useful to determine if the server is online or offline - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI(); - -async function run() { - const result = await plexAPI.server.getServerIdentity(); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { serverGetServerIdentity } from "@lukehagar/plexjs/funcs/serverGetServerIdentity.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore(); - -async function run() { - const res = await serverGetServerIdentity(plexAPI); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("serverGetServerIdentity failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| 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. | - -### Response - -**Promise\<[operations.GetServerIdentityResponse](../../sdk/models/operations/getserveridentityresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.GetServerIdentityRequestTimeout | 408 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getMyPlexAccount - -Returns MyPlex Account Information - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.server.getMyPlexAccount(); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { serverGetMyPlexAccount } from "@lukehagar/plexjs/funcs/serverGetMyPlexAccount.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await serverGetMyPlexAccount(plexAPI); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("serverGetMyPlexAccount failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| 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. | - -### Response - -**Promise\<[operations.GetMyPlexAccountResponse](../../sdk/models/operations/getmyplexaccountresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | -| errors.GetMyPlexAccountBadRequest | 400 | application/json | -| errors.GetMyPlexAccountUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getResizedPhoto - -Plex's Photo transcoder is used throughout the service to serve images at specified sizes. - - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; -import { MinSize, Upscale } from "@lukehagar/plexjs/sdk/models/operations"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.server.getResizedPhoto({ - width: 110, - height: 165, - blur: 0, - minSize: MinSize.Zero, - upscale: Upscale.Zero, - url: "/library/metadata/49564/thumb/1654258204", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { serverGetResizedPhoto } from "@lukehagar/plexjs/funcs/serverGetResizedPhoto.js"; -import { MinSize, Upscale } from "@lukehagar/plexjs/sdk/models/operations"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await serverGetResizedPhoto(plexAPI, { - width: 110, - height: 165, - blur: 0, - minSize: MinSize.Zero, - upscale: Upscale.Zero, - url: "/library/metadata/49564/thumb/1654258204", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("serverGetResizedPhoto failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetResizedPhotoRequest](../../sdk/models/operations/getresizedphotorequest.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. | - -### Response - -**Promise\<[operations.GetResizedPhotoResponse](../../sdk/models/operations/getresizedphotoresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.GetResizedPhotoBadRequest | 400 | application/json | -| errors.GetResizedPhotoUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getMediaProviders - -Retrieves media providers and their features from the Plex server. - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.server.getMediaProviders("CV5xoxjTpFKUzBTShsaf"); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { serverGetMediaProviders } from "@lukehagar/plexjs/funcs/serverGetMediaProviders.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await serverGetMediaProviders(plexAPI, "CV5xoxjTpFKUzBTShsaf"); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("serverGetMediaProviders failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `xPlexToken` | *string* | :heavy_check_mark: | An authentication token, obtained from plex.tv | [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. | | - -### Response - -**Promise\<[operations.GetMediaProvidersResponse](../../sdk/models/operations/getmediaprovidersresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | -| errors.GetMediaProvidersBadRequest | 400 | application/json | -| errors.GetMediaProvidersUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getServerList - -Get Server List - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.server.getServerList(); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { serverGetServerList } from "@lukehagar/plexjs/funcs/serverGetServerList.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await serverGetServerList(plexAPI); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("serverGetServerList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| 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. | - -### Response - -**Promise\<[operations.GetServerListResponse](../../sdk/models/operations/getserverlistresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------------- | -------------------------------- | -------------------------------- | -| errors.GetServerListBadRequest | 400 | application/json | -| errors.GetServerListUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/sessions/README.md b/docs/sdks/sessions/README.md deleted file mode 100644 index 237dfb14..00000000 --- a/docs/sdks/sessions/README.md +++ /dev/null @@ -1,299 +0,0 @@ -# Sessions -(*sessions*) - -## Overview - -API Calls that perform search operations with Plex Media Server Sessions - - -### Available Operations - -* [getSessions](#getsessions) - Get Active Sessions -* [getSessionHistory](#getsessionhistory) - Get Session History -* [getTranscodeSessions](#gettranscodesessions) - Get Transcode Sessions -* [stopTranscodeSession](#stoptranscodesession) - Stop a Transcode Session - -## getSessions - -This will retrieve the "Now Playing" Information of the PMS. - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.sessions.getSessions(); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { sessionsGetSessions } from "@lukehagar/plexjs/funcs/sessionsGetSessions.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await sessionsGetSessions(plexAPI); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("sessionsGetSessions failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| 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. | - -### Response - -**Promise\<[operations.GetSessionsResponse](../../sdk/models/operations/getsessionsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------ | ------------------------------ | ------------------------------ | -| errors.GetSessionsBadRequest | 400 | application/json | -| errors.GetSessionsUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getSessionHistory - -This will Retrieve a listing of all history views. - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.sessions.getSessionHistory("viewedAt:desc", 1, {}, 12); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { sessionsGetSessionHistory } from "@lukehagar/plexjs/funcs/sessionsGetSessionHistory.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await sessionsGetSessionHistory(plexAPI, "viewedAt:desc", 1, {}, 12); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("sessionsGetSessionHistory failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `sort` | *string* | :heavy_minus_sign: | Sorts the results by the specified field followed by the direction (asc, desc)
| | -| `accountId` | *number* | :heavy_minus_sign: | Filter results by those that are related to a specific users id
| [object Object] | -| `filter` | [operations.QueryParamFilter](../../sdk/models/operations/queryparamfilter.md) | :heavy_minus_sign: | Filters content by field and direction/equality
(Unknown if viewedAt is the only supported column)
| [object Object] | -| `librarySectionID` | *number* | :heavy_minus_sign: | Filters the results based on the id of a valid library section
| [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. | | - -### Response - -**Promise\<[operations.GetSessionHistoryResponse](../../sdk/models/operations/getsessionhistoryresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | -| errors.GetSessionHistoryBadRequest | 400 | application/json | -| errors.GetSessionHistoryUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getTranscodeSessions - -Get Transcode Sessions - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.sessions.getTranscodeSessions(); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { sessionsGetTranscodeSessions } from "@lukehagar/plexjs/funcs/sessionsGetTranscodeSessions.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await sessionsGetTranscodeSessions(plexAPI); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("sessionsGetTranscodeSessions failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| 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. | - -### Response - -**Promise\<[operations.GetTranscodeSessionsResponse](../../sdk/models/operations/gettranscodesessionsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | -| errors.GetTranscodeSessionsBadRequest | 400 | application/json | -| errors.GetTranscodeSessionsUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## stopTranscodeSession - -Stop a Transcode Session - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.sessions.stopTranscodeSession("zz7llzqlx8w9vnrsbnwhbmep"); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { sessionsStopTranscodeSession } from "@lukehagar/plexjs/funcs/sessionsStopTranscodeSession.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await sessionsStopTranscodeSession(plexAPI, "zz7llzqlx8w9vnrsbnwhbmep"); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("sessionsStopTranscodeSession failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `sessionKey` | *string* | :heavy_check_mark: | the Key of the transcode session to stop | [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. | | - -### Response - -**Promise\<[operations.StopTranscodeSessionResponse](../../sdk/models/operations/stoptranscodesessionresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | -| errors.StopTranscodeSessionBadRequest | 400 | application/json | -| errors.StopTranscodeSessionUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/statistics/README.md b/docs/sdks/statistics/README.md deleted file mode 100644 index 94f6e3b3..00000000 --- a/docs/sdks/statistics/README.md +++ /dev/null @@ -1,226 +0,0 @@ -# Statistics -(*statistics*) - -## Overview - -API Calls that perform operations with Plex Media Server Statistics - - -### Available Operations - -* [getStatistics](#getstatistics) - Get Media Statistics -* [getResourcesStatistics](#getresourcesstatistics) - Get Resources Statistics -* [getBandwidthStatistics](#getbandwidthstatistics) - Get Bandwidth Statistics - -## getStatistics - -This will return the media statistics for the server - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.statistics.getStatistics(4); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { statisticsGetStatistics } from "@lukehagar/plexjs/funcs/statisticsGetStatistics.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await statisticsGetStatistics(plexAPI, 4); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("statisticsGetStatistics failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `timespan` | *number* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| [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. | | - -### Response - -**Promise\<[operations.GetStatisticsResponse](../../sdk/models/operations/getstatisticsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------------- | -------------------------------- | -------------------------------- | -| errors.GetStatisticsBadRequest | 400 | application/json | -| errors.GetStatisticsUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getResourcesStatistics - -This will return the resources for the server - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.statistics.getResourcesStatistics(4); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { statisticsGetResourcesStatistics } from "@lukehagar/plexjs/funcs/statisticsGetResourcesStatistics.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await statisticsGetResourcesStatistics(plexAPI, 4); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("statisticsGetResourcesStatistics failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `timespan` | *number* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| [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. | | - -### Response - -**Promise\<[operations.GetResourcesStatisticsResponse](../../sdk/models/operations/getresourcesstatisticsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| errors.GetResourcesStatisticsBadRequest | 400 | application/json | -| errors.GetResourcesStatisticsUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getBandwidthStatistics - -This will return the bandwidth statistics for the server - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.statistics.getBandwidthStatistics(4); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { statisticsGetBandwidthStatistics } from "@lukehagar/plexjs/funcs/statisticsGetBandwidthStatistics.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await statisticsGetBandwidthStatistics(plexAPI, 4); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("statisticsGetBandwidthStatistics failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `timespan` | *number* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| [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. | | - -### Response - -**Promise\<[operations.GetBandwidthStatisticsResponse](../../sdk/models/operations/getbandwidthstatisticsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| errors.GetBandwidthStatisticsBadRequest | 400 | application/json | -| errors.GetBandwidthStatisticsUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/status/README.md b/docs/sdks/status/README.md new file mode 100644 index 00000000..b6ab567b --- /dev/null +++ b/docs/sdks/status/README.md @@ -0,0 +1,558 @@ +# Status +(*status*) + +## Overview + +The status endpoints give you information about current playbacks, play history, and even terminating sessions. + +### Available Operations + +* [listSessions](#listsessions) - List Sessions +* [getBackgroundTasks](#getbackgroundtasks) - Get background tasks +* [listPlaybackHistory](#listplaybackhistory) - List Playback History +* [terminateSession](#terminatesession) - Terminate a session +* [deleteHistory](#deletehistory) - Delete Single History Item +* [getHistoryItem](#gethistoryitem) - Get Single History Item + +## listSessions + +List all current playbacks on this server + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI(); + +async function run() { + const result = await plexAPI.status.listSessions(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { statusListSessions } from "@lukehagar/plexjs/funcs/statusListSessions.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore(); + +async function run() { + const res = await statusListSessions(plexAPI); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("statusListSessions failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| 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. | + +### Response + +**Promise\<[operations.ListSessionsResponse](../../sdk/models/operations/listsessionsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getBackgroundTasks + +Get the list of all background tasks + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI(); + +async function run() { + const result = await plexAPI.status.getBackgroundTasks(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { statusGetBackgroundTasks } from "@lukehagar/plexjs/funcs/statusGetBackgroundTasks.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore(); + +async function run() { + const res = await statusGetBackgroundTasks(plexAPI); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("statusGetBackgroundTasks failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| 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. | + +### Response + +**Promise\<[operations.GetBackgroundTasksResponse](../../sdk/models/operations/getbackgroundtasksresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listPlaybackHistory + +List all playback history (Admin can see all users, others can only see their own). +Pagination should be used on this endpoint. Additionally this endpoint supports `includeFields`, `excludeFields`, `includeElements`, and `excludeElements` parameters. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.status.listPlaybackHistory({ + sort: [ + "v", + "i", + "e", + "w", + "e", + "d", + "A", + "t", + ":", + "d", + "e", + "s", + "c", + ",", + "a", + "c", + "c", + "o", + "u", + "n", + "t", + "I", + "D", + ], + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { statusListPlaybackHistory } from "@lukehagar/plexjs/funcs/statusListPlaybackHistory.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await statusListPlaybackHistory(plexAPI, { + sort: [ + "v", + "i", + "e", + "w", + "e", + "d", + "A", + "t", + ":", + "d", + "e", + "s", + "c", + ",", + "a", + "c", + "c", + "o", + "u", + "n", + "t", + "I", + "D", + ], + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("statusListPlaybackHistory failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListPlaybackHistoryRequest](../../sdk/models/operations/listplaybackhistoryrequest.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. | + +### Response + +**Promise\<[operations.ListPlaybackHistoryResponse](../../sdk/models/operations/listplaybackhistoryresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## terminateSession + +Terminate a playback session kicking off the user + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.status.terminateSession({ + sessionId: "cdefghijklmnopqrstuvwxyz", + reason: "Stop Playing", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { statusTerminateSession } from "@lukehagar/plexjs/funcs/statusTerminateSession.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await statusTerminateSession(plexAPI, { + sessionId: "cdefghijklmnopqrstuvwxyz", + reason: "Stop Playing", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("statusTerminateSession failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.TerminateSessionRequest](../../sdk/models/operations/terminatesessionrequest.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. | + +### Response + +**Promise\<[operations.TerminateSessionResponse](../../sdk/models/operations/terminatesessionresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deleteHistory + +Delete a single history item by id + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.status.deleteHistory({ + historyId: 953579, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { statusDeleteHistory } from "@lukehagar/plexjs/funcs/statusDeleteHistory.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await statusDeleteHistory(plexAPI, { + historyId: 953579, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("statusDeleteHistory failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteHistoryRequest](../../sdk/models/operations/deletehistoryrequest.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. | + +### Response + +**Promise\<[operations.DeleteHistoryResponse](../../sdk/models/operations/deletehistoryresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getHistoryItem + +Get a single history item by id + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.status.getHistoryItem({ + historyId: 832213, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { statusGetHistoryItem } from "@lukehagar/plexjs/funcs/statusGetHistoryItem.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await statusGetHistoryItem(plexAPI, { + historyId: 832213, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("statusGetHistoryItem failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetHistoryItemRequest](../../sdk/models/operations/gethistoryitemrequest.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. | + +### Response + +**Promise\<[operations.GetHistoryItemResponse](../../sdk/models/operations/gethistoryitemresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/subscriptions/README.md b/docs/sdks/subscriptions/README.md new file mode 100644 index 00000000..ffcdb6d9 --- /dev/null +++ b/docs/sdks/subscriptions/README.md @@ -0,0 +1,899 @@ +# Subscriptions +(*subscriptions*) + +## Overview + +Subscriptions determine which media will be recorded and the criteria for selecting an airing when multiple are available + + +### Available Operations + +* [getAllSubscriptions](#getallsubscriptions) - Get all subscriptions +* [createSubscription](#createsubscription) - Create a subscription +* [processSubscriptions](#processsubscriptions) - Process all subscriptions +* [getScheduledRecordings](#getscheduledrecordings) - Get all scheduled recordings +* [getTemplate](#gettemplate) - Get the subscription template +* [cancelGrab](#cancelgrab) - Cancel an existing grab +* [deleteSubscription](#deletesubscription) - Delete a subscription +* [getSubscription](#getsubscription) - Get a single subscription +* [editSubscriptionPreferences](#editsubscriptionpreferences) - Edit a subscription +* [reorderSubscription](#reordersubscription) - Re-order a subscription + +## getAllSubscriptions + +Get all subscriptions and potentially the grabs too + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.subscriptions.getAllSubscriptions({ + includeGrabs: BoolInt.One, + includeStorage: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { subscriptionsGetAllSubscriptions } from "@lukehagar/plexjs/funcs/subscriptionsGetAllSubscriptions.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await subscriptionsGetAllSubscriptions(plexAPI, { + includeGrabs: BoolInt.One, + includeStorage: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("subscriptionsGetAllSubscriptions failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAllSubscriptionsRequest](../../sdk/models/operations/getallsubscriptionsrequest.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. | + +### Response + +**Promise\<[operations.GetAllSubscriptionsResponse](../../sdk/models/operations/getallsubscriptionsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## createSubscription + +Create a subscription. The query parameters should be mostly derived from the [template](#tag/Subscriptions/operation/mediaSubscriptionsGetTemplate) + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.subscriptions.createSubscription({ + targetLibrarySectionID: 1, + targetSectionLocationID: 3, + type: 2, + hints: {}, + prefs: {}, + params: {}, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { subscriptionsCreateSubscription } from "@lukehagar/plexjs/funcs/subscriptionsCreateSubscription.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await subscriptionsCreateSubscription(plexAPI, { + targetLibrarySectionID: 1, + targetSectionLocationID: 3, + type: 2, + hints: {}, + prefs: {}, + params: {}, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("subscriptionsCreateSubscription failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateSubscriptionRequest](../../sdk/models/operations/createsubscriptionrequest.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. | + +### Response + +**Promise\<[operations.CreateSubscriptionResponse](../../sdk/models/operations/createsubscriptionresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## processSubscriptions + +Process all subscriptions asynchronously + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI(); + +async function run() { + const result = await plexAPI.subscriptions.processSubscriptions(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { subscriptionsProcessSubscriptions } from "@lukehagar/plexjs/funcs/subscriptionsProcessSubscriptions.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore(); + +async function run() { + const res = await subscriptionsProcessSubscriptions(plexAPI); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("subscriptionsProcessSubscriptions failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| 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. | + +### Response + +**Promise\<[operations.ProcessSubscriptionsResponse](../../sdk/models/operations/processsubscriptionsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getScheduledRecordings + +Get all scheduled recordings across all subscriptions + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI(); + +async function run() { + const result = await plexAPI.subscriptions.getScheduledRecordings(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { subscriptionsGetScheduledRecordings } from "@lukehagar/plexjs/funcs/subscriptionsGetScheduledRecordings.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore(); + +async function run() { + const res = await subscriptionsGetScheduledRecordings(plexAPI); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("subscriptionsGetScheduledRecordings failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| 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. | + +### Response + +**Promise\<[operations.GetScheduledRecordingsResponse](../../sdk/models/operations/getscheduledrecordingsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getTemplate + +Get the templates for a piece of media which could include fetching one airing, season, the whole show, etc. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.subscriptions.getTemplate({ + guid: "plex://episode/5fc70265c40548002d539d23", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { subscriptionsGetTemplate } from "@lukehagar/plexjs/funcs/subscriptionsGetTemplate.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await subscriptionsGetTemplate(plexAPI, { + guid: "plex://episode/5fc70265c40548002d539d23", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("subscriptionsGetTemplate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetTemplateRequest](../../sdk/models/operations/gettemplaterequest.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. | + +### Response + +**Promise\<[operations.GetTemplateResponse](../../sdk/models/operations/gettemplateresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## cancelGrab + +Cancels an existing media grab (recording). It can be used to resolve a conflict which exists for a rolling subscription. +Note: This cancellation does not persist across a server restart, but neither does a rolling subscription itself. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.subscriptions.cancelGrab({ + operationId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { subscriptionsCancelGrab } from "@lukehagar/plexjs/funcs/subscriptionsCancelGrab.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await subscriptionsCancelGrab(plexAPI, { + operationId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("subscriptionsCancelGrab failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CancelGrabRequest](../../sdk/models/operations/cancelgrabrequest.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. | + +### Response + +**Promise\<[operations.CancelGrabResponse](../../sdk/models/operations/cancelgrabresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deleteSubscription + +Delete a subscription, cancelling all of its grabs as well + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.subscriptions.deleteSubscription({ + subscriptionId: 974618, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { subscriptionsDeleteSubscription } from "@lukehagar/plexjs/funcs/subscriptionsDeleteSubscription.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await subscriptionsDeleteSubscription(plexAPI, { + subscriptionId: 974618, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("subscriptionsDeleteSubscription failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteSubscriptionRequest](../../sdk/models/operations/deletesubscriptionrequest.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. | + +### Response + +**Promise\<[operations.DeleteSubscriptionResponse](../../sdk/models/operations/deletesubscriptionresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getSubscription + +Get a single subscription and potentially the grabs too + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.subscriptions.getSubscription({ + subscriptionId: 186713, + includeGrabs: BoolInt.One, + includeStorage: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { subscriptionsGetSubscription } from "@lukehagar/plexjs/funcs/subscriptionsGetSubscription.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await subscriptionsGetSubscription(plexAPI, { + subscriptionId: 186713, + includeGrabs: BoolInt.One, + includeStorage: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("subscriptionsGetSubscription failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetSubscriptionRequest](../../sdk/models/operations/getsubscriptionrequest.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. | + +### Response + +**Promise\<[operations.GetSubscriptionResponse](../../sdk/models/operations/getsubscriptionresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## editSubscriptionPreferences + +Edit a subscription's preferences + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.subscriptions.editSubscriptionPreferences({ + subscriptionId: 673918, + prefs: {}, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { subscriptionsEditSubscriptionPreferences } from "@lukehagar/plexjs/funcs/subscriptionsEditSubscriptionPreferences.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await subscriptionsEditSubscriptionPreferences(plexAPI, { + subscriptionId: 673918, + prefs: {}, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("subscriptionsEditSubscriptionPreferences failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.EditSubscriptionPreferencesRequest](../../sdk/models/operations/editsubscriptionpreferencesrequest.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. | + +### Response + +**Promise\<[operations.EditSubscriptionPreferencesResponse](../../sdk/models/operations/editsubscriptionpreferencesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## reorderSubscription + +Re-order a subscription to change its priority + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.subscriptions.reorderSubscription({ + subscriptionId: 440634, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { subscriptionsReorderSubscription } from "@lukehagar/plexjs/funcs/subscriptionsReorderSubscription.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await subscriptionsReorderSubscription(plexAPI, { + subscriptionId: 440634, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("subscriptionsReorderSubscription failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ReorderSubscriptionRequest](../../sdk/models/operations/reordersubscriptionrequest.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. | + +### Response + +**Promise\<[operations.ReorderSubscriptionResponse](../../sdk/models/operations/reordersubscriptionresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/timeline/README.md b/docs/sdks/timeline/README.md new file mode 100644 index 00000000..ce4ab693 --- /dev/null +++ b/docs/sdks/timeline/README.md @@ -0,0 +1,320 @@ +# Timeline +(*timeline*) + +## Overview + +The actions feature within a media provider + +### Available Operations + +* [markPlayed](#markplayed) - Mark an item as played +* [report](#report) - Report media timeline +* [unscrobble](#unscrobble) - Mark an item as unplayed + +## markPlayed + +Mark an item as played. Note, this does not create any view history of this item but rather just sets the state as played. The client must provide either the `key` or `uri` query parameter +This API does respond to the GET verb but applications should use PUT + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.timeline.markPlayed({ + identifier: "", + key: "59398", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { timelineMarkPlayed } from "@lukehagar/plexjs/funcs/timelineMarkPlayed.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await timelineMarkPlayed(plexAPI, { + identifier: "", + key: "59398", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("timelineMarkPlayed failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MarkPlayedRequest](../../sdk/models/operations/markplayedrequest.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. | + +### Response + +**Promise\<[operations.MarkPlayedResponse](../../sdk/models/operations/markplayedresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## report + +This endpoint is hit during media playback for an item. It must be hit whenever the play state changes, or in the absence of a play state change, in a regular fashion (generally this means every 10 seconds on a LAN/WAN, and every 20 seconds over cellular). + + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { ReportState } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.timeline.report({ + key: "/foo", + ratingKey: "xyz", + state: ReportState.Playing, + playQueueItemID: "123", + time: 0, + duration: 10000, + continuing: BoolInt.One, + updated: 14200000, + offline: BoolInt.One, + timeToFirstFrame: 1000, + timeStalled: 1000, + bandwidth: 100, + bufferedTime: 100, + bufferedSize: 1024, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { timelineReport } from "@lukehagar/plexjs/funcs/timelineReport.js"; +import { ReportState } from "@lukehagar/plexjs/sdk/models/operations"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await timelineReport(plexAPI, { + key: "/foo", + ratingKey: "xyz", + state: ReportState.Playing, + playQueueItemID: "123", + time: 0, + duration: 10000, + continuing: BoolInt.One, + updated: 14200000, + offline: BoolInt.One, + timeToFirstFrame: 1000, + timeStalled: 1000, + bandwidth: 100, + bufferedTime: 100, + bufferedSize: 1024, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("timelineReport failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ReportRequest](../../sdk/models/operations/reportrequest.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. | + +### Response + +**Promise\<[operations.ReportResponse](../../sdk/models/operations/reportresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## unscrobble + +Mark an item as unplayed. The client must provide either the `key` or `uri` query parameter +This API does respond to the GET verb but applications should use PUT + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.timeline.unscrobble({ + identifier: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { timelineUnscrobble } from "@lukehagar/plexjs/funcs/timelineUnscrobble.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await timelineUnscrobble(plexAPI, { + identifier: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("timelineUnscrobble failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UnscrobbleRequest](../../sdk/models/operations/unscrobblerequest.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. | + +### Response + +**Promise\<[operations.UnscrobbleResponse](../../sdk/models/operations/unscrobbleresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/transcoder/README.md b/docs/sdks/transcoder/README.md new file mode 100644 index 00000000..677bf1a5 --- /dev/null +++ b/docs/sdks/transcoder/README.md @@ -0,0 +1,659 @@ +# Transcoder +(*transcoder*) + +## Overview + +API Operations against the Transcoder + +### Available Operations + +* [transcodeImage](#transcodeimage) - Transcode an image +* [makeDecision](#makedecision) - Make a decision on media playback +* [triggerFallback](#triggerfallback) - Manually trigger a transcoder fallback +* [transcodeSubtitles](#transcodesubtitles) - Transcode subtitles +* [startTranscodeSession](#starttranscodesession) - Start A Transcoding Session + +## transcodeImage + +Transcode an image, possibly changing format or size + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.transcoder.transcodeImage({ + url: "/library/metadata/265/thumb/1715112705", + background: "#ff5522", + upscale: BoolInt.One, + minSize: BoolInt.One, + rotate: BoolInt.One, + blendColor: "#ff5522", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { transcoderTranscodeImage } from "@lukehagar/plexjs/funcs/transcoderTranscodeImage.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await transcoderTranscodeImage(plexAPI, { + url: "/library/metadata/265/thumb/1715112705", + background: "#ff5522", + upscale: BoolInt.One, + minSize: BoolInt.One, + rotate: BoolInt.One, + blendColor: "#ff5522", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transcoderTranscodeImage failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.TranscodeImageRequest](../../sdk/models/operations/transcodeimagerequest.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. | + +### Response + +**Promise\<[operations.TranscodeImageResponse](../../sdk/models/operations/transcodeimageresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## makeDecision + +Make a decision on media playback based on client profile, and requested settings such as bandwidth and resolution. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { MakeDecisionLocation, MakeDecisionProtocol } from "@lukehagar/plexjs/sdk/models/operations"; +import { AdvancedSubtitles, BoolInt, TranscodeType } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.transcoder.makeDecision({ + transcodeType: TranscodeType.Music, + advancedSubtitles: AdvancedSubtitles.Burn, + audioBoost: 50, + audioChannelCount: 5, + autoAdjustQuality: BoolInt.One, + autoAdjustSubtitle: BoolInt.One, + directPlay: BoolInt.One, + directStream: BoolInt.One, + directStreamAudio: BoolInt.One, + disableResolutionRotation: BoolInt.One, + hasMDE: BoolInt.One, + location: MakeDecisionLocation.Wan, + mediaBufferSize: 102400, + mediaIndex: 0, + musicBitrate: 5000, + offset: 90.5, + partIndex: 0, + path: "/library/metadata/151671", + peakBitrate: 12000, + photoResolution: "1080x1080", + protocol: MakeDecisionProtocol.Dash, + secondsPerSegment: 5, + subtitleSize: 50, + videoBitrate: 12000, + videoQuality: 50, + videoResolution: "1080x1080", + xPlexClientProfileExtra: "add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)", + xPlexClientProfileName: "generic", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { transcoderMakeDecision } from "@lukehagar/plexjs/funcs/transcoderMakeDecision.js"; +import { MakeDecisionLocation, MakeDecisionProtocol } from "@lukehagar/plexjs/sdk/models/operations"; +import { AdvancedSubtitles, BoolInt, TranscodeType } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await transcoderMakeDecision(plexAPI, { + transcodeType: TranscodeType.Music, + advancedSubtitles: AdvancedSubtitles.Burn, + audioBoost: 50, + audioChannelCount: 5, + autoAdjustQuality: BoolInt.One, + autoAdjustSubtitle: BoolInt.One, + directPlay: BoolInt.One, + directStream: BoolInt.One, + directStreamAudio: BoolInt.One, + disableResolutionRotation: BoolInt.One, + hasMDE: BoolInt.One, + location: MakeDecisionLocation.Wan, + mediaBufferSize: 102400, + mediaIndex: 0, + musicBitrate: 5000, + offset: 90.5, + partIndex: 0, + path: "/library/metadata/151671", + peakBitrate: 12000, + photoResolution: "1080x1080", + protocol: MakeDecisionProtocol.Dash, + secondsPerSegment: 5, + subtitleSize: 50, + videoBitrate: 12000, + videoQuality: 50, + videoResolution: "1080x1080", + xPlexClientProfileExtra: "add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)", + xPlexClientProfileName: "generic", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transcoderMakeDecision failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.MakeDecisionRequest](../../sdk/models/operations/makedecisionrequest.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. | + +### Response + +**Promise\<[operations.MakeDecisionResponse](../../sdk/models/operations/makedecisionresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## triggerFallback + +Manually trigger a transcoder fallback ex: HEVC to h.264 or hw to sw + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { TranscodeType } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.transcoder.triggerFallback({ + transcodeType: TranscodeType.Audio, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { transcoderTriggerFallback } from "@lukehagar/plexjs/funcs/transcoderTriggerFallback.js"; +import { TranscodeType } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await transcoderTriggerFallback(plexAPI, { + transcodeType: TranscodeType.Audio, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transcoderTriggerFallback failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.TriggerFallbackRequest](../../sdk/models/operations/triggerfallbackrequest.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. | + +### Response + +**Promise\<[operations.TriggerFallbackResponse](../../sdk/models/operations/triggerfallbackresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## transcodeSubtitles + +Only transcode subtitle streams. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { TranscodeSubtitlesLocation, TranscodeSubtitlesProtocol } from "@lukehagar/plexjs/sdk/models/operations"; +import { AdvancedSubtitles, BoolInt, TranscodeType } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.transcoder.transcodeSubtitles({ + transcodeType: TranscodeType.Audio, + advancedSubtitles: AdvancedSubtitles.Burn, + audioBoost: 50, + audioChannelCount: 5, + autoAdjustQuality: BoolInt.One, + autoAdjustSubtitle: BoolInt.One, + directPlay: BoolInt.One, + directStream: BoolInt.One, + directStreamAudio: BoolInt.One, + disableResolutionRotation: BoolInt.One, + hasMDE: BoolInt.One, + location: TranscodeSubtitlesLocation.Wan, + mediaBufferSize: 102400, + mediaIndex: 0, + musicBitrate: 5000, + offset: 90.5, + partIndex: 0, + path: "/library/metadata/151671", + peakBitrate: 12000, + photoResolution: "1080x1080", + protocol: TranscodeSubtitlesProtocol.Dash, + secondsPerSegment: 5, + subtitleSize: 50, + videoBitrate: 12000, + videoQuality: 50, + videoResolution: "1080x1080", + xPlexClientProfileExtra: "add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)", + xPlexClientProfileName: "generic", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { transcoderTranscodeSubtitles } from "@lukehagar/plexjs/funcs/transcoderTranscodeSubtitles.js"; +import { TranscodeSubtitlesLocation, TranscodeSubtitlesProtocol } from "@lukehagar/plexjs/sdk/models/operations"; +import { AdvancedSubtitles, BoolInt, TranscodeType } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await transcoderTranscodeSubtitles(plexAPI, { + transcodeType: TranscodeType.Audio, + advancedSubtitles: AdvancedSubtitles.Burn, + audioBoost: 50, + audioChannelCount: 5, + autoAdjustQuality: BoolInt.One, + autoAdjustSubtitle: BoolInt.One, + directPlay: BoolInt.One, + directStream: BoolInt.One, + directStreamAudio: BoolInt.One, + disableResolutionRotation: BoolInt.One, + hasMDE: BoolInt.One, + location: TranscodeSubtitlesLocation.Wan, + mediaBufferSize: 102400, + mediaIndex: 0, + musicBitrate: 5000, + offset: 90.5, + partIndex: 0, + path: "/library/metadata/151671", + peakBitrate: 12000, + photoResolution: "1080x1080", + protocol: TranscodeSubtitlesProtocol.Dash, + secondsPerSegment: 5, + subtitleSize: 50, + videoBitrate: 12000, + videoQuality: 50, + videoResolution: "1080x1080", + xPlexClientProfileExtra: "add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)", + xPlexClientProfileName: "generic", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transcoderTranscodeSubtitles failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.TranscodeSubtitlesRequest](../../sdk/models/operations/transcodesubtitlesrequest.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. | + +### Response + +**Promise\<[operations.TranscodeSubtitlesResponse](../../sdk/models/operations/transcodesubtitlesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## startTranscodeSession + +Starts the transcoder and returns the corresponding streaming resource document. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { Extension, StartTranscodeSessionLocation, StartTranscodeSessionProtocol } from "@lukehagar/plexjs/sdk/models/operations"; +import { AdvancedSubtitles, BoolInt, TranscodeType } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.transcoder.startTranscodeSession({ + transcodeType: TranscodeType.Music, + extension: Extension.Mpd, + advancedSubtitles: AdvancedSubtitles.Burn, + audioBoost: 50, + audioChannelCount: 5, + autoAdjustQuality: BoolInt.One, + autoAdjustSubtitle: BoolInt.One, + directPlay: BoolInt.One, + directStream: BoolInt.One, + directStreamAudio: BoolInt.One, + disableResolutionRotation: BoolInt.One, + hasMDE: BoolInt.One, + location: StartTranscodeSessionLocation.Wan, + mediaBufferSize: 102400, + mediaIndex: 0, + musicBitrate: 5000, + offset: 90.5, + partIndex: 0, + path: "/library/metadata/151671", + peakBitrate: 12000, + photoResolution: "1080x1080", + protocol: StartTranscodeSessionProtocol.Dash, + secondsPerSegment: 5, + subtitleSize: 50, + videoBitrate: 12000, + videoQuality: 50, + videoResolution: "1080x1080", + xPlexClientProfileExtra: "add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)", + xPlexClientProfileName: "generic", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { transcoderStartTranscodeSession } from "@lukehagar/plexjs/funcs/transcoderStartTranscodeSession.js"; +import { Extension, StartTranscodeSessionLocation, StartTranscodeSessionProtocol } from "@lukehagar/plexjs/sdk/models/operations"; +import { AdvancedSubtitles, BoolInt, TranscodeType } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await transcoderStartTranscodeSession(plexAPI, { + transcodeType: TranscodeType.Music, + extension: Extension.Mpd, + advancedSubtitles: AdvancedSubtitles.Burn, + audioBoost: 50, + audioChannelCount: 5, + autoAdjustQuality: BoolInt.One, + autoAdjustSubtitle: BoolInt.One, + directPlay: BoolInt.One, + directStream: BoolInt.One, + directStreamAudio: BoolInt.One, + disableResolutionRotation: BoolInt.One, + hasMDE: BoolInt.One, + location: StartTranscodeSessionLocation.Wan, + mediaBufferSize: 102400, + mediaIndex: 0, + musicBitrate: 5000, + offset: 90.5, + partIndex: 0, + path: "/library/metadata/151671", + peakBitrate: 12000, + photoResolution: "1080x1080", + protocol: StartTranscodeSessionProtocol.Dash, + secondsPerSegment: 5, + subtitleSize: 50, + videoBitrate: 12000, + videoQuality: 50, + videoResolution: "1080x1080", + xPlexClientProfileExtra: "add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)", + xPlexClientProfileName: "generic", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transcoderStartTranscodeSession failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.StartTranscodeSessionRequest](../../sdk/models/operations/starttranscodesessionrequest.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. | + +### Response + +**Promise\<[operations.StartTranscodeSessionResponse](../../sdk/models/operations/starttranscodesessionresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/ultrablur/README.md b/docs/sdks/ultrablur/README.md new file mode 100644 index 00000000..2af409f4 --- /dev/null +++ b/docs/sdks/ultrablur/README.md @@ -0,0 +1,207 @@ +# UltraBlur +(*ultraBlur*) + +## Overview + +Service provided to compute UltraBlur colors and images. + +### Available Operations + +* [getColors](#getcolors) - Get UltraBlur Colors +* [getImage](#getimage) - Get UltraBlur Image + +## getColors + +Retrieves the four colors extracted from an image for clients to use to generate an ultrablur image. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.ultraBlur.getColors({ + url: "/library/metadata/217745/art/1718931408", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { ultraBlurGetColors } from "@lukehagar/plexjs/funcs/ultraBlurGetColors.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await ultraBlurGetColors(plexAPI, { + url: "/library/metadata/217745/art/1718931408", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("ultraBlurGetColors failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetColorsRequest](../../sdk/models/operations/getcolorsrequest.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. | + +### Response + +**Promise\<[operations.GetColorsResponse](../../sdk/models/operations/getcolorsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getImage + +Retrieves a server-side generated UltraBlur image based on the provided color inputs. Clients should always call this via the photo transcoder endpoint. + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.ultraBlur.getImage({ + topLeft: "3f280a", + topRight: "6b4713", + bottomRight: "0f2a43", + bottomLeft: "1c425d", + width: 1920, + height: 1080, + noise: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { ultraBlurGetImage } from "@lukehagar/plexjs/funcs/ultraBlurGetImage.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await ultraBlurGetImage(plexAPI, { + topLeft: "3f280a", + topRight: "6b4713", + bottomRight: "0f2a43", + bottomLeft: "1c425d", + width: 1920, + height: 1080, + noise: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("ultraBlurGetImage failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetImageRequest](../../sdk/models/operations/getimagerequest.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. | + +### Response + +**Promise\<[operations.GetImageResponse](../../sdk/models/operations/getimageresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/updater/README.md b/docs/sdks/updater/README.md index eae810cf..cc506870 100644 --- a/docs/sdks/updater/README.md +++ b/docs/sdks/updater/README.md @@ -9,26 +9,39 @@ Updates to the status can be observed via the Event API. ### Available Operations -* [getUpdateStatus](#getupdatestatus) - Querying status of updates -* [checkForUpdates](#checkforupdates) - Checking for updates -* [applyUpdates](#applyupdates) - Apply Updates +* [applyUpdates](#applyupdates) - Applying updates +* [checkUpdates](#checkupdates) - Checking for updates +* [getUpdatesStatus](#getupdatesstatus) - Querying status of updates -## getUpdateStatus +## applyUpdates -Querying status of updates +Apply any downloaded updates. Note that the two parameters `tonight` and `skip` are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed. ### Example Usage - + ```typescript import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; const plexAPI = new PlexAPI({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const result = await plexAPI.updater.getUpdateStatus(); + const result = await plexAPI.updater.applyUpdates({ + tonight: BoolInt.One, + skip: BoolInt.One, + }); console.log(result); } @@ -42,21 +55,192 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { updaterGetUpdateStatus } from "@lukehagar/plexjs/funcs/updaterGetUpdateStatus.js"; +import { updaterApplyUpdates } from "@lukehagar/plexjs/funcs/updaterApplyUpdates.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. const plexAPI = new PlexAPICore({ - accessToken: "", + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", }); async function run() { - const res = await updaterGetUpdateStatus(plexAPI); + const res = await updaterApplyUpdates(plexAPI, { + tonight: BoolInt.One, + skip: BoolInt.One, + }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("updaterGetUpdateStatus failed:", res.error); + console.log("updaterApplyUpdates failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ApplyUpdatesRequest](../../sdk/models/operations/applyupdatesrequest.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. | + +### Response + +**Promise\<[operations.ApplyUpdatesResponse](../../sdk/models/operations/applyupdatesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## checkUpdates + +Perform an update check and potentially download + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const result = await plexAPI.updater.checkUpdates({ + download: BoolInt.One, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { updaterCheckUpdates } from "@lukehagar/plexjs/funcs/updaterCheckUpdates.js"; +import { BoolInt } from "@lukehagar/plexjs/sdk/models/shared"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function run() { + const res = await updaterCheckUpdates(plexAPI, { + download: BoolInt.One, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("updaterCheckUpdates failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CheckUpdatesRequest](../../sdk/models/operations/checkupdatesrequest.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. | + +### Response + +**Promise\<[operations.CheckUpdatesResponse](../../sdk/models/operations/checkupdatesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getUpdatesStatus + +Get the status of updating the server + +### Example Usage + + +```typescript +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI(); + +async function run() { + const result = await plexAPI.updater.getUpdatesStatus(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PlexAPICore } from "@lukehagar/plexjs/core.js"; +import { updaterGetUpdatesStatus } from "@lukehagar/plexjs/funcs/updaterGetUpdatesStatus.js"; + +// Use `PlexAPICore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const plexAPI = new PlexAPICore(); + +async function run() { + const res = await updaterGetUpdatesStatus(plexAPI); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("updaterGetUpdatesStatus failed:", res.error); } } @@ -73,160 +257,10 @@ run(); ### Response -**Promise\<[operations.GetUpdateStatusResponse](../../sdk/models/operations/getupdatestatusresponse.md)\>** +**Promise\<[operations.GetUpdatesStatusResponse](../../sdk/models/operations/getupdatesstatusresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.GetUpdateStatusBadRequest | 400 | application/json | -| errors.GetUpdateStatusUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## checkForUpdates - -Checking for updates - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; -import { Download } from "@lukehagar/plexjs/sdk/models/operations"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.updater.checkForUpdates(Download.One); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { updaterCheckForUpdates } from "@lukehagar/plexjs/funcs/updaterCheckForUpdates.js"; -import { Download } from "@lukehagar/plexjs/sdk/models/operations"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await updaterCheckForUpdates(plexAPI, Download.One); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("updaterCheckForUpdates failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `download` | [operations.Download](../../sdk/models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | [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. | | - -### Response - -**Promise\<[operations.CheckForUpdatesResponse](../../sdk/models/operations/checkforupdatesresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.CheckForUpdatesBadRequest | 400 | application/json | -| errors.CheckForUpdatesUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## applyUpdates - -Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed - - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; -import { Skip, Tonight } from "@lukehagar/plexjs/sdk/models/operations"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.updater.applyUpdates(Tonight.One, Skip.One); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { updaterApplyUpdates } from "@lukehagar/plexjs/funcs/updaterApplyUpdates.js"; -import { Skip, Tonight } from "@lukehagar/plexjs/sdk/models/operations"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await updaterApplyUpdates(plexAPI, Tonight.One, Skip.One); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("updaterApplyUpdates failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `tonight` | [operations.Tonight](../../sdk/models/operations/tonight.md) | :heavy_minus_sign: | 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 | [object Object] | -| `skip` | [operations.Skip](../../sdk/models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. | [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. | | - -### Response - -**Promise\<[operations.ApplyUpdatesResponse](../../sdk/models/operations/applyupdatesresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------- | ------------------------------- | ------------------------------- | -| errors.ApplyUpdatesBadRequest | 400 | application/json | -| errors.ApplyUpdatesUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/users/README.md b/docs/sdks/users/README.md deleted file mode 100644 index fe2e55c0..00000000 --- a/docs/sdks/users/README.md +++ /dev/null @@ -1,104 +0,0 @@ -# Users -(*users*) - -## Overview - -### Available Operations - -* [getUsers](#getusers) - Get list of all connected users - -## getUsers - -Get list of all users that are friends and have library access with the provided Plex authentication token - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI(); - -async function run() { - const result = await plexAPI.users.getUsers({ - clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", - clientName: "Plex for Roku", - deviceNickname: "Roku 3", - deviceName: "Chrome", - deviceScreenResolution: "1487x1165,2560x1440", - clientVersion: "2.4.1", - platform: "Roku", - clientFeatures: "external-media,indirect-media,hub-style-list", - model: "4200X", - xPlexSessionId: "97e136ef-4ddd-4ff3-89a7-a5820c96c2ca", - xPlexLanguage: "en", - platformVersion: "4.3 build 1057", - xPlexToken: "CV5xoxjTpFKUzBTShsaf", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { usersGetUsers } from "@lukehagar/plexjs/funcs/usersGetUsers.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore(); - -async function run() { - const res = await usersGetUsers(plexAPI, { - clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", - clientName: "Plex for Roku", - deviceNickname: "Roku 3", - deviceName: "Chrome", - deviceScreenResolution: "1487x1165,2560x1440", - clientVersion: "2.4.1", - platform: "Roku", - clientFeatures: "external-media,indirect-media,hub-style-list", - model: "4200X", - xPlexSessionId: "97e136ef-4ddd-4ff3-89a7-a5820c96c2ca", - xPlexLanguage: "en", - platformVersion: "4.3 build 1057", - xPlexToken: "CV5xoxjTpFKUzBTShsaf", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("usersGetUsers failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetUsersRequest](../../sdk/models/operations/getusersrequest.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. | - -### Response - -**Promise\<[operations.GetUsersResponse](../../sdk/models/operations/getusersresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| errors.GetUsersBadRequest | 400 | application/json | -| errors.GetUsersUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/video/README.md b/docs/sdks/video/README.md deleted file mode 100644 index 53903e2a..00000000 --- a/docs/sdks/video/README.md +++ /dev/null @@ -1,212 +0,0 @@ -# Video -(*video*) - -## Overview - -API Calls that perform operations with Plex Media Server Videos - - -### Available Operations - -* [getTimeline](#gettimeline) - Get the timeline for a media item -* [startUniversalTranscode](#startuniversaltranscode) - Start Universal Transcode - -## getTimeline - -Get the timeline for a media item - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; -import { State } from "@lukehagar/plexjs/sdk/models/operations"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.video.getTimeline({ - 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, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { videoGetTimeline } from "@lukehagar/plexjs/funcs/videoGetTimeline.js"; -import { State } from "@lukehagar/plexjs/sdk/models/operations"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await videoGetTimeline(plexAPI, { - 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, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("videoGetTimeline failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTimelineRequest](../../sdk/models/operations/gettimelinerequest.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. | - -### Response - -**Promise\<[operations.GetTimelineResponse](../../sdk/models/operations/gettimelineresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------ | ------------------------------ | ------------------------------ | -| errors.GetTimelineBadRequest | 400 | application/json | -| errors.GetTimelineUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## startUniversalTranscode - -Begin a Universal Transcode Session - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.video.startUniversalTranscode({ - 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, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { videoStartUniversalTranscode } from "@lukehagar/plexjs/funcs/videoStartUniversalTranscode.js"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await videoStartUniversalTranscode(plexAPI, { - 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, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("videoStartUniversalTranscode failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.StartUniversalTranscodeRequest](../../sdk/models/operations/startuniversaltranscoderequest.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. | - -### Response - -**Promise\<[operations.StartUniversalTranscodeResponse](../../sdk/models/operations/startuniversaltranscoderesponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| errors.StartUniversalTranscodeBadRequest | 400 | application/json | -| errors.StartUniversalTranscodeUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/watchlist/README.md b/docs/sdks/watchlist/README.md deleted file mode 100644 index 5e8b75bd..00000000 --- a/docs/sdks/watchlist/README.md +++ /dev/null @@ -1,91 +0,0 @@ -# Watchlist -(*watchlist*) - -## Overview - -API Calls that perform operations with Plex Media Server Watchlists - - -### Available Operations - -* [getWatchList](#getwatchlist) - Get User Watchlist - -## getWatchList - -Get User Watchlist - -### Example Usage - - -```typescript -import { PlexAPI } from "@lukehagar/plexjs"; -import { Filter } from "@lukehagar/plexjs/sdk/models/operations"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function run() { - const result = await plexAPI.watchlist.getWatchList({ - filter: Filter.Released, - xPlexToken: "CV5xoxjTpFKUzBTShsaf", - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { watchlistGetWatchList } from "@lukehagar/plexjs/funcs/watchlistGetWatchList.js"; -import { Filter } from "@lukehagar/plexjs/sdk/models/operations"; - -// Use `PlexAPICore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const plexAPI = new PlexAPICore({ - accessToken: "", -}); - -async function run() { - const res = await watchlistGetWatchList(plexAPI, { - filter: Filter.Released, - xPlexToken: "CV5xoxjTpFKUzBTShsaf", - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("watchlistGetWatchList failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetWatchListRequest](../../sdk/models/operations/getwatchlistrequest.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. | - -### Response - -**Promise\<[operations.GetWatchListResponse](../../sdk/models/operations/getwatchlistresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------- | ------------------------------- | ------------------------------- | -| errors.GetWatchListBadRequest | 400 | application/json | -| errors.GetWatchListUnauthorized | 401 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/types/rfcdate.md b/docs/types/rfcdate.md deleted file mode 100644 index 5d8591eb..00000000 --- a/docs/types/rfcdate.md +++ /dev/null @@ -1,11 +0,0 @@ -# RFCDate - -`types.RFCDate` is a wrapper around Date that allows for JSON marshaling a date string formatted as "2006-01-02". - -## Usage - -```typescript -const d1 = new RFCDate(Date.now()); - -const d2 = new RFCDate("2019-01-01"); -``` \ No newline at end of file diff --git a/examples/generalGetServerInfo.example.ts b/examples/generalGetServerInfo.example.ts new file mode 100644 index 00000000..ebea8139 --- /dev/null +++ b/examples/generalGetServerInfo.example.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import dotenv from "dotenv"; +dotenv.config(); +/** + * Example usage of the @lukehagar/plexjs SDK + * + * To run this example from the examples directory: + * npm run build && npx tsx generalGetServerInfo.example.ts + */ + +import { PlexAPI } from "@lukehagar/plexjs"; + +const plexAPI = new PlexAPI({ + xPlexClientIdentifier: "abc123", + xPlexProduct: "Plex for Roku", + xPlexVersion: "2.4.1", + xPlexPlatform: "Roku", + xPlexPlatformVersion: "4.3 build 1057", + xPlexDevice: "Roku 3", + xPlexModel: "4200X", + xPlexDeviceVendor: "Roku", + xPlexDeviceName: "Living Room TV", + xPlexMarketplace: "googlePlay", +}); + +async function main() { + const result = await plexAPI.general.getServerInfo({}); + + console.log(result); +} + +main().catch(console.error); diff --git a/examples/package-lock.json b/examples/package-lock.json index 74608cce..60331b77 100644 --- a/examples/package-lock.json +++ b/examples/package-lock.json @@ -18,7 +18,7 @@ }, "..": { "name": "@lukehagar/plexjs", - "version": "0.40.3", + "version": "0.41.0", "dependencies": { "zod": "^3.20.0" }, diff --git a/examples/serverGetServerCapabilities.example.ts b/examples/serverGetServerCapabilities.example.ts deleted file mode 100644 index 73e0f62a..00000000 --- a/examples/serverGetServerCapabilities.example.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import dotenv from "dotenv"; -dotenv.config(); -/** - * Example usage of the @lukehagar/plexjs SDK - * - * To run this example from the examples directory: - * npm run build && npx tsx serverGetServerCapabilities.example.ts - */ - -import { PlexAPI } from "@lukehagar/plexjs"; - -const plexAPI = new PlexAPI({ - accessToken: "", -}); - -async function main() { - const result = await plexAPI.server.getServerCapabilities(); - - console.log(result); -} - -main().catch(console.error); diff --git a/jsr.json b/jsr.json index d787f2af..760da4fa 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@lukehagar/plexjs", - "version": "0.40.3", + "version": "0.41.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 89b5d00c..f9dbd82c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@lukehagar/plexjs", - "version": "0.40.3", + "version": "0.41.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@lukehagar/plexjs", - "version": "0.40.3", + "version": "0.41.0", "dependencies": { "zod": "^3.20.0" }, diff --git a/package.json b/package.json index 027971a3..85e68948 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lukehagar/plexjs", - "version": "0.40.3", + "version": "0.41.0", "author": "LukeHagar", "main": "./index.js", "sideEffects": false, diff --git a/src/funcs/activitiesCancelActivity.ts b/src/funcs/activitiesCancelActivity.ts new file mode 100644 index 00000000..35743d9e --- /dev/null +++ b/src/funcs/activitiesCancelActivity.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Cancel a running activity + * + * @remarks + * Cancel a running activity. Admins can cancel all activities but other users can only cancel their own + */ +export function activitiesCancelActivity( + client: PlexAPICore, + request: operations.CancelActivityRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.CancelActivityResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.CancelActivityRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.CancelActivityResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CancelActivityRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + activityId: encodeSimple("activityId", payload.activityId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/activities/{activityId}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "cancelActivity", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.CancelActivityResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.CancelActivityResponse$inboundSchema), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/activitiesCancelServerActivities.ts b/src/funcs/activitiesCancelServerActivities.ts deleted file mode 100644 index 23fedb86..00000000 --- a/src/funcs/activitiesCancelServerActivities.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Cancel Server Activities - * - * @remarks - * Cancel Server Activities - */ -export function activitiesCancelServerActivities( - client: PlexAPICore, - activityUUID: string, - options?: RequestOptions, -): APIPromise< - Result< - operations.CancelServerActivitiesResponse, - | errors.CancelServerActivitiesBadRequest - | errors.CancelServerActivitiesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - activityUUID, - options, - )); -} - -async function $do( - client: PlexAPICore, - activityUUID: string, - options?: RequestOptions, -): Promise< - [ - Result< - operations.CancelServerActivitiesResponse, - | errors.CancelServerActivitiesBadRequest - | errors.CancelServerActivitiesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.CancelServerActivitiesRequest = { - activityUUID: activityUUID, - }; - - const parsed = safeParse( - input, - (value) => - operations.CancelServerActivitiesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - activityUUID: encodeSimple("activityUUID", payload.activityUUID, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/activities/{activityUUID}")(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "cancelServerActivities", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.CancelServerActivitiesBadRequest - | errors.CancelServerActivitiesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.CancelServerActivitiesResponse$inboundSchema), - M.jsonErr(400, errors.CancelServerActivitiesBadRequest$inboundSchema), - M.jsonErr(401, errors.CancelServerActivitiesUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/activitiesGetServerActivities.ts b/src/funcs/activitiesGetServerActivities.ts deleted file mode 100644 index 6bb0f05c..00000000 --- a/src/funcs/activitiesGetServerActivities.ts +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Server Activities - * - * @remarks - * Get Server Activities - */ -export function activitiesGetServerActivities( - client: PlexAPICore, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetServerActivitiesResponse, - | errors.GetServerActivitiesBadRequest - | errors.GetServerActivitiesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - options, - )); -} - -async function $do( - client: PlexAPICore, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetServerActivitiesResponse, - | errors.GetServerActivitiesBadRequest - | errors.GetServerActivitiesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const path = pathToFunc("/activities")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getServerActivities", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetServerActivitiesBadRequest - | errors.GetServerActivitiesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetServerActivitiesResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetServerActivitiesBadRequest$inboundSchema), - M.jsonErr(401, errors.GetServerActivitiesUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/activitiesListActivities.ts b/src/funcs/activitiesListActivities.ts new file mode 100644 index 00000000..5da8b7f6 --- /dev/null +++ b/src/funcs/activitiesListActivities.ts @@ -0,0 +1,152 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get all activities + * + * @remarks + * List all activities on the server. Admins can see all activities but other users can only see their own + */ +export function activitiesListActivities( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.ListActivitiesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ListActivitiesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/activities")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listActivities", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ListActivitiesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ListActivitiesResponse$inboundSchema, { + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/authenticationGetSourceConnectionInformation.ts b/src/funcs/authenticationGetSourceConnectionInformation.ts deleted file mode 100644 index 26f338ba..00000000 --- a/src/funcs/authenticationGetSourceConnectionInformation.ts +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * 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. - */ -export function authenticationGetSourceConnectionInformation( - client: PlexAPICore, - source: string, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetSourceConnectionInformationResponse, - | errors.GetSourceConnectionInformationBadRequest - | errors.GetSourceConnectionInformationUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - source, - options, - )); -} - -async function $do( - client: PlexAPICore, - source: string, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetSourceConnectionInformationResponse, - | errors.GetSourceConnectionInformationBadRequest - | errors.GetSourceConnectionInformationUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetSourceConnectionInformationRequest = { - source: source, - }; - - const parsed = safeParse( - input, - (value) => - operations.GetSourceConnectionInformationRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/security/resources")(); - - const query = encodeFormQuery({ - "source": payload.source, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getSourceConnectionInformation", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetSourceConnectionInformationBadRequest - | errors.GetSourceConnectionInformationUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.GetSourceConnectionInformationResponse$inboundSchema), - M.jsonErr( - 400, - errors.GetSourceConnectionInformationBadRequest$inboundSchema, - ), - M.jsonErr( - 401, - errors.GetSourceConnectionInformationUnauthorized$inboundSchema, - ), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/authenticationGetTokenDetails.ts b/src/funcs/authenticationGetTokenDetails.ts deleted file mode 100644 index c0eb5c35..00000000 --- a/src/funcs/authenticationGetTokenDetails.ts +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.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 { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Token Details - * - * @remarks - * Get the User data from the provided X-Plex-Token - */ -export function authenticationGetTokenDetails( - client: PlexAPICore, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetTokenDetailsResponse, - | errors.GetTokenDetailsBadRequest - | errors.GetTokenDetailsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - options, - )); -} - -async function $do( - client: PlexAPICore, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetTokenDetailsResponse, - | errors.GetTokenDetailsBadRequest - | errors.GetTokenDetailsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const baseURL = options?.serverURL - || pathToFunc(GetTokenDetailsServerList[0], { charEncoding: "percent" })(); - - const path = pathToFunc("/user")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: baseURL ?? "", - operationID: "getTokenDetails", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: baseURL, - path: path, - headers: headers, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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 - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetTokenDetailsResponse$inboundSchema, { - key: "UserPlexAccount", - }), - M.jsonErr(400, errors.GetTokenDetailsBadRequest$inboundSchema), - M.jsonErr(401, errors.GetTokenDetailsUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/authenticationGetTransientToken.ts b/src/funcs/authenticationGetTransientToken.ts deleted file mode 100644 index 5468fa59..00000000 --- a/src/funcs/authenticationGetTransientToken.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * 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 function authenticationGetTransientToken( - client: PlexAPICore, - type: operations.GetTransientTokenQueryParamType, - scope: operations.Scope, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetTransientTokenResponse, - | errors.GetTransientTokenBadRequest - | errors.GetTransientTokenUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - type, - scope, - options, - )); -} - -async function $do( - client: PlexAPICore, - type: operations.GetTransientTokenQueryParamType, - scope: operations.Scope, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetTransientTokenResponse, - | errors.GetTransientTokenBadRequest - | errors.GetTransientTokenUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetTransientTokenRequest = { - type: type, - scope: scope, - }; - - const parsed = safeParse( - input, - (value) => operations.GetTransientTokenRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/security/token")(); - - const query = encodeFormQuery({ - "scope": payload.scope, - "type": payload.type, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getTransientToken", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetTransientTokenBadRequest - | errors.GetTransientTokenUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.GetTransientTokenResponse$inboundSchema), - M.jsonErr(400, errors.GetTransientTokenBadRequest$inboundSchema), - M.jsonErr(401, errors.GetTransientTokenUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/authenticationPostUsersSignInData.ts b/src/funcs/authenticationPostUsersSignInData.ts deleted file mode 100644 index e7c0ba55..00000000 --- a/src/funcs/authenticationPostUsersSignInData.ts +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeBodyForm, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { PostUsersSignInDataServerList } from "../sdk/models/operations/postuserssignindata.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get User Sign In Data - * - * @remarks - * Sign in user with username and password and return user data with Plex authentication token - */ -export function authenticationPostUsersSignInData( - client: PlexAPICore, - request: operations.PostUsersSignInDataRequest, - options?: RequestOptions, -): APIPromise< - Result< - operations.PostUsersSignInDataResponse, - | errors.PostUsersSignInDataBadRequest - | errors.PostUsersSignInDataUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: PlexAPICore, - request: operations.PostUsersSignInDataRequest, - options?: RequestOptions, -): Promise< - [ - Result< - operations.PostUsersSignInDataResponse, - | errors.PostUsersSignInDataBadRequest - | errors.PostUsersSignInDataUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.PostUsersSignInDataRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - 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 path = pathToFunc("/users/signin")(); - - const headers = new Headers(compactMap({ - "Content-Type": "application/x-www-form-urlencoded", - Accept: "application/json", - "X-Plex-Client-Identifier": encodeSimple( - "X-Plex-Client-Identifier", - payload.ClientID, - { explode: false, charEncoding: "none" }, - ), - "X-Plex-Product": encodeSimple("X-Plex-Product", payload.ClientName, { - explode: false, - charEncoding: "none", - }), - "X-Plex-Version": encodeSimple("X-Plex-Version", payload.ClientVersion, { - explode: false, - charEncoding: "none", - }), - "X-Plex-Device": encodeSimple("X-Plex-Device", payload.DeviceNickname, { - explode: false, - charEncoding: "none", - }), - "X-Plex-Platform": encodeSimple("X-Plex-Platform", payload.Platform, { - explode: false, - charEncoding: "none", - }), - })); - - const context = { - options: client._options, - baseURL: baseURL ?? "", - operationID: "post-users-sign-in-data", - oAuth2Scopes: [], - - resolvedSecurity: null, - - securitySource: null, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - method: "POST", - baseURL: baseURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.PostUsersSignInDataBadRequest - | errors.PostUsersSignInDataUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(201, operations.PostUsersSignInDataResponse$inboundSchema, { - key: "UserPlexAccount", - }), - M.jsonErr(400, errors.PostUsersSignInDataBadRequest$inboundSchema), - M.jsonErr(401, errors.PostUsersSignInDataUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/butlerGetButlerTasks.ts b/src/funcs/butlerGetButlerTasks.ts deleted file mode 100644 index dac515e4..00000000 --- a/src/funcs/butlerGetButlerTasks.ts +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Butler tasks - * - * @remarks - * Returns a list of butler tasks - */ -export function butlerGetButlerTasks( - client: PlexAPICore, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetButlerTasksResponse, - | errors.GetButlerTasksBadRequest - | errors.GetButlerTasksUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - options, - )); -} - -async function $do( - client: PlexAPICore, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetButlerTasksResponse, - | errors.GetButlerTasksBadRequest - | errors.GetButlerTasksUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const path = pathToFunc("/butler")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getButlerTasks", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetButlerTasksBadRequest - | errors.GetButlerTasksUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetButlerTasksResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetButlerTasksBadRequest$inboundSchema), - M.jsonErr(401, errors.GetButlerTasksUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/butlerGetTasks.ts b/src/funcs/butlerGetTasks.ts new file mode 100644 index 00000000..3baa0caa --- /dev/null +++ b/src/funcs/butlerGetTasks.ts @@ -0,0 +1,150 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get all Butler tasks + * + * @remarks + * Get the list of butler tasks and their scheduling + */ +export function butlerGetTasks( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetTasksResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetTasksResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/butler")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getTasks", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetTasksResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetTasksResponse$inboundSchema, { key: "object" }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/butlerStartAllTasks.ts b/src/funcs/butlerStartAllTasks.ts deleted file mode 100644 index d8f0b50f..00000000 --- a/src/funcs/butlerStartAllTasks.ts +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * 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. - */ -export function butlerStartAllTasks( - client: PlexAPICore, - options?: RequestOptions, -): APIPromise< - Result< - operations.StartAllTasksResponse, - | errors.StartAllTasksBadRequest - | errors.StartAllTasksUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - options, - )); -} - -async function $do( - client: PlexAPICore, - options?: RequestOptions, -): Promise< - [ - Result< - operations.StartAllTasksResponse, - | errors.StartAllTasksBadRequest - | errors.StartAllTasksUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const path = pathToFunc("/butler")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "startAllTasks", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.StartAllTasksBadRequest - | errors.StartAllTasksUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.StartAllTasksResponse$inboundSchema), - M.jsonErr(400, errors.StartAllTasksBadRequest$inboundSchema), - M.jsonErr(401, errors.StartAllTasksUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/butlerStartTask.ts b/src/funcs/butlerStartTask.ts index 9a4b04fe..64e4d0ba 100644 --- a/src/funcs/butlerStartTask.ts +++ b/src/funcs/butlerStartTask.ts @@ -17,7 +17,6 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; import { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -29,21 +28,15 @@ import { Result } from "../sdk/types/fp.js"; * 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. + * This endpoint will attempt to start a specific Butler task by name. */ export function butlerStartTask( client: PlexAPICore, - taskName: operations.TaskNameOpen, + request: operations.StartTaskRequest, options?: RequestOptions, ): APIPromise< Result< operations.StartTaskResponse, - | errors.StartTaskBadRequest - | errors.StartTaskUnauthorized | PlexAPIError | ResponseValidationError | ConnectionError @@ -56,21 +49,19 @@ export function butlerStartTask( > { return new APIPromise($do( client, - taskName, + request, options, )); } async function $do( client: PlexAPICore, - taskName: operations.TaskNameOpen, + request: operations.StartTaskRequest, options?: RequestOptions, ): Promise< [ Result< operations.StartTaskResponse, - | errors.StartTaskBadRequest - | errors.StartTaskUnauthorized | PlexAPIError | ResponseValidationError | ConnectionError @@ -83,12 +74,8 @@ async function $do( APICall, ] > { - const input: operations.StartTaskRequest = { - taskName: taskName, - }; - const parsed = safeParse( - input, + request, (value) => operations.StartTaskRequest$outboundSchema.parse(value), "Input validation failed", ); @@ -99,31 +86,83 @@ async function $do( const body = null; const pathParams = { - taskName: encodeSimple("taskName", payload.taskName, { + task: encodeSimple("task", payload.task, { explode: false, charEncoding: "percent", }), }; - const path = pathToFunc("/butler/{taskName}")(pathParams); + const path = pathToFunc("/butler/{task}")(pathParams); const headers = new Headers(compactMap({ - Accept: "application/json", + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), })); - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "startTask", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, - securitySource: client._options.accessToken, + securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" }, @@ -147,7 +186,7 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["400", "401", "4XX", "5XX"], + errorCodes: ["404", "4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -166,8 +205,6 @@ async function $do( const [result] = await M.match< operations.StartTaskResponse, - | errors.StartTaskBadRequest - | errors.StartTaskUnauthorized | PlexAPIError | ResponseValidationError | ConnectionError @@ -178,9 +215,7 @@ async function $do( | SDKValidationError >( M.nil([200, 202], operations.StartTaskResponse$inboundSchema), - M.jsonErr(400, errors.StartTaskBadRequest$inboundSchema), - M.jsonErr(401, errors.StartTaskUnauthorized$inboundSchema), - M.fail("4XX"), + M.fail([404, "4XX"]), M.fail("5XX"), )(response, req, { extraFields: responseFields }); if (!result.ok) { diff --git a/src/funcs/butlerStartTasks.ts b/src/funcs/butlerStartTasks.ts new file mode 100644 index 00000000..91921d3d --- /dev/null +++ b/src/funcs/butlerStartTasks.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * 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. + */ +export function butlerStartTasks( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.StartTasksResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.StartTasksResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/butler")(); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "startTasks", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.StartTasksResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.StartTasksResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/butlerStopAllTasks.ts b/src/funcs/butlerStopAllTasks.ts deleted file mode 100644 index e22a7763..00000000 --- a/src/funcs/butlerStopAllTasks.ts +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Stop all Butler tasks - * - * @remarks - * This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. - */ -export function butlerStopAllTasks( - client: PlexAPICore, - options?: RequestOptions, -): APIPromise< - Result< - operations.StopAllTasksResponse, - | errors.StopAllTasksBadRequest - | errors.StopAllTasksUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - options, - )); -} - -async function $do( - client: PlexAPICore, - options?: RequestOptions, -): Promise< - [ - Result< - operations.StopAllTasksResponse, - | errors.StopAllTasksBadRequest - | errors.StopAllTasksUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const path = pathToFunc("/butler")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "stopAllTasks", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.StopAllTasksBadRequest - | errors.StopAllTasksUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.StopAllTasksResponse$inboundSchema), - M.jsonErr(400, errors.StopAllTasksBadRequest$inboundSchema), - M.jsonErr(401, errors.StopAllTasksUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/butlerStopTask.ts b/src/funcs/butlerStopTask.ts index 1c724d23..95a070c5 100644 --- a/src/funcs/butlerStopTask.ts +++ b/src/funcs/butlerStopTask.ts @@ -17,7 +17,6 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; import { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -29,17 +28,15 @@ import { Result } from "../sdk/types/fp.js"; * 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. + * This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists */ export function butlerStopTask( client: PlexAPICore, - taskName: operations.PathParamTaskNameOpen, + request: operations.StopTaskRequest, options?: RequestOptions, ): APIPromise< Result< operations.StopTaskResponse, - | errors.StopTaskBadRequest - | errors.StopTaskUnauthorized | PlexAPIError | ResponseValidationError | ConnectionError @@ -52,21 +49,19 @@ export function butlerStopTask( > { return new APIPromise($do( client, - taskName, + request, options, )); } async function $do( client: PlexAPICore, - taskName: operations.PathParamTaskNameOpen, + request: operations.StopTaskRequest, options?: RequestOptions, ): Promise< [ Result< operations.StopTaskResponse, - | errors.StopTaskBadRequest - | errors.StopTaskUnauthorized | PlexAPIError | ResponseValidationError | ConnectionError @@ -79,12 +74,8 @@ async function $do( APICall, ] > { - const input: operations.StopTaskRequest = { - taskName: taskName, - }; - const parsed = safeParse( - input, + request, (value) => operations.StopTaskRequest$outboundSchema.parse(value), "Input validation failed", ); @@ -95,31 +86,83 @@ async function $do( const body = null; const pathParams = { - taskName: encodeSimple("taskName", payload.taskName, { + task: encodeSimple("task", payload.task, { explode: false, charEncoding: "percent", }), }; - const path = pathToFunc("/butler/{taskName}")(pathParams); + const path = pathToFunc("/butler/{task}")(pathParams); const headers = new Headers(compactMap({ - Accept: "application/json", + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), })); - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "stopTask", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, - securitySource: client._options.accessToken, + securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" }, @@ -143,7 +186,7 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["400", "401", "404", "4XX", "5XX"], + errorCodes: ["404", "4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -162,8 +205,6 @@ async function $do( const [result] = await M.match< operations.StopTaskResponse, - | errors.StopTaskBadRequest - | errors.StopTaskUnauthorized | PlexAPIError | ResponseValidationError | ConnectionError @@ -174,8 +215,6 @@ async function $do( | SDKValidationError >( M.nil(200, operations.StopTaskResponse$inboundSchema), - M.jsonErr(400, errors.StopTaskBadRequest$inboundSchema), - M.jsonErr(401, errors.StopTaskUnauthorized$inboundSchema), M.fail([404, "4XX"]), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/src/funcs/butlerStopTasks.ts b/src/funcs/butlerStopTasks.ts new file mode 100644 index 00000000..7fe8de3d --- /dev/null +++ b/src/funcs/butlerStopTasks.ts @@ -0,0 +1,150 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Stop all Butler tasks + * + * @remarks + * This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. + */ +export function butlerStopTasks( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.StopTasksResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.StopTasksResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/butler")(); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "stopTasks", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.StopTasksResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.StopTasksResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/collectionsCreateCollection.ts b/src/funcs/collectionsCreateCollection.ts new file mode 100644 index 00000000..32d4153a --- /dev/null +++ b/src/funcs/collectionsCreateCollection.ts @@ -0,0 +1,230 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Create collection + * + * @remarks + * Create a collection in the library + */ +export function collectionsCreateCollection( + client: PlexAPICore, + request: operations.CreateCollectionRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.CreateCollectionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.CreateCollectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.CreateCollectionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CreateCollectionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/library/collections")(); + + const query = encodeFormQuery({ + "sectionId": payload.sectionId, + "smart": payload.smart, + "title": payload.title, + "type": payload.type, + "uri": payload.uri, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "createCollection", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.CreateCollectionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.CreateCollectionResponse$inboundSchema, { + key: "MediaContainerWithMetadata", + }), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/contentGetAlbums.ts b/src/funcs/contentGetAlbums.ts new file mode 100644 index 00000000..15d07e1c --- /dev/null +++ b/src/funcs/contentGetAlbums.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Set section albums + * + * @remarks + * Get all albums in a music section + */ +export function contentGetAlbums( + client: PlexAPICore, + request: operations.GetAlbumsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetAlbumsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetAlbumsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetAlbumsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetAlbumsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/albums")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getAlbums", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetAlbumsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetAlbumsResponse$inboundSchema, { + key: "MediaContainerWithMetadata", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/contentGetAllLeaves.ts b/src/funcs/contentGetAllLeaves.ts new file mode 100644 index 00000000..4fdb251c --- /dev/null +++ b/src/funcs/contentGetAllLeaves.ts @@ -0,0 +1,230 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Set section leaves + * + * @remarks + * Get all leaves in a section (such as episodes in a show section) + */ +export function contentGetAllLeaves( + client: PlexAPICore, + request: operations.GetAllLeavesRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetAllLeavesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetAllLeavesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetAllLeavesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetAllLeavesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/allLeaves")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getAllLeaves", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetAllLeavesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetAllLeavesResponse$inboundSchema, { + key: "MediaContainerWithMetadata", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/contentGetArts.ts b/src/funcs/contentGetArts.ts new file mode 100644 index 00000000..61009591 --- /dev/null +++ b/src/funcs/contentGetArts.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Set section artwork + * + * @remarks + * Get artwork for a library section + */ +export function contentGetArts( + client: PlexAPICore, + request: operations.GetArtsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetArtsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetArtsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetArtsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetArtsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/arts")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getArts", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetArtsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetArtsResponse$inboundSchema, { + key: "MediaContainerWithArtwork", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/contentGetCategories.ts b/src/funcs/contentGetCategories.ts new file mode 100644 index 00000000..e2f99152 --- /dev/null +++ b/src/funcs/contentGetCategories.ts @@ -0,0 +1,230 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Set section categories + * + * @remarks + * Get categories in a library section + */ +export function contentGetCategories( + client: PlexAPICore, + request: operations.GetCategoriesRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetCategoriesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetCategoriesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetCategoriesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetCategoriesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/categories")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getCategories", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetCategoriesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetCategoriesResponse$inboundSchema, { + key: "MediaContainerWithArtwork", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/contentGetCluster.ts b/src/funcs/contentGetCluster.ts new file mode 100644 index 00000000..39adc3cb --- /dev/null +++ b/src/funcs/contentGetCluster.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Set section clusters + * + * @remarks + * Get clusters in a library section (typically for photos) + */ +export function contentGetCluster( + client: PlexAPICore, + request: operations.GetClusterRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetClusterResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetClusterRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetClusterResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetClusterRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/cluster")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getCluster", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetClusterResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetClusterResponse$inboundSchema, { + key: "MediaContainerWithArtwork", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/contentGetCollectionImage.ts b/src/funcs/contentGetCollectionImage.ts new file mode 100644 index 00000000..d933c583 --- /dev/null +++ b/src/funcs/contentGetCollectionImage.ts @@ -0,0 +1,240 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get a collection's image + * + * @remarks + * Get an image for the collection based on the items within + */ +export function contentGetCollectionImage( + client: PlexAPICore, + request: operations.GetCollectionImageRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetCollectionImageResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetCollectionImageRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetCollectionImageResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetCollectionImageRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + collectionId: encodeSimple("collectionId", payload.collectionId, { + explode: false, + charEncoding: "percent", + }), + updatedAt: encodeSimple("updatedAt", payload.updatedAt, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/library/collections/{collectionId}/composite/{updatedAt}", + )(pathParams); + + const query = encodeFormQuery({ + "composite": payload.composite, + }); + + const headers = new Headers(compactMap({ + Accept: "image/jpeg", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getCollectionImage", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetCollectionImageResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.stream(200, operations.GetCollectionImageResponse$inboundSchema, { + ctype: "image/jpeg", + key: "response-stream", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/contentGetCollectionItems.ts b/src/funcs/contentGetCollectionItems.ts new file mode 100644 index 00000000..f1b31667 --- /dev/null +++ b/src/funcs/contentGetCollectionItems.ts @@ -0,0 +1,230 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get items in a collection + * + * @remarks + * Get items in a collection. Note if this collection contains more than 100 items, paging must be used. + */ +export function contentGetCollectionItems( + client: PlexAPICore, + request: operations.GetCollectionItemsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetCollectionItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetCollectionItemsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetCollectionItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetCollectionItemsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + collectionId: encodeSimple("collectionId", payload.collectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/collections/{collectionId}/items")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getCollectionItems", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetCollectionItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetCollectionItemsResponse$inboundSchema, { + key: "MediaContainerWithMetadata", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/contentGetFolders.ts b/src/funcs/contentGetFolders.ts new file mode 100644 index 00000000..0ed1f59d --- /dev/null +++ b/src/funcs/contentGetFolders.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get all folder locations + * + * @remarks + * Get all folder locations of the media in a section + */ +export function contentGetFolders( + client: PlexAPICore, + request: operations.GetFoldersRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetFoldersResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetFoldersRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetFoldersResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetFoldersRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/location")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getFolders", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetFoldersResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetFoldersResponse$inboundSchema, { key: "object" }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/contentGetMetadataItem.ts b/src/funcs/contentGetMetadataItem.ts new file mode 100644 index 00000000..f2aa835d --- /dev/null +++ b/src/funcs/contentGetMetadataItem.ts @@ -0,0 +1,241 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get a metadata item + * + * @remarks + * Get one or more metadata items. + */ +export function contentGetMetadataItem( + client: PlexAPICore, + request: operations.GetMetadataItemRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetMetadataItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetMetadataItemRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetMetadataItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetMetadataItemRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}")(pathParams); + + const query = encodeFormQuery({ + "asyncAugmentMetadata": payload.asyncAugmentMetadata, + "asyncCheckFiles": payload.asyncCheckFiles, + "asyncRefreshAnalysis": payload.asyncRefreshAnalysis, + "asyncRefreshLocalMediaAgent": payload.asyncRefreshLocalMediaAgent, + "augmentCount": payload.augmentCount, + "checkFileAvailability": payload.checkFileAvailability, + "checkFiles": payload.checkFiles, + "skipRefresh": payload.skipRefresh, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getMetadataItem", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetMetadataItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetMetadataItemResponse$inboundSchema, { + hdrs: true, + key: "MediaContainerWithMetadata", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/contentGetSonicPath.ts b/src/funcs/contentGetSonicPath.ts new file mode 100644 index 00000000..d36fd403 --- /dev/null +++ b/src/funcs/contentGetSonicPath.ts @@ -0,0 +1,238 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Similar tracks to transition from one to another + * + * @remarks + * Get a list of audio tracks starting at one and ending at another which are similar across the path + */ +export function contentGetSonicPath( + client: PlexAPICore, + request: operations.GetSonicPathRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetSonicPathResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetSonicPathRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetSonicPathResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetSonicPathRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/computePath")( + pathParams, + ); + + const query = encodeFormQuery({ + "count": payload.count, + "endID": payload.endID, + "maxDistance": payload.maxDistance, + "startID": payload.startID, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getSonicPath", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetSonicPathResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetSonicPathResponse$inboundSchema, { + key: "MediaContainerWithMetadata", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/contentGetSonicallySimilar.ts b/src/funcs/contentGetSonicallySimilar.ts new file mode 100644 index 00000000..e25a78af --- /dev/null +++ b/src/funcs/contentGetSonicallySimilar.ts @@ -0,0 +1,241 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple, queryJoin } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * The nearest audio tracks + * + * @remarks + * Get the nearest audio tracks to a particular analysis + */ +export function contentGetSonicallySimilar( + client: PlexAPICore, + request: operations.GetSonicallySimilarRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetSonicallySimilarResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetSonicallySimilarRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetSonicallySimilarResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetSonicallySimilarRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/nearest")(pathParams); + + const query = queryJoin( + encodeFormQuery({ + "values": payload.values, + }, { explode: false }), + encodeFormQuery({ + "limit": payload.limit, + "maxDistance": payload.maxDistance, + "type": payload.type, + }), + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getSonicallySimilar", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetSonicallySimilarResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetSonicallySimilarResponse$inboundSchema, { + key: "MediaContainerWithMetadata", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/contentListContent.ts b/src/funcs/contentListContent.ts new file mode 100644 index 00000000..7992e32d --- /dev/null +++ b/src/funcs/contentListContent.ts @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get items in the section + * + * @remarks + * Get the items in a section, potentially filtering them + */ +export function contentListContent( + client: PlexAPICore, + request: operations.ListContentRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ListContentResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ListContentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ListContentResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListContentRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/all")(pathParams); + + const query = encodeFormQuery({ + "mediaQuery": payload.mediaQuery, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listContent", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ListContentResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ListContentResponse$inboundSchema, { + hdrs: true, + key: "MediaContainerWithMetadata", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/contentListMoments.ts b/src/funcs/contentListMoments.ts new file mode 100644 index 00000000..199853ae --- /dev/null +++ b/src/funcs/contentListMoments.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Set section moments + * + * @remarks + * Get moments in a library section (typically for photos) + */ +export function contentListMoments( + client: PlexAPICore, + request: operations.ListMomentsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ListMomentsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ListMomentsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ListMomentsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListMomentsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/moment")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listMoments", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ListMomentsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ListMomentsResponse$inboundSchema, { + key: "MediaContainerWithArtwork", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/devicesAddDevice.ts b/src/funcs/devicesAddDevice.ts new file mode 100644 index 00000000..806cf52a --- /dev/null +++ b/src/funcs/devicesAddDevice.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Add a device + * + * @remarks + * This endpoint adds a device to an existing grabber. The device is identified, and added to the correct grabber. + */ +export function devicesAddDevice( + client: PlexAPICore, + request: operations.AddDeviceRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.AddDeviceResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.AddDeviceRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.AddDeviceResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.AddDeviceRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/media/grabbers/devices")(); + + const query = encodeFormQuery({ + "uri": payload.uri, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "addDevice", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.AddDeviceResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.AddDeviceResponse$inboundSchema, { + key: "MediaContainerWithDevice", + }), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/devicesDiscoverDevices.ts b/src/funcs/devicesDiscoverDevices.ts new file mode 100644 index 00000000..e50eab10 --- /dev/null +++ b/src/funcs/devicesDiscoverDevices.ts @@ -0,0 +1,152 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Tell grabbers to discover devices + * + * @remarks + * Tell grabbers to discover devices + */ +export function devicesDiscoverDevices( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.DiscoverDevicesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DiscoverDevicesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/media/grabbers/devices/discover")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "discoverDevices", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DiscoverDevicesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.DiscoverDevicesResponse$inboundSchema, { + key: "MediaContainerWithDevice", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/devicesGetAvailableGrabbers.ts b/src/funcs/devicesGetAvailableGrabbers.ts new file mode 100644 index 00000000..a025696e --- /dev/null +++ b/src/funcs/devicesGetAvailableGrabbers.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get available grabbers + * + * @remarks + * Get available grabbers visible to the server + */ +export function devicesGetAvailableGrabbers( + client: PlexAPICore, + request: operations.GetAvailableGrabbersRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetAvailableGrabbersResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetAvailableGrabbersRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetAvailableGrabbersResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetAvailableGrabbersRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/media/grabbers")(); + + const query = encodeFormQuery({ + "protocol": payload.protocol, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getAvailableGrabbers", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetAvailableGrabbersResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetAvailableGrabbersResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/devicesGetDeviceDetails.ts b/src/funcs/devicesGetDeviceDetails.ts new file mode 100644 index 00000000..f3bf9c19 --- /dev/null +++ b/src/funcs/devicesGetDeviceDetails.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get device details + * + * @remarks + * Get a device's details by its id + */ +export function devicesGetDeviceDetails( + client: PlexAPICore, + request: operations.GetDeviceDetailsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetDeviceDetailsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetDeviceDetailsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetDeviceDetailsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetDeviceDetailsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + deviceId: encodeSimple("deviceId", payload.deviceId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/media/grabbers/devices/{deviceId}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getDeviceDetails", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetDeviceDetailsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetDeviceDetailsResponse$inboundSchema, { + key: "MediaContainerWithDevice", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/devicesGetDevicesChannels.ts b/src/funcs/devicesGetDevicesChannels.ts new file mode 100644 index 00000000..766907cd --- /dev/null +++ b/src/funcs/devicesGetDevicesChannels.ts @@ -0,0 +1,231 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get a device's channels + * + * @remarks + * Get a device's channels by its id + */ +export function devicesGetDevicesChannels( + client: PlexAPICore, + request: operations.GetDevicesChannelsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetDevicesChannelsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetDevicesChannelsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetDevicesChannelsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetDevicesChannelsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + deviceId: encodeSimple("deviceId", payload.deviceId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/media/grabbers/devices/{deviceId}/channels")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getDevicesChannels", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetDevicesChannelsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetDevicesChannelsResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/devicesGetThumb.ts b/src/funcs/devicesGetThumb.ts new file mode 100644 index 00000000..f34212f6 --- /dev/null +++ b/src/funcs/devicesGetThumb.ts @@ -0,0 +1,233 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get device thumb + * + * @remarks + * Get a device's thumb for display to the user + */ +export function devicesGetThumb( + client: PlexAPICore, + request: operations.GetThumbRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetThumbResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetThumbRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetThumbResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetThumbRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + deviceId: encodeSimple("deviceId", payload.deviceId, { + explode: false, + charEncoding: "percent", + }), + version: encodeSimple("version", payload.version, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/media/grabbers/devices/{deviceId}/thumb/{version}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getThumb", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetThumbResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.GetThumbResponse$inboundSchema), + M.nil(301, operations.GetThumbResponse$inboundSchema), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/devicesListDevices.ts b/src/funcs/devicesListDevices.ts new file mode 100644 index 00000000..7548648b --- /dev/null +++ b/src/funcs/devicesListDevices.ts @@ -0,0 +1,153 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get all devices + * + * @remarks + * Get the list of all devices present + */ +export function devicesListDevices( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.ListDevicesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ListDevicesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/media/grabbers/devices")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listDevices", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ListDevicesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ListDevicesResponse$inboundSchema, { + hdrs: true, + key: "MediaContainerWithDevice", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/devicesModifyDevice.ts b/src/funcs/devicesModifyDevice.ts new file mode 100644 index 00000000..fda8fa3a --- /dev/null +++ b/src/funcs/devicesModifyDevice.ts @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Enable or disable a device + * + * @remarks + * Enable or disable a device by its id + */ +export function devicesModifyDevice( + client: PlexAPICore, + request: operations.ModifyDeviceRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ModifyDeviceResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ModifyDeviceRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ModifyDeviceResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ModifyDeviceRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + deviceId: encodeSimple("deviceId", payload.deviceId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/media/grabbers/devices/{deviceId}")(pathParams); + + const query = encodeFormQuery({ + "enabled": payload.enabled, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "modifyDevice", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ModifyDeviceResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ModifyDeviceResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/devicesRemoveDevice.ts b/src/funcs/devicesRemoveDevice.ts new file mode 100644 index 00000000..b306296d --- /dev/null +++ b/src/funcs/devicesRemoveDevice.ts @@ -0,0 +1,229 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Remove a device + * + * @remarks + * Remove a devices by its id along with its channel mappings + */ +export function devicesRemoveDevice( + client: PlexAPICore, + request: operations.RemoveDeviceRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.RemoveDeviceResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.RemoveDeviceRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.RemoveDeviceResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.RemoveDeviceRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + deviceId: encodeSimple("deviceId", payload.deviceId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/media/grabbers/devices/{deviceId}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "removeDevice", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.RemoveDeviceResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.RemoveDeviceResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/devicesScan.ts b/src/funcs/devicesScan.ts new file mode 100644 index 00000000..ffe9582c --- /dev/null +++ b/src/funcs/devicesScan.ts @@ -0,0 +1,236 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Tell a device to scan for channels + * + * @remarks + * Tell a device to scan for channels + */ +export function devicesScan( + client: PlexAPICore, + request: operations.ScanRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ScanResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ScanRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ScanResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ScanRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + deviceId: encodeSimple("deviceId", payload.deviceId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/media/grabbers/devices/{deviceId}/scan")( + pathParams, + ); + + const query = encodeFormQuery({ + "source": payload.source, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "scan", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ScanResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ScanResponse$inboundSchema, { + hdrs: true, + key: "MediaContainerWithDevice", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/devicesSetChannelmap.ts b/src/funcs/devicesSetChannelmap.ts new file mode 100644 index 00000000..e677aba5 --- /dev/null +++ b/src/funcs/devicesSetChannelmap.ts @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { + encodeDeepObjectQuery, + encodeFormQuery, + encodeSimple, + queryJoin, +} from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Set a device's channel mapping + * + * @remarks + * Set a device's channel mapping + */ +export function devicesSetChannelmap( + client: PlexAPICore, + request: operations.SetChannelmapRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.SetChannelmapResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.SetChannelmapRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.SetChannelmapResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.SetChannelmapRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + deviceId: encodeSimple("deviceId", payload.deviceId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/media/grabbers/devices/{deviceId}/channelmap")( + pathParams, + ); + + const query = queryJoin( + encodeDeepObjectQuery({ + "channelMapping": payload.channelMapping, + "channelMappingByKey": payload.channelMappingByKey, + }), + encodeFormQuery({ + "channelsEnabled": payload.channelsEnabled, + }), + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "setChannelmap", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.SetChannelmapResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.SetChannelmapResponse$inboundSchema, { + key: "MediaContainerWithDevice", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/devicesSetDevicePreferences.ts b/src/funcs/devicesSetDevicePreferences.ts new file mode 100644 index 00000000..340d1da4 --- /dev/null +++ b/src/funcs/devicesSetDevicePreferences.ts @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Set device preferences + * + * @remarks + * Set device preferences by its id + */ +export function devicesSetDevicePreferences( + client: PlexAPICore, + request: operations.SetDevicePreferencesRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.SetDevicePreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.SetDevicePreferencesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.SetDevicePreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SetDevicePreferencesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + deviceId: encodeSimple("deviceId", payload.deviceId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/media/grabbers/devices/{deviceId}/prefs")( + pathParams, + ); + + const query = encodeFormQuery({ + "name": payload.name, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "setDevicePreferences", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.SetDevicePreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.SetDevicePreferencesResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/devicesStopScan.ts b/src/funcs/devicesStopScan.ts new file mode 100644 index 00000000..bd01ca13 --- /dev/null +++ b/src/funcs/devicesStopScan.ts @@ -0,0 +1,230 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Tell a device to stop scanning for channels + * + * @remarks + * Tell a device to stop scanning for channels + */ +export function devicesStopScan( + client: PlexAPICore, + request: operations.StopScanRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.StopScanResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.StopScanRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.StopScanResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.StopScanRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + deviceId: encodeSimple("deviceId", payload.deviceId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/media/grabbers/devices/{deviceId}/scan")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "stopScan", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.StopScanResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.StopScanResponse$inboundSchema, { + key: "MediaContainerWithDevice", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadQueueAddDownloadQueueItems.ts b/src/funcs/downloadQueueAddDownloadQueueItems.ts new file mode 100644 index 00000000..62e8c307 --- /dev/null +++ b/src/funcs/downloadQueueAddDownloadQueueItems.ts @@ -0,0 +1,266 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple, queryJoin } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Add to download queue + * + * @remarks + * Available: 0.2.0 + * + * Add items to the download queue + */ +export function downloadQueueAddDownloadQueueItems( + client: PlexAPICore, + request: operations.AddDownloadQueueItemsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.AddDownloadQueueItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.AddDownloadQueueItemsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.AddDownloadQueueItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.AddDownloadQueueItemsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + queueId: encodeSimple("queueId", payload.queueId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/downloadQueue/{queueId}/add")(pathParams); + + const query = queryJoin( + encodeFormQuery({ + "keys": payload.keys, + }, { explode: false }), + encodeFormQuery({ + "advancedSubtitles": payload.advancedSubtitles, + "audioBoost": payload.audioBoost, + "audioChannelCount": payload.audioChannelCount, + "autoAdjustQuality": payload.autoAdjustQuality, + "autoAdjustSubtitle": payload.autoAdjustSubtitle, + "directPlay": payload.directPlay, + "directStream": payload.directStream, + "directStreamAudio": payload.directStreamAudio, + "disableResolutionRotation": payload.disableResolutionRotation, + "hasMDE": payload.hasMDE, + "location": payload.location, + "mediaBufferSize": payload.mediaBufferSize, + "mediaIndex": payload.mediaIndex, + "musicBitrate": payload.musicBitrate, + "offset": payload.offset, + "partIndex": payload.partIndex, + "path": payload.path, + "peakBitrate": payload.peakBitrate, + "photoResolution": payload.photoResolution, + "protocol": payload.protocol, + "secondsPerSegment": payload.secondsPerSegment, + "subtitles": payload.subtitles, + "subtitleSize": payload.subtitleSize, + "videoBitrate": payload.videoBitrate, + "videoQuality": payload.videoQuality, + "videoResolution": payload.videoResolution, + }), + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "addDownloadQueueItems", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.AddDownloadQueueItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.AddDownloadQueueItemsResponse$inboundSchema, { + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadQueueCreateDownloadQueue.ts b/src/funcs/downloadQueueCreateDownloadQueue.ts new file mode 100644 index 00000000..21170e13 --- /dev/null +++ b/src/funcs/downloadQueueCreateDownloadQueue.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Create download queue + * + * @remarks + * Available: 0.2.0 + * + * Creates a download queue for this client if one doesn't exist, or returns the existing queue for this client and user. + */ +export function downloadQueueCreateDownloadQueue( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.CreateDownloadQueueResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.CreateDownloadQueueResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/downloadQueue")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "createDownloadQueue", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.CreateDownloadQueueResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.CreateDownloadQueueResponse$inboundSchema, { + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadQueueGetDownloadQueue.ts b/src/funcs/downloadQueueGetDownloadQueue.ts new file mode 100644 index 00000000..4c9491ce --- /dev/null +++ b/src/funcs/downloadQueueGetDownloadQueue.ts @@ -0,0 +1,230 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get a download queue + * + * @remarks + * Available: 0.2.0 + * + * Get a download queue by its id + */ +export function downloadQueueGetDownloadQueue( + client: PlexAPICore, + request: operations.GetDownloadQueueRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetDownloadQueueResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetDownloadQueueRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetDownloadQueueResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetDownloadQueueRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + queueId: encodeSimple("queueId", payload.queueId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/downloadQueue/{queueId}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getDownloadQueue", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetDownloadQueueResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetDownloadQueueResponse$inboundSchema, { + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadQueueGetDownloadQueueItems.ts b/src/funcs/downloadQueueGetDownloadQueueItems.ts new file mode 100644 index 00000000..00f94a07 --- /dev/null +++ b/src/funcs/downloadQueueGetDownloadQueueItems.ts @@ -0,0 +1,237 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get download queue items + * + * @remarks + * Available: 0.2.0 + * + * Get items from a download queue + */ +export function downloadQueueGetDownloadQueueItems( + client: PlexAPICore, + request: operations.GetDownloadQueueItemsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetDownloadQueueItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetDownloadQueueItemsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetDownloadQueueItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetDownloadQueueItemsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + itemId: encodeSimple("itemId", payload.itemId, { + explode: false, + charEncoding: "percent", + }), + queueId: encodeSimple("queueId", payload.queueId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/downloadQueue/{queueId}/items/{itemId}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getDownloadQueueItems", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetDownloadQueueItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetDownloadQueueItemsResponse$inboundSchema, { + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadQueueGetDownloadQueueMedia.ts b/src/funcs/downloadQueueGetDownloadQueueMedia.ts new file mode 100644 index 00000000..e2a18eac --- /dev/null +++ b/src/funcs/downloadQueueGetDownloadQueueMedia.ts @@ -0,0 +1,236 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Grab download queue media + * + * @remarks + * Available: 0.2.0 + * + * Grab the media for a download queue item + */ +export function downloadQueueGetDownloadQueueMedia( + client: PlexAPICore, + request: operations.GetDownloadQueueMediaRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetDownloadQueueMediaResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetDownloadQueueMediaRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetDownloadQueueMediaResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetDownloadQueueMediaRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + itemId: encodeSimple("itemId", payload.itemId, { + explode: false, + charEncoding: "percent", + }), + queueId: encodeSimple("queueId", payload.queueId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/downloadQueue/{queueId}/item/{itemId}/media")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getDownloadQueueMedia", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetDownloadQueueMediaResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.GetDownloadQueueMediaResponse$inboundSchema), + M.fail(503), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadQueueGetItemDecision.ts b/src/funcs/downloadQueueGetItemDecision.ts new file mode 100644 index 00000000..5de5dcac --- /dev/null +++ b/src/funcs/downloadQueueGetItemDecision.ts @@ -0,0 +1,236 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Grab download queue item decision + * + * @remarks + * Available: 0.2.0 + * + * Grab the decision for a download queue item + */ +export function downloadQueueGetItemDecision( + client: PlexAPICore, + request: operations.GetItemDecisionRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetItemDecisionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetItemDecisionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetItemDecisionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetItemDecisionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + itemId: encodeSimple("itemId", payload.itemId, { + explode: false, + charEncoding: "percent", + }), + queueId: encodeSimple("queueId", payload.queueId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/downloadQueue/{queueId}/item/{itemId}/decision")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getItemDecision", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetItemDecisionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetItemDecisionResponse$inboundSchema, { + key: "MediaContainerWithDecision", + }), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadQueueListDownloadQueueItems.ts b/src/funcs/downloadQueueListDownloadQueueItems.ts new file mode 100644 index 00000000..2e1c8e0a --- /dev/null +++ b/src/funcs/downloadQueueListDownloadQueueItems.ts @@ -0,0 +1,231 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get download queue items + * + * @remarks + * Available: 0.2.0 + * + * Get items from a download queue + */ +export function downloadQueueListDownloadQueueItems( + client: PlexAPICore, + request: operations.ListDownloadQueueItemsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ListDownloadQueueItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ListDownloadQueueItemsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ListDownloadQueueItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListDownloadQueueItemsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + queueId: encodeSimple("queueId", payload.queueId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/downloadQueue/{queueId}/items")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listDownloadQueueItems", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ListDownloadQueueItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ListDownloadQueueItemsResponse$inboundSchema, { + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadQueueRemoveDownloadQueueItems.ts b/src/funcs/downloadQueueRemoveDownloadQueueItems.ts new file mode 100644 index 00000000..d8326532 --- /dev/null +++ b/src/funcs/downloadQueueRemoveDownloadQueueItems.ts @@ -0,0 +1,233 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Delete download queue items + * + * @remarks + * delete items from a download queue + */ +export function downloadQueueRemoveDownloadQueueItems( + client: PlexAPICore, + request: operations.RemoveDownloadQueueItemsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.RemoveDownloadQueueItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.RemoveDownloadQueueItemsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.RemoveDownloadQueueItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.RemoveDownloadQueueItemsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + itemId: encodeSimple("itemId", payload.itemId, { + explode: false, + charEncoding: "percent", + }), + queueId: encodeSimple("queueId", payload.queueId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/downloadQueue/{queueId}/items/{itemId}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "removeDownloadQueueItems", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.RemoveDownloadQueueItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.RemoveDownloadQueueItemsResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadQueueRestartProcessingDownloadQueueItems.ts b/src/funcs/downloadQueueRestartProcessingDownloadQueueItems.ts new file mode 100644 index 00000000..29440414 --- /dev/null +++ b/src/funcs/downloadQueueRestartProcessingDownloadQueueItems.ts @@ -0,0 +1,239 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Restart processing of items from the decision + * + * @remarks + * Available: 0.2.0 + * + * Reprocess download queue items with previous decision parameters + */ +export function downloadQueueRestartProcessingDownloadQueueItems( + client: PlexAPICore, + request: operations.RestartProcessingDownloadQueueItemsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.RestartProcessingDownloadQueueItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.RestartProcessingDownloadQueueItemsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.RestartProcessingDownloadQueueItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.RestartProcessingDownloadQueueItemsRequest$outboundSchema + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + itemId: encodeSimple("itemId", payload.itemId, { + explode: false, + charEncoding: "percent", + }), + queueId: encodeSimple("queueId", payload.queueId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/downloadQueue/{queueId}/items/{itemId}/restart")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "restartProcessingDownloadQueueItems", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.RestartProcessingDownloadQueueItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil( + 200, + operations.RestartProcessingDownloadQueueItemsResponse$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/dvRsAddDeviceToDVR.ts b/src/funcs/dvRsAddDeviceToDVR.ts new file mode 100644 index 00000000..82c47ff2 --- /dev/null +++ b/src/funcs/dvRsAddDeviceToDVR.ts @@ -0,0 +1,235 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Add a device to an existing DVR + * + * @remarks + * Add a device to an existing DVR + */ +export function dvRsAddDeviceToDVR( + client: PlexAPICore, + request: operations.AddDeviceToDVRRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.AddDeviceToDVRResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.AddDeviceToDVRRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.AddDeviceToDVRResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.AddDeviceToDVRRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + deviceId: encodeSimple("deviceId", payload.deviceId, { + explode: false, + charEncoding: "percent", + }), + dvrId: encodeSimple("dvrId", payload.dvrId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/livetv/dvrs/{dvrId}/devices/{deviceId}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "addDeviceToDVR", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.AddDeviceToDVRResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.AddDeviceToDVRResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/dvRsAddLineup.ts b/src/funcs/dvRsAddLineup.ts new file mode 100644 index 00000000..23227192 --- /dev/null +++ b/src/funcs/dvRsAddLineup.ts @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Add a DVR Lineup + * + * @remarks + * Add a lineup to a DVR device's set of lineups. + */ +export function dvRsAddLineup( + client: PlexAPICore, + request: operations.AddLineupRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.AddLineupResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.AddLineupRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.AddLineupResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.AddLineupRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + dvrId: encodeSimple("dvrId", payload.dvrId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/livetv/dvrs/{dvrId}/lineups")(pathParams); + + const query = encodeFormQuery({ + "lineup": payload.lineup, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "addLineup", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.AddLineupResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.AddLineupResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/dvRsCreateDVR.ts b/src/funcs/dvRsCreateDVR.ts new file mode 100644 index 00000000..a83644b7 --- /dev/null +++ b/src/funcs/dvRsCreateDVR.ts @@ -0,0 +1,229 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Create a DVR + * + * @remarks + * Creation of a DVR, after creation of a devcie and a lineup is selected + */ +export function dvRsCreateDVR( + client: PlexAPICore, + request: operations.CreateDVRRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.CreateDVRResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.CreateDVRRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.CreateDVRResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CreateDVRRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/livetv/dvrs")(); + + const query = encodeFormQuery({ + "device": payload.device, + "language": payload.language, + "lineup": payload.lineup, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "createDVR", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.CreateDVRResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.CreateDVRResponse$inboundSchema, { + hdrs: true, + key: "dvrRequestHandler_slash-get-responses-200", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/dvRsDeleteDVR.ts b/src/funcs/dvRsDeleteDVR.ts new file mode 100644 index 00000000..c0b4069d --- /dev/null +++ b/src/funcs/dvRsDeleteDVR.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Delete a single DVR + * + * @remarks + * Delete a single DVR by its id (key) + */ +export function dvRsDeleteDVR( + client: PlexAPICore, + request: operations.DeleteDVRRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DeleteDVRResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.DeleteDVRRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DeleteDVRResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteDVRRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + dvrId: encodeSimple("dvrId", payload.dvrId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/livetv/dvrs/{dvrId}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deleteDVR", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DeleteDVRResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.DeleteDVRResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/dvRsDeleteLineup.ts b/src/funcs/dvRsDeleteLineup.ts new file mode 100644 index 00000000..7e176bde --- /dev/null +++ b/src/funcs/dvRsDeleteLineup.ts @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Delete a DVR Lineup + * + * @remarks + * Deletes a DVR device's lineup. + */ +export function dvRsDeleteLineup( + client: PlexAPICore, + request: operations.DeleteLineupRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DeleteLineupResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.DeleteLineupRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DeleteLineupResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteLineupRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + dvrId: encodeSimple("dvrId", payload.dvrId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/livetv/dvrs/{dvrId}/lineups")(pathParams); + + const query = encodeFormQuery({ + "lineup": payload.lineup, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deleteLineup", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DeleteLineupResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.DeleteLineupResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/dvRsGetDVR.ts b/src/funcs/dvRsGetDVR.ts new file mode 100644 index 00000000..5ff36b47 --- /dev/null +++ b/src/funcs/dvRsGetDVR.ts @@ -0,0 +1,229 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get a single DVR + * + * @remarks + * Get a single DVR by its id (key) + */ +export function dvRsGetDVR( + client: PlexAPICore, + request: operations.GetDVRRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetDVRResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetDVRRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetDVRResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetDVRRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + dvrId: encodeSimple("dvrId", payload.dvrId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/livetv/dvrs/{dvrId}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getDVR", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetDVRResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetDVRResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/dvRsListDVRs.ts b/src/funcs/dvRsListDVRs.ts new file mode 100644 index 00000000..e73f881b --- /dev/null +++ b/src/funcs/dvRsListDVRs.ts @@ -0,0 +1,153 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get DVRs + * + * @remarks + * Get the list of all available DVRs + */ +export function dvRsListDVRs( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.ListDVRsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ListDVRsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/livetv/dvrs")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listDVRs", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ListDVRsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ListDVRsResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/dvRsReloadGuide.ts b/src/funcs/dvRsReloadGuide.ts new file mode 100644 index 00000000..9c99cc24 --- /dev/null +++ b/src/funcs/dvRsReloadGuide.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Tell a DVR to reload program guide + * + * @remarks + * Tell a DVR to reload program guide + */ +export function dvRsReloadGuide( + client: PlexAPICore, + request: operations.ReloadGuideRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ReloadGuideResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ReloadGuideRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ReloadGuideResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ReloadGuideRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + dvrId: encodeSimple("dvrId", payload.dvrId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/livetv/dvrs/{dvrId}/reloadGuide")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "reloadGuide", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ReloadGuideResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.ReloadGuideResponse$inboundSchema, { hdrs: true }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/dvRsRemoveDeviceFromDVR.ts b/src/funcs/dvRsRemoveDeviceFromDVR.ts new file mode 100644 index 00000000..c4b6d869 --- /dev/null +++ b/src/funcs/dvRsRemoveDeviceFromDVR.ts @@ -0,0 +1,236 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Remove a device from an existing DVR + * + * @remarks + * Remove a device from an existing DVR + */ +export function dvRsRemoveDeviceFromDVR( + client: PlexAPICore, + request: operations.RemoveDeviceFromDVRRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.RemoveDeviceFromDVRResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.RemoveDeviceFromDVRRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.RemoveDeviceFromDVRResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.RemoveDeviceFromDVRRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + deviceId: encodeSimple("deviceId", payload.deviceId, { + explode: false, + charEncoding: "percent", + }), + dvrId: encodeSimple("dvrId", payload.dvrId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/livetv/dvrs/{dvrId}/devices/{deviceId}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "removeDeviceFromDVR", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.RemoveDeviceFromDVRResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.RemoveDeviceFromDVRResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/dvRsSetDVRPreferences.ts b/src/funcs/dvRsSetDVRPreferences.ts new file mode 100644 index 00000000..0277be74 --- /dev/null +++ b/src/funcs/dvRsSetDVRPreferences.ts @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Set DVR preferences + * + * @remarks + * Set DVR preferences by name avd value + */ +export function dvRsSetDVRPreferences( + client: PlexAPICore, + request: operations.SetDVRPreferencesRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.SetDVRPreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.SetDVRPreferencesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.SetDVRPreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.SetDVRPreferencesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + dvrId: encodeSimple("dvrId", payload.dvrId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/livetv/dvrs/{dvrId}/prefs")(pathParams); + + const query = encodeFormQuery({ + "name": payload.name, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "setDVRPreferences", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.SetDVRPreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.SetDVRPreferencesResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/dvRsStopDVRReload.ts b/src/funcs/dvRsStopDVRReload.ts new file mode 100644 index 00000000..340421c5 --- /dev/null +++ b/src/funcs/dvRsStopDVRReload.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Tell a DVR to stop reloading program guide + * + * @remarks + * Tell a DVR to stop reloading program guide + */ +export function dvRsStopDVRReload( + client: PlexAPICore, + request: operations.StopDVRReloadRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.StopDVRReloadResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.StopDVRReloadRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.StopDVRReloadResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.StopDVRReloadRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + dvrId: encodeSimple("dvrId", payload.dvrId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/livetv/dvrs/{dvrId}/reloadGuide")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "stopDVRReload", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.StopDVRReloadResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.StopDVRReloadResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/dvRsTuneChannel.ts b/src/funcs/dvRsTuneChannel.ts new file mode 100644 index 00000000..5c507070 --- /dev/null +++ b/src/funcs/dvRsTuneChannel.ts @@ -0,0 +1,235 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Tune a channel on a DVR + * + * @remarks + * Tune a channel on a DVR to the provided channel + */ +export function dvRsTuneChannel( + client: PlexAPICore, + request: operations.TuneChannelRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.TuneChannelResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.TuneChannelRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.TuneChannelResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.TuneChannelRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + channel: encodeSimple("channel", payload.channel, { + explode: false, + charEncoding: "percent", + }), + dvrId: encodeSimple("dvrId", payload.dvrId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/livetv/dvrs/{dvrId}/channels/{channel}/tune")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "tuneChannel", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "500", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.TuneChannelResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.TuneChannelResponse$inboundSchema, { + hdrs: true, + key: "MediaContainerWithMetadata", + }), + M.fail("4XX"), + M.fail([500, "5XX"]), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/epgComputeChannelMap.ts b/src/funcs/epgComputeChannelMap.ts new file mode 100644 index 00000000..74de2056 --- /dev/null +++ b/src/funcs/epgComputeChannelMap.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Compute the best channel map + * + * @remarks + * Compute the best channel map, given device and lineup + */ +export function epgComputeChannelMap( + client: PlexAPICore, + request: operations.ComputeChannelMapRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ComputeChannelMapResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ComputeChannelMapRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ComputeChannelMapResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ComputeChannelMapRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/livetv/epg/channelmap")(); + + const query = encodeFormQuery({ + "device": payload.device, + "lineup": payload.lineup, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "computeChannelMap", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "500", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ComputeChannelMapResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ComputeChannelMapResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail([404, "4XX"]), + M.fail([500, "5XX"]), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/epgGetAllLanguages.ts b/src/funcs/epgGetAllLanguages.ts new file mode 100644 index 00000000..33a9d228 --- /dev/null +++ b/src/funcs/epgGetAllLanguages.ts @@ -0,0 +1,153 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get all languages + * + * @remarks + * Returns a list of all possible languages for EPG data. + */ +export function epgGetAllLanguages( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetAllLanguagesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetAllLanguagesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/livetv/epg/languages")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getAllLanguages", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetAllLanguagesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetAllLanguagesResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/epgGetChannels.ts b/src/funcs/epgGetChannels.ts new file mode 100644 index 00000000..dfff596c --- /dev/null +++ b/src/funcs/epgGetChannels.ts @@ -0,0 +1,227 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get channels for a lineup + * + * @remarks + * Get channels for a lineup within an EPG provider + */ +export function epgGetChannels( + client: PlexAPICore, + request: operations.GetChannelsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetChannelsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetChannelsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetChannelsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetChannelsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/livetv/epg/channels")(); + + const query = encodeFormQuery({ + "lineup": payload.lineup, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getChannels", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetChannelsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetChannelsResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/epgGetCountries.ts b/src/funcs/epgGetCountries.ts new file mode 100644 index 00000000..e503893f --- /dev/null +++ b/src/funcs/epgGetCountries.ts @@ -0,0 +1,153 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get all countries + * + * @remarks + * This endpoint returns a list of countries which EPG data is available for. There are three flavors, as specfied by the `flavor` attribute + */ +export function epgGetCountries( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetCountriesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetCountriesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/livetv/epg/countries")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getCountries", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetCountriesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetCountriesResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/epgGetCountriesLineups.ts b/src/funcs/epgGetCountriesLineups.ts new file mode 100644 index 00000000..d6bf3ab2 --- /dev/null +++ b/src/funcs/epgGetCountriesLineups.ts @@ -0,0 +1,240 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get lineups for a country via postal code + * + * @remarks + * Returns a list of lineups for a given country, EPG provider and postal code + */ +export function epgGetCountriesLineups( + client: PlexAPICore, + request: operations.GetCountriesLineupsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetCountriesLineupsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetCountriesLineupsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetCountriesLineupsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetCountriesLineupsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + country: encodeSimple("country", payload.country, { + explode: false, + charEncoding: "percent", + }), + epgId: encodeSimple("epgId", payload.epgId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/livetv/epg/countries/{country}/{epgId}/lineups")( + pathParams, + ); + + const query = encodeFormQuery({ + "postalCode": payload.postalCode, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getCountriesLineups", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetCountriesLineupsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetCountriesLineupsResponse$inboundSchema, { + key: "MediaContainerWithLineup", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/epgGetCountryRegions.ts b/src/funcs/epgGetCountryRegions.ts new file mode 100644 index 00000000..0dd289d2 --- /dev/null +++ b/src/funcs/epgGetCountryRegions.ts @@ -0,0 +1,235 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get regions for a country + * + * @remarks + * Get regions for a country within an EPG provider + */ +export function epgGetCountryRegions( + client: PlexAPICore, + request: operations.GetCountryRegionsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetCountryRegionsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetCountryRegionsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetCountryRegionsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetCountryRegionsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + country: encodeSimple("country", payload.country, { + explode: false, + charEncoding: "percent", + }), + epgId: encodeSimple("epgId", payload.epgId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/livetv/epg/countries/{country}/{epgId}/regions")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getCountryRegions", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetCountryRegionsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetCountryRegionsResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/epgGetLineup.ts b/src/funcs/epgGetLineup.ts new file mode 100644 index 00000000..fdc8404d --- /dev/null +++ b/src/funcs/epgGetLineup.ts @@ -0,0 +1,225 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Compute the best lineup + * + * @remarks + * Compute the best lineup, given lineup group and device + */ +export function epgGetLineup( + client: PlexAPICore, + request: operations.GetLineupRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetLineupResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetLineupRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetLineupResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetLineupRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/livetv/epg/lineup")(); + + const query = encodeFormQuery({ + "device": payload.device, + "lineupGroup": payload.lineupGroup, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getLineup", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "500", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetLineupResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.GetLineupResponse$inboundSchema, { hdrs: true }), + M.fail([404, "4XX"]), + M.fail([500, "5XX"]), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/epgGetLineupChannels.ts b/src/funcs/epgGetLineupChannels.ts new file mode 100644 index 00000000..63f8f03c --- /dev/null +++ b/src/funcs/epgGetLineupChannels.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get the channels for mulitple lineups + * + * @remarks + * Get the channels across multiple lineups + */ +export function epgGetLineupChannels( + client: PlexAPICore, + request: operations.GetLineupChannelsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetLineupChannelsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetLineupChannelsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetLineupChannelsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetLineupChannelsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/livetv/epg/lineupchannels")(); + + const query = encodeFormQuery({ + "lineup": payload.lineup, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getLineupChannels", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetLineupChannelsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetLineupChannelsResponse$inboundSchema, { + key: "object", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/epgListLineups.ts b/src/funcs/epgListLineups.ts new file mode 100644 index 00000000..d0822881 --- /dev/null +++ b/src/funcs/epgListLineups.ts @@ -0,0 +1,239 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get lineups for a region + * + * @remarks + * Get lineups for a region within an EPG provider + */ +export function epgListLineups( + client: PlexAPICore, + request: operations.ListLineupsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ListLineupsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ListLineupsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ListLineupsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListLineupsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + country: encodeSimple("country", payload.country, { + explode: false, + charEncoding: "percent", + }), + epgId: encodeSimple("epgId", payload.epgId, { + explode: false, + charEncoding: "percent", + }), + region: encodeSimple("region", payload.region, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/livetv/epg/countries/{country}/{epgId}/regions/{region}/lineups", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listLineups", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ListLineupsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ListLineupsResponse$inboundSchema, { + hdrs: true, + key: "MediaContainerWithLineup", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/eventsConnectWebSocket.ts b/src/funcs/eventsConnectWebSocket.ts new file mode 100644 index 00000000..933a2ce5 --- /dev/null +++ b/src/funcs/eventsConnectWebSocket.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Connect to WebSocket + * + * @remarks + * Connect to the web socket to get a stream of events + */ +export function eventsConnectWebSocket( + client: PlexAPICore, + request: operations.ConnectWebSocketRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ConnectWebSocketResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ConnectWebSocketRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ConnectWebSocketResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ConnectWebSocketRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/:/websocket/notifications")(); + + const query = encodeFormQuery({ + "filter": payload.filter, + }); + + const headers = new Headers(compactMap({ + Accept: "application/octet-stream", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "connectWebSocket", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ConnectWebSocketResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.stream(200, operations.ConnectWebSocketResponse$inboundSchema, { + key: "response-stream", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/eventsGetNotifications.ts b/src/funcs/eventsGetNotifications.ts new file mode 100644 index 00000000..8f6738af --- /dev/null +++ b/src/funcs/eventsGetNotifications.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Connect to Eventsource + * + * @remarks + * Connect to the event source to get a stream of events + */ +export function eventsGetNotifications( + client: PlexAPICore, + request: operations.GetNotificationsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetNotificationsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetNotificationsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetNotificationsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetNotificationsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/:/eventsource/notifications")(); + + const query = encodeFormQuery({ + "filter": payload.filter, + }); + + const headers = new Headers(compactMap({ + Accept: "application/octet-stream", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getNotifications", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetNotificationsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.stream(200, operations.GetNotificationsResponse$inboundSchema, { + key: "response-stream", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/generalGetIdentity.ts b/src/funcs/generalGetIdentity.ts new file mode 100644 index 00000000..2750cba6 --- /dev/null +++ b/src/funcs/generalGetIdentity.ts @@ -0,0 +1,152 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get PMS identity + * + * @remarks + * Get details about this PMS's identity + */ +export function generalGetIdentity( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetIdentityResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetIdentityResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/identity")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getIdentity", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetIdentityResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetIdentityResponse$inboundSchema, { + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/generalGetServerInfo.ts b/src/funcs/generalGetServerInfo.ts new file mode 100644 index 00000000..48a6d8fc --- /dev/null +++ b/src/funcs/generalGetServerInfo.ts @@ -0,0 +1,221 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get PMS info + * + * @remarks + * Information about this PMS setup and configuration + */ +export function generalGetServerInfo( + client: PlexAPICore, + request: operations.GetServerInfoRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetServerInfoResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetServerInfoRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetServerInfoResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetServerInfoRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getServerInfo", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetServerInfoResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetServerInfoResponse$inboundSchema, { + key: "MediaContainerWithDirectory", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/generalGetSourceConnectionInformation.ts b/src/funcs/generalGetSourceConnectionInformation.ts new file mode 100644 index 00000000..b0873f91 --- /dev/null +++ b/src/funcs/generalGetSourceConnectionInformation.ts @@ -0,0 +1,232 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * 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. + */ +export function generalGetSourceConnectionInformation( + client: PlexAPICore, + request: operations.GetSourceConnectionInformationRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetSourceConnectionInformationResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetSourceConnectionInformationRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetSourceConnectionInformationResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetSourceConnectionInformationRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/security/resources")(); + + const query = encodeFormQuery({ + "refresh": payload.refresh, + "source": payload.source, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getSourceConnectionInformation", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "403", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json( + 200, + operations.GetSourceConnectionInformationResponse$inboundSchema, + { key: "object" }, + ), + M.fail([400, 403, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/generalGetTransientToken.ts b/src/funcs/generalGetTransientToken.ts new file mode 100644 index 00000000..e5034d32 --- /dev/null +++ b/src/funcs/generalGetTransientToken.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get Transient Tokens + * + * @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. + * Note: This endpoint responds to all HTTP verbs but POST in preferred + */ +export function generalGetTransientToken( + client: PlexAPICore, + request: operations.GetTransientTokenRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetTransientTokenResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetTransientTokenRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetTransientTokenResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetTransientTokenRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/security/token")(); + + const query = encodeFormQuery({ + "scope": payload.scope, + "type": payload.type, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getTransientToken", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "403", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetTransientTokenResponse$inboundSchema, { + key: "object", + }), + M.fail([400, 403, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/hubsCreateCustomHub.ts b/src/funcs/hubsCreateCustomHub.ts new file mode 100644 index 00000000..696057b8 --- /dev/null +++ b/src/funcs/hubsCreateCustomHub.ts @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Create a custom hub + * + * @remarks + * Create a custom hub based on a metadata item + */ +export function hubsCreateCustomHub( + client: PlexAPICore, + request: operations.CreateCustomHubRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.CreateCustomHubResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.CreateCustomHubRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.CreateCustomHubResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CreateCustomHubRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/hubs/sections/{sectionId}/manage")(pathParams); + + const query = encodeFormQuery({ + "metadataItemId": payload.metadataItemId, + "promotedToOwnHome": payload.promotedToOwnHome, + "promotedToRecommended": payload.promotedToRecommended, + "promotedToSharedHome": payload.promotedToSharedHome, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "createCustomHub", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "403", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.CreateCustomHubResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.CreateCustomHubResponse$inboundSchema), + M.fail([400, 403, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/hubsDeleteCustomHub.ts b/src/funcs/hubsDeleteCustomHub.ts new file mode 100644 index 00000000..f708dba5 --- /dev/null +++ b/src/funcs/hubsDeleteCustomHub.ts @@ -0,0 +1,232 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Delete a custom hub + * + * @remarks + * Delete a custom hub from the server + */ +export function hubsDeleteCustomHub( + client: PlexAPICore, + request: operations.DeleteCustomHubRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DeleteCustomHubResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.DeleteCustomHubRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DeleteCustomHubResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteCustomHubRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + identifier: encodeSimple("identifier", payload.identifier, { + explode: false, + charEncoding: "percent", + }), + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/hubs/sections/{sectionId}/manage/{identifier}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deleteCustomHub", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "403", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DeleteCustomHubResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.DeleteCustomHubResponse$inboundSchema), + M.fail([400, 403, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/hubsGetAllHubs.ts b/src/funcs/hubsGetAllHubs.ts new file mode 100644 index 00000000..d46fc063 --- /dev/null +++ b/src/funcs/hubsGetAllHubs.ts @@ -0,0 +1,229 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get global hubs + * + * @remarks + * Get the global hubs in this PMS + */ +export function hubsGetAllHubs( + client: PlexAPICore, + request: operations.GetAllHubsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetAllHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetAllHubsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetAllHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetAllHubsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/hubs")(); + + const query = encodeFormQuery({ + "count": payload.count, + "identifier": payload.identifier, + "onlyTransient": payload.onlyTransient, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getAllHubs", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetAllHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetAllHubsResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/hubsGetContinueWatching.ts b/src/funcs/hubsGetContinueWatching.ts new file mode 100644 index 00000000..bcd08847 --- /dev/null +++ b/src/funcs/hubsGetContinueWatching.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get the continue watching hub + * + * @remarks + * Get the global continue watching hub + */ +export function hubsGetContinueWatching( + client: PlexAPICore, + request: operations.GetContinueWatchingRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetContinueWatchingResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetContinueWatchingRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetContinueWatchingResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetContinueWatchingRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/hubs/continueWatching")(); + + const query = encodeFormQuery({ + "count": payload.count, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getContinueWatching", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetContinueWatchingResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetContinueWatchingResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/hubsGetGlobalHubs.ts b/src/funcs/hubsGetGlobalHubs.ts deleted file mode 100644 index d2e86881..00000000 --- a/src/funcs/hubsGetGlobalHubs.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Global Hubs - * - * @remarks - * Get Global Hubs filtered by the parameters provided. - */ -export function hubsGetGlobalHubs( - client: PlexAPICore, - count?: number | undefined, - onlyTransient?: operations.OnlyTransient | undefined, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetGlobalHubsResponse, - | errors.GetGlobalHubsBadRequest - | errors.GetGlobalHubsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - count, - onlyTransient, - options, - )); -} - -async function $do( - client: PlexAPICore, - count?: number | undefined, - onlyTransient?: operations.OnlyTransient | undefined, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetGlobalHubsResponse, - | errors.GetGlobalHubsBadRequest - | errors.GetGlobalHubsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetGlobalHubsRequest = { - count: count, - onlyTransient: onlyTransient, - }; - - const parsed = safeParse( - input, - (value) => operations.GetGlobalHubsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/hubs")(); - - const query = encodeFormQuery({ - "count": payload.count, - "onlyTransient": payload.onlyTransient, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getGlobalHubs", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetGlobalHubsBadRequest - | errors.GetGlobalHubsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetGlobalHubsResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetGlobalHubsBadRequest$inboundSchema), - M.jsonErr(401, errors.GetGlobalHubsUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/hubsGetHubItems.ts b/src/funcs/hubsGetHubItems.ts new file mode 100644 index 00000000..2a3de508 --- /dev/null +++ b/src/funcs/hubsGetHubItems.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get a hub's items + * + * @remarks + * Get the items within a single hub specified by identifier + */ +export function hubsGetHubItems( + client: PlexAPICore, + request: operations.GetHubItemsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetHubItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetHubItemsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetHubItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetHubItemsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/hubs/items")(); + + const query = encodeFormQuery({ + "count": payload.count, + "identifier": payload.identifier, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getHubItems", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetHubItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetHubItemsResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/hubsGetLibraryHubs.ts b/src/funcs/hubsGetLibraryHubs.ts deleted file mode 100644 index 37b60334..00000000 --- a/src/funcs/hubsGetLibraryHubs.ts +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get library specific hubs - * - * @remarks - * This endpoint will return a list of library specific hubs - */ -export function hubsGetLibraryHubs( - client: PlexAPICore, - sectionId: number, - count?: number | undefined, - onlyTransient?: operations.QueryParamOnlyTransient | undefined, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetLibraryHubsResponse, - | errors.GetLibraryHubsBadRequest - | errors.GetLibraryHubsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - sectionId, - count, - onlyTransient, - options, - )); -} - -async function $do( - client: PlexAPICore, - sectionId: number, - count?: number | undefined, - onlyTransient?: operations.QueryParamOnlyTransient | undefined, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetLibraryHubsResponse, - | errors.GetLibraryHubsBadRequest - | errors.GetLibraryHubsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetLibraryHubsRequest = { - sectionId: sectionId, - count: count, - onlyTransient: onlyTransient, - }; - - const parsed = safeParse( - input, - (value) => operations.GetLibraryHubsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - sectionId: encodeSimple("sectionId", payload.sectionId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/hubs/sections/{sectionId}")(pathParams); - - const query = encodeFormQuery({ - "count": payload.count, - "onlyTransient": payload.onlyTransient, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getLibraryHubs", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetLibraryHubsBadRequest - | errors.GetLibraryHubsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetLibraryHubsResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetLibraryHubsBadRequest$inboundSchema), - M.jsonErr(401, errors.GetLibraryHubsUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/hubsGetMetadataHubs.ts b/src/funcs/hubsGetMetadataHubs.ts new file mode 100644 index 00000000..74ed3418 --- /dev/null +++ b/src/funcs/hubsGetMetadataHubs.ts @@ -0,0 +1,235 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get hubs for section by metadata item + * + * @remarks + * Get the hubs for a section by metadata item. Currently only for music sections + */ +export function hubsGetMetadataHubs( + client: PlexAPICore, + request: operations.GetMetadataHubsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetMetadataHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetMetadataHubsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetMetadataHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetMetadataHubsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + metadataId: encodeSimple("metadataId", payload.metadataId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/hubs/metadata/{metadataId}")(pathParams); + + const query = encodeFormQuery({ + "count": payload.count, + "onlyTransient": payload.onlyTransient, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getMetadataHubs", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetMetadataHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetMetadataHubsResponse$inboundSchema, { + hdrs: true, + key: "MediaContainerWithHubs", + }), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/hubsGetPostplayHubs.ts b/src/funcs/hubsGetPostplayHubs.ts new file mode 100644 index 00000000..7ff6a942 --- /dev/null +++ b/src/funcs/hubsGetPostplayHubs.ts @@ -0,0 +1,235 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get postplay hubs + * + * @remarks + * Get the hubs for a metadata to be displayed in post play + */ +export function hubsGetPostplayHubs( + client: PlexAPICore, + request: operations.GetPostplayHubsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetPostplayHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetPostplayHubsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetPostplayHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetPostplayHubsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + metadataId: encodeSimple("metadataId", payload.metadataId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/hubs/metadata/{metadataId}/postplay")(pathParams); + + const query = encodeFormQuery({ + "count": payload.count, + "onlyTransient": payload.onlyTransient, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getPostplayHubs", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetPostplayHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetPostplayHubsResponse$inboundSchema, { + hdrs: true, + key: "MediaContainerWithHubs", + }), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/hubsGetPromotedHubs.ts b/src/funcs/hubsGetPromotedHubs.ts new file mode 100644 index 00000000..09844446 --- /dev/null +++ b/src/funcs/hubsGetPromotedHubs.ts @@ -0,0 +1,227 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get the hubs which are promoted + * + * @remarks + * Get the global hubs which are promoted (should be displayed on the home screen) + */ +export function hubsGetPromotedHubs( + client: PlexAPICore, + request: operations.GetPromotedHubsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetPromotedHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetPromotedHubsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetPromotedHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetPromotedHubsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/hubs/promoted")(); + + const query = encodeFormQuery({ + "count": payload.count, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getPromotedHubs", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetPromotedHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetPromotedHubsResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/hubsGetRecentlyAdded.ts b/src/funcs/hubsGetRecentlyAdded.ts deleted file mode 100644 index 23c16233..00000000 --- a/src/funcs/hubsGetRecentlyAdded.ts +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Recently Added - * - * @remarks - * This endpoint will return the recently added content. - */ -export function hubsGetRecentlyAdded( - client: PlexAPICore, - request: operations.GetRecentlyAddedRequest, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetRecentlyAddedResponse, - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: PlexAPICore, - request: operations.GetRecentlyAddedRequest, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetRecentlyAddedResponse, - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetRecentlyAddedRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/hubs/home/recentlyAdded")(); - - const query = encodeFormQuery({ - "contentDirectoryID": payload.contentDirectoryID, - "includeMeta": payload.includeMeta, - "pinnedContentDirectoryID": payload.pinnedContentDirectoryID, - "sectionID": payload.sectionID, - "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(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-recently-added", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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, - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetRecentlyAddedResponse$inboundSchema, { - key: "object", - }), - M.fail([400, 401, "4XX"]), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/hubsGetRelatedHubs.ts b/src/funcs/hubsGetRelatedHubs.ts new file mode 100644 index 00000000..3972e52d --- /dev/null +++ b/src/funcs/hubsGetRelatedHubs.ts @@ -0,0 +1,235 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get related hubs + * + * @remarks + * Get the hubs for a metadata related to the provided metadata item + */ +export function hubsGetRelatedHubs( + client: PlexAPICore, + request: operations.GetRelatedHubsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetRelatedHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetRelatedHubsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetRelatedHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetRelatedHubsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + metadataId: encodeSimple("metadataId", payload.metadataId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/hubs/metadata/{metadataId}/related")(pathParams); + + const query = encodeFormQuery({ + "count": payload.count, + "onlyTransient": payload.onlyTransient, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getRelatedHubs", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetRelatedHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetRelatedHubsResponse$inboundSchema, { + hdrs: true, + key: "MediaContainerWithHubs", + }), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/hubsGetSectionHubs.ts b/src/funcs/hubsGetSectionHubs.ts new file mode 100644 index 00000000..5bb903eb --- /dev/null +++ b/src/funcs/hubsGetSectionHubs.ts @@ -0,0 +1,235 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get section hubs + * + * @remarks + * Get the hubs for a single section + */ +export function hubsGetSectionHubs( + client: PlexAPICore, + request: operations.GetSectionHubsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetSectionHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetSectionHubsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetSectionHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetSectionHubsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/hubs/sections/{sectionId}")(pathParams); + + const query = encodeFormQuery({ + "count": payload.count, + "onlyTransient": payload.onlyTransient, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getSectionHubs", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetSectionHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetSectionHubsResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/hubsListHubs.ts b/src/funcs/hubsListHubs.ts new file mode 100644 index 00000000..a6e5526a --- /dev/null +++ b/src/funcs/hubsListHubs.ts @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get hubs + * + * @remarks + * Get the list of hubs including both built-in and custom + */ +export function hubsListHubs( + client: PlexAPICore, + request: operations.ListHubsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ListHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ListHubsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ListHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListHubsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/hubs/sections/{sectionId}/manage")(pathParams); + + const query = encodeFormQuery({ + "metadataItemId": payload.metadataItemId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listHubs", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["403", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ListHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ListHubsResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail([403, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/hubsMoveHub.ts b/src/funcs/hubsMoveHub.ts new file mode 100644 index 00000000..17a49c4b --- /dev/null +++ b/src/funcs/hubsMoveHub.ts @@ -0,0 +1,235 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Move Hub + * + * @remarks + * Changed the ordering of a hub among others hubs + */ +export function hubsMoveHub( + client: PlexAPICore, + request: operations.MoveHubRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.MoveHubResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.MoveHubRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.MoveHubResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MoveHubRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/hubs/sections/{sectionId}/manage/move")(pathParams); + + const query = encodeFormQuery({ + "after": payload.after, + "identifier": payload.identifier, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "moveHub", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["403", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.MoveHubResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.MoveHubResponse$inboundSchema, { + hdrs: true, + key: "get-responses-200", + }), + M.fail([403, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/hubsResetSectionDefaults.ts b/src/funcs/hubsResetSectionDefaults.ts new file mode 100644 index 00000000..c1d8360e --- /dev/null +++ b/src/funcs/hubsResetSectionDefaults.ts @@ -0,0 +1,227 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Reset hubs to defaults + * + * @remarks + * Reset hubs for this section to defaults and delete custom hubs + */ +export function hubsResetSectionDefaults( + client: PlexAPICore, + request: operations.ResetSectionDefaultsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ResetSectionDefaultsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ResetSectionDefaultsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ResetSectionDefaultsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ResetSectionDefaultsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/hubs/sections/{sectionId}/manage")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "resetSectionDefaults", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["403", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ResetSectionDefaultsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.ResetSectionDefaultsResponse$inboundSchema), + M.fail([403, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/hubsUpdateHubVisibility.ts b/src/funcs/hubsUpdateHubVisibility.ts new file mode 100644 index 00000000..58e084ac --- /dev/null +++ b/src/funcs/hubsUpdateHubVisibility.ts @@ -0,0 +1,240 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Change hub visibility + * + * @remarks + * Changed the visibility of a hub for both the admin and shared users + */ +export function hubsUpdateHubVisibility( + client: PlexAPICore, + request: operations.UpdateHubVisibilityRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.UpdateHubVisibilityResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.UpdateHubVisibilityRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.UpdateHubVisibilityResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateHubVisibilityRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + identifier: encodeSimple("identifier", payload.identifier, { + explode: false, + charEncoding: "percent", + }), + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/hubs/sections/{sectionId}/manage/{identifier}")( + pathParams, + ); + + const query = encodeFormQuery({ + "promotedToOwnHome": payload.promotedToOwnHome, + "promotedToRecommended": payload.promotedToRecommended, + "promotedToSharedHome": payload.promotedToSharedHome, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "updateHubVisibility", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["403", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.UpdateHubVisibilityResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.UpdateHubVisibilityResponse$inboundSchema), + M.fail([403, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryAddExtras.ts b/src/funcs/libraryAddExtras.ts new file mode 100644 index 00000000..ad093a83 --- /dev/null +++ b/src/funcs/libraryAddExtras.ts @@ -0,0 +1,233 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Add to an item's extras + * + * @remarks + * Add an extra to a metadata item + */ +export function libraryAddExtras( + client: PlexAPICore, + request: operations.AddExtrasRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.AddExtrasResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.AddExtrasRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.AddExtrasResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.AddExtrasRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/extras")(pathParams); + + const query = encodeFormQuery({ + "extraType": payload.extraType, + "title": payload.title, + "url": payload.url, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "addExtras", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.AddExtrasResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.AddExtrasResponse$inboundSchema), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryAddSection.ts b/src/funcs/libraryAddSection.ts new file mode 100644 index 00000000..099b7a75 --- /dev/null +++ b/src/funcs/libraryAddSection.ts @@ -0,0 +1,244 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { + encodeDeepObjectQuery, + encodeFormQuery, + encodeSimple, + queryJoin, +} from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Add a library section + * + * @remarks + * Add a new library section to the server + */ +export function libraryAddSection( + client: PlexAPICore, + request: operations.AddSectionRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.AddSectionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.AddSectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.AddSectionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.AddSectionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/library/sections/all")(); + + const query = queryJoin( + encodeDeepObjectQuery({ + "prefs": payload.prefs, + }), + encodeFormQuery({ + "agent": payload.agent, + "importFromiTunes": payload.importFromiTunes, + "language": payload.language, + "locations": payload.locations, + "metadataAgentProviderGroupId": payload.metadataAgentProviderGroupId, + "name": payload.name, + "relative": payload.relative, + "scanner": payload.scanner, + "type": payload.type, + }), + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "addSection", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.AddSectionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.AddSectionResponse$inboundSchema, { + key: "slash-get-responses-200", + }), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryAddSubtitles.ts b/src/funcs/libraryAddSubtitles.ts new file mode 100644 index 00000000..926a40d5 --- /dev/null +++ b/src/funcs/libraryAddSubtitles.ts @@ -0,0 +1,237 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Add subtitles + * + * @remarks + * Add a subtitle to a metadata item + */ +export function libraryAddSubtitles( + client: PlexAPICore, + request: operations.AddSubtitlesRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.AddSubtitlesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.AddSubtitlesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.AddSubtitlesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.AddSubtitlesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/subtitles")(pathParams); + + const query = encodeFormQuery({ + "forced": payload.forced, + "format": payload.format, + "hearingImpaired": payload.hearingImpaired, + "language": payload.language, + "mediaItemID": payload.mediaItemID, + "title": payload.title, + "url": payload.url, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "addSubtitles", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.AddSubtitlesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.AddSubtitlesResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryAnalyzeMetadata.ts b/src/funcs/libraryAnalyzeMetadata.ts new file mode 100644 index 00000000..dc8bee07 --- /dev/null +++ b/src/funcs/libraryAnalyzeMetadata.ts @@ -0,0 +1,232 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Analyze an item + * + * @remarks + * Start the analysis of a metadata item + */ +export function libraryAnalyzeMetadata( + client: PlexAPICore, + request: operations.AnalyzeMetadataRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.AnalyzeMetadataResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.AnalyzeMetadataRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.AnalyzeMetadataResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.AnalyzeMetadataRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/analyze")(pathParams); + + const query = encodeFormQuery({ + "artOffset": payload.artOffset, + "thumbOffset": payload.thumbOffset, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "analyzeMetadata", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.AnalyzeMetadataResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.AnalyzeMetadataResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryAutocomplete.ts b/src/funcs/libraryAutocomplete.ts new file mode 100644 index 00000000..314556ba --- /dev/null +++ b/src/funcs/libraryAutocomplete.ts @@ -0,0 +1,239 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get autocompletions for search + * + * @remarks + * The field to autocomplete on is specified by the {field}.query parameter. For example `genre.query` or `title.query`. + * Returns a set of items from the filtered items whose {field} starts with {field}.query. In the results, a {field}.queryRange will be present to express the range of the match + */ +export function libraryAutocomplete( + client: PlexAPICore, + request: operations.AutocompleteRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.AutocompleteResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.AutocompleteRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.AutocompleteResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.AutocompleteRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/autocomplete")( + pathParams, + ); + + const query = encodeFormQuery({ + "field.query": payload["field.query"], + "mediaQuery": payload.mediaQuery, + "type": payload.type, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "autocomplete", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.AutocompleteResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.AutocompleteResponse$inboundSchema, { + hdrs: true, + key: "MediaContainerWithMetadata", + }), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryCancelRefresh.ts b/src/funcs/libraryCancelRefresh.ts new file mode 100644 index 00000000..ec87690d --- /dev/null +++ b/src/funcs/libraryCancelRefresh.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Cancel section refresh + * + * @remarks + * Cancel the refresh of a section + */ +export function libraryCancelRefresh( + client: PlexAPICore, + request: operations.CancelRefreshRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.CancelRefreshResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.CancelRefreshRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.CancelRefreshResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CancelRefreshRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/refresh")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "cancelRefresh", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.CancelRefreshResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.CancelRefreshResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryCleanBundles.ts b/src/funcs/libraryCleanBundles.ts new file mode 100644 index 00000000..35dd2c95 --- /dev/null +++ b/src/funcs/libraryCleanBundles.ts @@ -0,0 +1,150 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Clean bundles + * + * @remarks + * Clean out any now unused bundles. Bundles can become unused when media is deleted + */ +export function libraryCleanBundles( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.CleanBundlesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.CleanBundlesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/library/clean/bundles")(); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "cleanBundles", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.CleanBundlesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.CleanBundlesResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryCollectionsAddCollectionItems.ts b/src/funcs/libraryCollectionsAddCollectionItems.ts new file mode 100644 index 00000000..39818836 --- /dev/null +++ b/src/funcs/libraryCollectionsAddCollectionItems.ts @@ -0,0 +1,235 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Add items to a collection + * + * @remarks + * Add items to a collection by uri + */ +export function libraryCollectionsAddCollectionItems( + client: PlexAPICore, + request: operations.AddCollectionItemsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.AddCollectionItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.AddCollectionItemsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.AddCollectionItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.AddCollectionItemsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + collectionId: encodeSimple("collectionId", payload.collectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/collections/{collectionId}/items")( + pathParams, + ); + + const query = encodeFormQuery({ + "uri": payload.uri, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "addCollectionItems", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.AddCollectionItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.AddCollectionItemsResponse$inboundSchema, { + key: "MediaContainerWithMetadata", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryCollectionsDeleteCollectionItem.ts b/src/funcs/libraryCollectionsDeleteCollectionItem.ts new file mode 100644 index 00000000..84fa588b --- /dev/null +++ b/src/funcs/libraryCollectionsDeleteCollectionItem.ts @@ -0,0 +1,235 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Delete an item from a collection + * + * @remarks + * Delete an item from a collection + */ +export function libraryCollectionsDeleteCollectionItem( + client: PlexAPICore, + request: operations.DeleteCollectionItemRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DeleteCollectionItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.DeleteCollectionItemRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DeleteCollectionItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteCollectionItemRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + collectionId: encodeSimple("collectionId", payload.collectionId, { + explode: false, + charEncoding: "percent", + }), + itemId: encodeSimple("itemId", payload.itemId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/collections/{collectionId}/items/{itemId}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deleteCollectionItem", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DeleteCollectionItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.DeleteCollectionItemResponse$inboundSchema, { + key: "MediaContainerWithMetadata", + }), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryCollectionsMoveCollectionItem.ts b/src/funcs/libraryCollectionsMoveCollectionItem.ts new file mode 100644 index 00000000..690eef0c --- /dev/null +++ b/src/funcs/libraryCollectionsMoveCollectionItem.ts @@ -0,0 +1,239 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Reorder an item in the collection + * + * @remarks + * Reorder items in a collection with one item after another + */ +export function libraryCollectionsMoveCollectionItem( + client: PlexAPICore, + request: operations.MoveCollectionItemRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.MoveCollectionItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.MoveCollectionItemRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.MoveCollectionItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MoveCollectionItemRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + collectionId: encodeSimple("collectionId", payload.collectionId, { + explode: false, + charEncoding: "percent", + }), + itemId: encodeSimple("itemId", payload.itemId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/library/collections/{collectionId}/items/{itemId}/move", + )(pathParams); + + const query = encodeFormQuery({ + "after": payload.after, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "moveCollectionItem", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.MoveCollectionItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.MoveCollectionItemResponse$inboundSchema, { + key: "MediaContainerWithMetadata", + }), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryCreateMarker.ts b/src/funcs/libraryCreateMarker.ts new file mode 100644 index 00000000..04fc1c33 --- /dev/null +++ b/src/funcs/libraryCreateMarker.ts @@ -0,0 +1,245 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { + encodeDeepObjectQuery, + encodeFormQuery, + encodeSimple, + queryJoin, +} from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Create a marker + * + * @remarks + * Create a marker for this user on the metadata item + */ +export function libraryCreateMarker( + client: PlexAPICore, + request: operations.CreateMarkerRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.CreateMarkerResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.CreateMarkerRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.CreateMarkerResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CreateMarkerRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/marker")(pathParams); + + const query = queryJoin( + encodeDeepObjectQuery({ + "attributes": payload.attributes, + }), + encodeFormQuery({ + "endTimeOffset": payload.endTimeOffset, + "startTimeOffset": payload.startTimeOffset, + "type": payload.type, + }), + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "createMarker", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.CreateMarkerResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.CreateMarkerResponse$inboundSchema, { + key: "object", + }), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryDeleteCaches.ts b/src/funcs/libraryDeleteCaches.ts new file mode 100644 index 00000000..5ec23832 --- /dev/null +++ b/src/funcs/libraryDeleteCaches.ts @@ -0,0 +1,150 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Delete library caches + * + * @remarks + * Delete the hub caches so they are recomputed on next request + */ +export function libraryDeleteCaches( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.DeleteCachesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DeleteCachesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/library/caches")(); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deleteCaches", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DeleteCachesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.DeleteCachesResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryDeleteCollection.ts b/src/funcs/libraryDeleteCollection.ts new file mode 100644 index 00000000..b6c5e5d3 --- /dev/null +++ b/src/funcs/libraryDeleteCollection.ts @@ -0,0 +1,232 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Delete a collection + * + * @remarks + * Delete a library collection from the PMS + */ +export function libraryDeleteCollection( + client: PlexAPICore, + request: operations.DeleteCollectionRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DeleteCollectionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.DeleteCollectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DeleteCollectionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteCollectionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + collectionId: encodeSimple("collectionId", payload.collectionId, { + explode: false, + charEncoding: "percent", + }), + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/library/sections/{sectionId}/collection/{collectionId}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deleteCollection", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DeleteCollectionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.DeleteCollectionResponse$inboundSchema), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryDeleteIndexes.ts b/src/funcs/libraryDeleteIndexes.ts new file mode 100644 index 00000000..fa013bc6 --- /dev/null +++ b/src/funcs/libraryDeleteIndexes.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Delete section indexes + * + * @remarks + * Delete all the indexes in a section + */ +export function libraryDeleteIndexes( + client: PlexAPICore, + request: operations.DeleteIndexesRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DeleteIndexesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.DeleteIndexesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DeleteIndexesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteIndexesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/indexes")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deleteIndexes", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DeleteIndexesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.DeleteIndexesResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryDeleteIntros.ts b/src/funcs/libraryDeleteIntros.ts new file mode 100644 index 00000000..32140da8 --- /dev/null +++ b/src/funcs/libraryDeleteIntros.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Delete section intro markers + * + * @remarks + * Delete all the intro markers in a section + */ +export function libraryDeleteIntros( + client: PlexAPICore, + request: operations.DeleteIntrosRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DeleteIntrosResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.DeleteIntrosRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DeleteIntrosResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteIntrosRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/intros")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deleteIntros", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DeleteIntrosResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.DeleteIntrosResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryDeleteLibrary.ts b/src/funcs/libraryDeleteLibrary.ts deleted file mode 100644 index d3e88d30..00000000 --- a/src/funcs/libraryDeleteLibrary.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Delete Library Section - * - * @remarks - * Delete a library using a specific section id - */ -export function libraryDeleteLibrary( - client: PlexAPICore, - sectionKey: number, - options?: RequestOptions, -): APIPromise< - Result< - operations.DeleteLibraryResponse, - | errors.DeleteLibraryBadRequest - | errors.DeleteLibraryUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - sectionKey, - options, - )); -} - -async function $do( - client: PlexAPICore, - sectionKey: number, - options?: RequestOptions, -): Promise< - [ - Result< - operations.DeleteLibraryResponse, - | errors.DeleteLibraryBadRequest - | errors.DeleteLibraryUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.DeleteLibraryRequest = { - sectionKey: sectionKey, - }; - - const parsed = safeParse( - input, - (value) => operations.DeleteLibraryRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - sectionKey: encodeSimple("sectionKey", payload.sectionKey, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/library/sections/{sectionKey}")(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "deleteLibrary", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.DeleteLibraryBadRequest - | errors.DeleteLibraryUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.DeleteLibraryResponse$inboundSchema), - M.jsonErr(400, errors.DeleteLibraryBadRequest$inboundSchema), - M.jsonErr(401, errors.DeleteLibraryUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/libraryDeleteLibrarySection.ts b/src/funcs/libraryDeleteLibrarySection.ts new file mode 100644 index 00000000..a0876352 --- /dev/null +++ b/src/funcs/libraryDeleteLibrarySection.ts @@ -0,0 +1,232 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Delete a library section + * + * @remarks + * Delete a library section by id + */ +export function libraryDeleteLibrarySection( + client: PlexAPICore, + request: operations.DeleteLibrarySectionRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DeleteLibrarySectionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.DeleteLibrarySectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DeleteLibrarySectionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteLibrarySectionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}")(pathParams); + + const query = encodeFormQuery({ + "async": payload.async, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deleteLibrarySection", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DeleteLibrarySectionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.DeleteLibrarySectionResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryDeleteMarker.ts b/src/funcs/libraryDeleteMarker.ts new file mode 100644 index 00000000..c3e1aca5 --- /dev/null +++ b/src/funcs/libraryDeleteMarker.ts @@ -0,0 +1,232 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Delete a marker + * + * @remarks + * Delete a marker for this user on the metadata item + */ +export function libraryDeleteMarker( + client: PlexAPICore, + request: operations.DeleteMarkerRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DeleteMarkerResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.DeleteMarkerRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DeleteMarkerResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteMarkerRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + marker: encodeSimple("marker", payload.marker, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/marker/{marker}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deleteMarker", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DeleteMarkerResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.DeleteMarkerResponse$inboundSchema), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryDeleteMediaItem.ts b/src/funcs/libraryDeleteMediaItem.ts new file mode 100644 index 00000000..347cf685 --- /dev/null +++ b/src/funcs/libraryDeleteMediaItem.ts @@ -0,0 +1,237 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Delete a media item + * + * @remarks + * Delete a single media from a metadata item in the library + */ +export function libraryDeleteMediaItem( + client: PlexAPICore, + request: operations.DeleteMediaItemRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DeleteMediaItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.DeleteMediaItemRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DeleteMediaItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteMediaItemRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + mediaItem: encodeSimple("mediaItem", payload.mediaItem, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/media/{mediaItem}")( + pathParams, + ); + + const query = encodeFormQuery({ + "proxy": payload.proxy, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deleteMediaItem", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DeleteMediaItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.DeleteMediaItemResponse$inboundSchema), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryDeleteMetadataItem.ts b/src/funcs/libraryDeleteMetadataItem.ts new file mode 100644 index 00000000..4169a944 --- /dev/null +++ b/src/funcs/libraryDeleteMetadataItem.ts @@ -0,0 +1,231 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Delete a metadata item + * + * @remarks + * Delete a single metadata item from the library, deleting media as well + */ +export function libraryDeleteMetadataItem( + client: PlexAPICore, + request: operations.DeleteMetadataItemRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DeleteMetadataItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.DeleteMetadataItemRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DeleteMetadataItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteMetadataItemRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}")(pathParams); + + const query = encodeFormQuery({ + "proxy": payload.proxy, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deleteMetadataItem", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DeleteMetadataItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.DeleteMetadataItemResponse$inboundSchema), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryDeleteStream.ts b/src/funcs/libraryDeleteStream.ts new file mode 100644 index 00000000..e9bd3ec6 --- /dev/null +++ b/src/funcs/libraryDeleteStream.ts @@ -0,0 +1,230 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Delete a stream + * + * @remarks + * Delete a stream. Only applies to downloaded subtitle streams or a sidecar subtitle when media deletion is enabled. + */ +export function libraryDeleteStream( + client: PlexAPICore, + request: operations.DeleteStreamRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DeleteStreamResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.DeleteStreamRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DeleteStreamResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteStreamRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ext: encodeSimple("ext", payload.ext, { + explode: false, + charEncoding: "percent", + }), + streamId: encodeSimple("streamId", payload.streamId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/streams/{streamId}.{ext}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deleteStream", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["403", "4XX", "500", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DeleteStreamResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.DeleteStreamResponse$inboundSchema), + M.fail([403, "4XX"]), + M.fail([500, "5XX"]), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryDetectAds.ts b/src/funcs/libraryDetectAds.ts new file mode 100644 index 00000000..e3a2aa9e --- /dev/null +++ b/src/funcs/libraryDetectAds.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Ad-detect an item + * + * @remarks + * Start the detection of ads in a metadata item + */ +export function libraryDetectAds( + client: PlexAPICore, + request: operations.DetectAdsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DetectAdsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.DetectAdsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DetectAdsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DetectAdsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/addetect")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "detectAds", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DetectAdsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.DetectAdsResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryDetectCredits.ts b/src/funcs/libraryDetectCredits.ts new file mode 100644 index 00000000..d9a9e1e7 --- /dev/null +++ b/src/funcs/libraryDetectCredits.ts @@ -0,0 +1,232 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Credit detect a metadata item + * + * @remarks + * Start credit detection on a metadata item + */ +export function libraryDetectCredits( + client: PlexAPICore, + request: operations.DetectCreditsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DetectCreditsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.DetectCreditsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DetectCreditsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DetectCreditsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/credits")(pathParams); + + const query = encodeFormQuery({ + "force": payload.force, + "manual": payload.manual, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "detectCredits", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DetectCreditsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.DetectCreditsResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryDetectIntros.ts b/src/funcs/libraryDetectIntros.ts new file mode 100644 index 00000000..d22b81e5 --- /dev/null +++ b/src/funcs/libraryDetectIntros.ts @@ -0,0 +1,232 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Intro detect an item + * + * @remarks + * Start the detection of intros in a metadata item + */ +export function libraryDetectIntros( + client: PlexAPICore, + request: operations.DetectIntrosRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DetectIntrosResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.DetectIntrosRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DetectIntrosResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DetectIntrosRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/intro")(pathParams); + + const query = encodeFormQuery({ + "force": payload.force, + "threshold": payload.threshold, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "detectIntros", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DetectIntrosResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.DetectIntrosResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryDetectVoiceActivity.ts b/src/funcs/libraryDetectVoiceActivity.ts new file mode 100644 index 00000000..ea037e93 --- /dev/null +++ b/src/funcs/libraryDetectVoiceActivity.ts @@ -0,0 +1,233 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Detect voice activity + * + * @remarks + * Start the detection of voice in a metadata item + */ +export function libraryDetectVoiceActivity( + client: PlexAPICore, + request: operations.DetectVoiceActivityRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DetectVoiceActivityResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.DetectVoiceActivityRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DetectVoiceActivityResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DetectVoiceActivityRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/voiceActivity")(pathParams); + + const query = encodeFormQuery({ + "force": payload.force, + "manual": payload.manual, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "detectVoiceActivity", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DetectVoiceActivityResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.DetectVoiceActivityResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryEditMarker.ts b/src/funcs/libraryEditMarker.ts new file mode 100644 index 00000000..3c313678 --- /dev/null +++ b/src/funcs/libraryEditMarker.ts @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { + encodeDeepObjectQuery, + encodeFormQuery, + encodeSimple, + queryJoin, +} from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Edit a marker + * + * @remarks + * Edit a marker for this user on the metadata item + */ +export function libraryEditMarker( + client: PlexAPICore, + request: operations.EditMarkerRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.EditMarkerResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.EditMarkerRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.EditMarkerResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.EditMarkerRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + marker: encodeSimple("marker", payload.marker, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/marker/{marker}")( + pathParams, + ); + + const query = queryJoin( + encodeDeepObjectQuery({ + "attributes": payload.attributes, + }), + encodeFormQuery({ + "endTimeOffset": payload.endTimeOffset, + "startTimeOffset": payload.startTimeOffset, + "type": payload.type, + }), + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "editMarker", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.EditMarkerResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.EditMarkerResponse$inboundSchema, { + key: "post-responses-200", + }), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryEditMetadataItem.ts b/src/funcs/libraryEditMetadataItem.ts new file mode 100644 index 00000000..ccbeb0b7 --- /dev/null +++ b/src/funcs/libraryEditMetadataItem.ts @@ -0,0 +1,231 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Edit a metadata item + * + * @remarks + * Edit metadata items setting fields + */ +export function libraryEditMetadataItem( + client: PlexAPICore, + request: operations.EditMetadataItemRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.EditMetadataItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.EditMetadataItemRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.EditMetadataItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.EditMetadataItemRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}")(pathParams); + + const query = encodeFormQuery({ + "args": payload.args, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "editMetadataItem", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.EditMetadataItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.EditMetadataItemResponse$inboundSchema), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryEditSection.ts b/src/funcs/libraryEditSection.ts new file mode 100644 index 00000000..62e05564 --- /dev/null +++ b/src/funcs/libraryEditSection.ts @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { + encodeDeepObjectQuery, + encodeFormQuery, + encodeSimple, + queryJoin, +} from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Edit a library section + * + * @remarks + * Edit a library section by id setting parameters + */ +export function libraryEditSection( + client: PlexAPICore, + request: operations.EditSectionRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.EditSectionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.EditSectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.EditSectionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.EditSectionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}")(pathParams); + + const query = queryJoin( + encodeDeepObjectQuery({ + "prefs": payload.prefs, + }), + encodeFormQuery({ + "agent": payload.agent, + "language": payload.language, + "locations": payload.locations, + "metadataAgentProviderGroupId": payload.metadataAgentProviderGroupId, + "name": payload.name, + "scanner": payload.scanner, + }), + ); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "editSection", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.EditSectionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.EditSectionResponse$inboundSchema), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryEmptyTrash.ts b/src/funcs/libraryEmptyTrash.ts new file mode 100644 index 00000000..3e342ece --- /dev/null +++ b/src/funcs/libraryEmptyTrash.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Empty section trash + * + * @remarks + * Empty trash in the section, permanently deleting media/metadata for missing media + */ +export function libraryEmptyTrash( + client: PlexAPICore, + request: operations.EmptyTrashRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.EmptyTrashResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.EmptyTrashRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.EmptyTrashResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.EmptyTrashRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/emptyTrash")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "emptyTrash", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.EmptyTrashResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.EmptyTrashResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGenerateThumbs.ts b/src/funcs/libraryGenerateThumbs.ts new file mode 100644 index 00000000..a389d0f5 --- /dev/null +++ b/src/funcs/libraryGenerateThumbs.ts @@ -0,0 +1,231 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Generate thumbs of chapters for an item + * + * @remarks + * Start the chapter thumb generation for an item + */ +export function libraryGenerateThumbs( + client: PlexAPICore, + request: operations.GenerateThumbsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GenerateThumbsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GenerateThumbsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GenerateThumbsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GenerateThumbsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/chapterThumbs")(pathParams); + + const query = encodeFormQuery({ + "force": payload.force, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "generateThumbs", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GenerateThumbsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.GenerateThumbsResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetActorsLibrary.ts b/src/funcs/libraryGetActorsLibrary.ts deleted file mode 100644 index c0b409f6..00000000 --- a/src/funcs/libraryGetActorsLibrary.ts +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Actors of library media - * - * @remarks - * Retrieves a list of all the actors that are found for the media in this library. - */ -export function libraryGetActorsLibrary( - client: PlexAPICore, - sectionKey: number, - type: operations.GetActorsLibraryQueryParamTypeOpen, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetActorsLibraryResponse, - | errors.GetActorsLibraryBadRequest - | errors.GetActorsLibraryUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - sectionKey, - type, - options, - )); -} - -async function $do( - client: PlexAPICore, - sectionKey: number, - type: operations.GetActorsLibraryQueryParamTypeOpen, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetActorsLibraryResponse, - | errors.GetActorsLibraryBadRequest - | errors.GetActorsLibraryUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetActorsLibraryRequest = { - sectionKey: sectionKey, - type: type, - }; - - const parsed = safeParse( - input, - (value) => operations.GetActorsLibraryRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - sectionKey: encodeSimple("sectionKey", payload.sectionKey, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/library/sections/{sectionKey}/actor")(pathParams); - - const query = encodeFormQuery({ - "type": payload.type, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-actors-library", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "404", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetActorsLibraryResponse, - | errors.GetActorsLibraryBadRequest - | errors.GetActorsLibraryUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetActorsLibraryResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetActorsLibraryBadRequest$inboundSchema), - M.jsonErr(401, errors.GetActorsLibraryUnauthorized$inboundSchema), - M.fail([404, "4XX"]), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/libraryGetAllItemLeaves.ts b/src/funcs/libraryGetAllItemLeaves.ts new file mode 100644 index 00000000..2a92da7e --- /dev/null +++ b/src/funcs/libraryGetAllItemLeaves.ts @@ -0,0 +1,229 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get the leaves of an item + * + * @remarks + * Get the leaves for a metadata item such as the episodes in a show + */ +export function libraryGetAllItemLeaves( + client: PlexAPICore, + request: operations.GetAllItemLeavesRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetAllItemLeavesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetAllItemLeavesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetAllItemLeavesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetAllItemLeavesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/allLeaves")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getAllItemLeaves", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetAllItemLeavesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetAllItemLeavesResponse$inboundSchema, { + hdrs: true, + key: "MediaContainerWithMetadata", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetAllLibraries.ts b/src/funcs/libraryGetAllLibraries.ts deleted file mode 100644 index adbe8705..00000000 --- a/src/funcs/libraryGetAllLibraries.ts +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * 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). - */ -export function libraryGetAllLibraries( - client: PlexAPICore, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetAllLibrariesResponse, - | errors.GetAllLibrariesBadRequest - | errors.GetAllLibrariesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - options, - )); -} - -async function $do( - client: PlexAPICore, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetAllLibrariesResponse, - | errors.GetAllLibrariesBadRequest - | errors.GetAllLibrariesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const path = pathToFunc("/library/sections")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-all-libraries", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetAllLibrariesBadRequest - | errors.GetAllLibrariesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetAllLibrariesResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetAllLibrariesBadRequest$inboundSchema), - M.jsonErr(401, errors.GetAllLibrariesUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/libraryGetAugmentationStatus.ts b/src/funcs/libraryGetAugmentationStatus.ts new file mode 100644 index 00000000..a14e27e5 --- /dev/null +++ b/src/funcs/libraryGetAugmentationStatus.ts @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get augmentation status + * + * @remarks + * Get augmentation status and potentially wait for completion + */ +export function libraryGetAugmentationStatus( + client: PlexAPICore, + request: operations.GetAugmentationStatusRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetAugmentationStatusResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetAugmentationStatusRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetAugmentationStatusResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetAugmentationStatusRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + augmentationId: encodeSimple("augmentationId", payload.augmentationId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/augmentations/{augmentationId}")( + pathParams, + ); + + const query = encodeFormQuery({ + "wait": payload.wait, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getAugmentationStatus", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["401", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetAugmentationStatusResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(204, operations.GetAugmentationStatusResponse$inboundSchema), + M.fail([401, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetAvailableSorts.ts b/src/funcs/libraryGetAvailableSorts.ts new file mode 100644 index 00000000..7f592cd9 --- /dev/null +++ b/src/funcs/libraryGetAvailableSorts.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get a section sorts + * + * @remarks + * Get the sort mechanisms available in a section + */ +export function libraryGetAvailableSorts( + client: PlexAPICore, + request: operations.GetAvailableSortsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetAvailableSortsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetAvailableSortsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetAvailableSortsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetAvailableSortsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/sorts")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getAvailableSorts", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetAvailableSortsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetAvailableSortsResponse$inboundSchema, { + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetChapterImage.ts b/src/funcs/libraryGetChapterImage.ts new file mode 100644 index 00000000..653bc8e8 --- /dev/null +++ b/src/funcs/libraryGetChapterImage.ts @@ -0,0 +1,235 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get a chapter image + * + * @remarks + * Get a single chapter image for a piece of media + */ +export function libraryGetChapterImage( + client: PlexAPICore, + request: operations.GetChapterImageRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetChapterImageResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetChapterImageRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetChapterImageResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetChapterImageRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + chapter: encodeSimple("chapter", payload.chapter, { + explode: false, + charEncoding: "percent", + }), + mediaId: encodeSimple("mediaId", payload.mediaId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/media/{mediaId}/chapterImages/{chapter}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "image/jpeg", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getChapterImage", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetChapterImageResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.stream(200, operations.GetChapterImageResponse$inboundSchema, { + ctype: "image/jpeg", + key: "response-stream", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetCollections.ts b/src/funcs/libraryGetCollections.ts new file mode 100644 index 00000000..f3db937e --- /dev/null +++ b/src/funcs/libraryGetCollections.ts @@ -0,0 +1,236 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get collections in a section + * + * @remarks + * Get all collections in a section + */ +export function libraryGetCollections( + client: PlexAPICore, + request: operations.GetCollectionsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetCollectionsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetCollectionsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetCollectionsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetCollectionsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/collections")( + pathParams, + ); + + const query = encodeFormQuery({ + "mediaQuery": payload.mediaQuery, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getCollections", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetCollectionsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetCollectionsResponse$inboundSchema, { + hdrs: true, + key: "MediaContainerWithMetadata", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetCommon.ts b/src/funcs/libraryGetCommon.ts new file mode 100644 index 00000000..f02f8606 --- /dev/null +++ b/src/funcs/libraryGetCommon.ts @@ -0,0 +1,236 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get common fields for items + * + * @remarks + * Represents a "Common" item. It contains only the common attributes of the items selected by the provided filter + * Fields which are not common will be expressed in the `mixedFields` field + */ +export function libraryGetCommon( + client: PlexAPICore, + request: operations.GetCommonRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetCommonResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetCommonRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetCommonResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetCommonRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/common")(pathParams); + + const query = encodeFormQuery({ + "mediaQuery": payload.mediaQuery, + "type": payload.type, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getCommon", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetCommonResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetCommonResponse$inboundSchema, { + hdrs: true, + key: "MediaContainerWithMetadata", + }), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetCountriesLibrary.ts b/src/funcs/libraryGetCountriesLibrary.ts deleted file mode 100644 index d081aa1a..00000000 --- a/src/funcs/libraryGetCountriesLibrary.ts +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Countries of library media - * - * @remarks - * Retrieves a list of all the countries that are found for the media in this library. - */ -export function libraryGetCountriesLibrary( - client: PlexAPICore, - sectionKey: number, - type: operations.GetCountriesLibraryQueryParamTypeOpen, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetCountriesLibraryResponse, - | errors.GetCountriesLibraryBadRequest - | errors.GetCountriesLibraryUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - sectionKey, - type, - options, - )); -} - -async function $do( - client: PlexAPICore, - sectionKey: number, - type: operations.GetCountriesLibraryQueryParamTypeOpen, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetCountriesLibraryResponse, - | errors.GetCountriesLibraryBadRequest - | errors.GetCountriesLibraryUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetCountriesLibraryRequest = { - sectionKey: sectionKey, - type: type, - }; - - const parsed = safeParse( - input, - (value) => - operations.GetCountriesLibraryRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - sectionKey: encodeSimple("sectionKey", payload.sectionKey, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/library/sections/{sectionKey}/country")(pathParams); - - const query = encodeFormQuery({ - "type": payload.type, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-countries-library", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "404", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetCountriesLibraryResponse, - | errors.GetCountriesLibraryBadRequest - | errors.GetCountriesLibraryUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetCountriesLibraryResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetCountriesLibraryBadRequest$inboundSchema), - M.jsonErr(401, errors.GetCountriesLibraryUnauthorized$inboundSchema), - M.fail([404, "4XX"]), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/libraryGetExtras.ts b/src/funcs/libraryGetExtras.ts new file mode 100644 index 00000000..cccfe2be --- /dev/null +++ b/src/funcs/libraryGetExtras.ts @@ -0,0 +1,229 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get an item's extras + * + * @remarks + * Get the extras for a metadata item + */ +export function libraryGetExtras( + client: PlexAPICore, + request: operations.GetExtrasRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetExtrasResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetExtrasRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetExtrasResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetExtrasRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/extras")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getExtras", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetExtrasResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetExtrasResponse$inboundSchema, { + hdrs: true, + key: "MediaContainerWithMetadata", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetFile.ts b/src/funcs/libraryGetFile.ts new file mode 100644 index 00000000..f3f73ae2 --- /dev/null +++ b/src/funcs/libraryGetFile.ts @@ -0,0 +1,243 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +export enum GetFileAcceptEnum { + audioMpeg3 = "audio/mpeg3", + imageJpeg = "image/jpeg", +} + +/** + * Get a file from a metadata or media bundle + * + * @remarks + * Get a bundle file for a metadata or media item. This is either an image or a mp3 (for a show's theme) + */ +export function libraryGetFile( + client: PlexAPICore, + request: operations.GetFileRequest, + options?: RequestOptions & { acceptHeaderOverride?: GetFileAcceptEnum }, +): APIPromise< + Result< + operations.GetFileResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetFileRequest, + options?: RequestOptions & { acceptHeaderOverride?: GetFileAcceptEnum }, +): Promise< + [ + Result< + operations.GetFileResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetFileRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/file")(pathParams); + + const query = encodeFormQuery({ + "url": payload.url, + }); + + const headers = new Headers(compactMap({ + Accept: options?.acceptHeaderOverride || "audio/mpeg3;q=1, image/jpeg;q=0", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getFile", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetFileResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.stream(200, operations.GetFileResponse$inboundSchema, { + ctype: "audio/mpeg3", + key: "200_audio/mpeg3_response-stream", + }), + M.stream(200, operations.GetFileResponse$inboundSchema, { + ctype: "image/jpeg", + key: "200_image/jpeg_response-stream", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetFileHash.ts b/src/funcs/libraryGetFileHash.ts deleted file mode 100644 index 52c2d497..00000000 --- a/src/funcs/libraryGetFileHash.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Hash Value - * - * @remarks - * This resource returns hash values for local files - */ -export function libraryGetFileHash( - client: PlexAPICore, - url: string, - type?: number | undefined, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetFileHashResponse, - | errors.GetFileHashBadRequest - | errors.GetFileHashUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - url, - type, - options, - )); -} - -async function $do( - client: PlexAPICore, - url: string, - type?: number | undefined, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetFileHashResponse, - | errors.GetFileHashBadRequest - | errors.GetFileHashUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetFileHashRequest = { - url: url, - type: type, - }; - - const parsed = safeParse( - input, - (value) => operations.GetFileHashRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/library/hashes")(); - - const query = encodeFormQuery({ - "type": payload.type, - "url": payload.url, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getFileHash", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetFileHashBadRequest - | errors.GetFileHashUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.GetFileHashResponse$inboundSchema), - M.jsonErr(400, errors.GetFileHashBadRequest$inboundSchema), - M.jsonErr(401, errors.GetFileHashUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/libraryGetFirstCharacters.ts b/src/funcs/libraryGetFirstCharacters.ts new file mode 100644 index 00000000..d4380185 --- /dev/null +++ b/src/funcs/libraryGetFirstCharacters.ts @@ -0,0 +1,237 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get list of first characters + * + * @remarks + * Get list of first characters in this section + */ +export function libraryGetFirstCharacters( + client: PlexAPICore, + request: operations.GetFirstCharactersRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetFirstCharactersResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetFirstCharactersRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetFirstCharactersResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetFirstCharactersRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/firstCharacters")( + pathParams, + ); + + const query = encodeFormQuery({ + "mediaQuery": payload.mediaQuery, + "sort": payload.sort, + "type": payload.type, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getFirstCharacters", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetFirstCharactersResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetFirstCharactersResponse$inboundSchema, { + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetGenresLibrary.ts b/src/funcs/libraryGetGenresLibrary.ts deleted file mode 100644 index 0e46ce9d..00000000 --- a/src/funcs/libraryGetGenresLibrary.ts +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Genres of library media - * - * @remarks - * Retrieves a list of all the genres that are found for the media in this library. - */ -export function libraryGetGenresLibrary( - client: PlexAPICore, - sectionKey: number, - type: operations.GetGenresLibraryQueryParamTypeOpen, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetGenresLibraryResponse, - | errors.GetGenresLibraryBadRequest - | errors.GetGenresLibraryUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - sectionKey, - type, - options, - )); -} - -async function $do( - client: PlexAPICore, - sectionKey: number, - type: operations.GetGenresLibraryQueryParamTypeOpen, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetGenresLibraryResponse, - | errors.GetGenresLibraryBadRequest - | errors.GetGenresLibraryUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetGenresLibraryRequest = { - sectionKey: sectionKey, - type: type, - }; - - const parsed = safeParse( - input, - (value) => operations.GetGenresLibraryRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - sectionKey: encodeSimple("sectionKey", payload.sectionKey, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/library/sections/{sectionKey}/genre")(pathParams); - - const query = encodeFormQuery({ - "type": payload.type, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-genres-library", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "404", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetGenresLibraryResponse, - | errors.GetGenresLibraryBadRequest - | errors.GetGenresLibraryUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetGenresLibraryResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetGenresLibraryBadRequest$inboundSchema), - M.jsonErr(401, errors.GetGenresLibraryUnauthorized$inboundSchema), - M.fail([404, "4XX"]), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/libraryGetImageFromBif.ts b/src/funcs/libraryGetImageFromBif.ts new file mode 100644 index 00000000..e2472c40 --- /dev/null +++ b/src/funcs/libraryGetImageFromBif.ts @@ -0,0 +1,239 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get an image from part BIF + * + * @remarks + * Extract an image from the BIF for a part at a particular offset + */ +export function libraryGetImageFromBif( + client: PlexAPICore, + request: operations.GetImageFromBifRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetImageFromBifResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetImageFromBifRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetImageFromBifResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetImageFromBifRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + index: encodeSimple("index", payload.index, { + explode: false, + charEncoding: "percent", + }), + offset: encodeSimple("offset", payload.offset, { + explode: false, + charEncoding: "percent", + }), + partId: encodeSimple("partId", payload.partId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/parts/{partId}/indexes/{index}/{offset}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "image/jpeg", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getImageFromBif", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetImageFromBifResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.stream(200, operations.GetImageFromBifResponse$inboundSchema, { + ctype: "image/jpeg", + key: "response-stream", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetItemArtwork.ts b/src/funcs/libraryGetItemArtwork.ts new file mode 100644 index 00000000..b375afe7 --- /dev/null +++ b/src/funcs/libraryGetItemArtwork.ts @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +export enum GetItemArtworkAcceptEnum { + audioMpeg3 = "audio/mpeg3", + imageJpeg = "image/jpeg", +} + +/** + * Get an item's artwork, theme, etc + * + * @remarks + * Get the artwork, thumb, element for a metadata item + */ +export function libraryGetItemArtwork( + client: PlexAPICore, + request: operations.GetItemArtworkRequest, + options?: RequestOptions & { + acceptHeaderOverride?: GetItemArtworkAcceptEnum; + }, +): APIPromise< + Result< + operations.GetItemArtworkResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetItemArtworkRequest, + options?: RequestOptions & { + acceptHeaderOverride?: GetItemArtworkAcceptEnum; + }, +): Promise< + [ + Result< + operations.GetItemArtworkResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetItemArtworkRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + element: encodeSimple("element", payload.element, { + explode: false, + charEncoding: "percent", + }), + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + timestamp: encodeSimple("timestamp", payload.timestamp, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/{element}/{timestamp}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: options?.acceptHeaderOverride || "audio/mpeg3;q=1, image/jpeg;q=0", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getItemArtwork", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetItemArtworkResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.stream(200, operations.GetItemArtworkResponse$inboundSchema, { + ctype: "audio/mpeg3", + key: "200_audio/mpeg3_response-stream", + }), + M.stream(200, operations.GetItemArtworkResponse$inboundSchema, { + ctype: "image/jpeg", + key: "200_image/jpeg_response-stream", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetItemTree.ts b/src/funcs/libraryGetItemTree.ts new file mode 100644 index 00000000..2541c028 --- /dev/null +++ b/src/funcs/libraryGetItemTree.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get metadata items as a tree + * + * @remarks + * Get a tree of metadata items, such as the seasons/episodes of a show + */ +export function libraryGetItemTree( + client: PlexAPICore, + request: operations.GetItemTreeRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetItemTreeResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetItemTreeRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetItemTreeResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetItemTreeRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/tree")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getItemTree", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetItemTreeResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetItemTreeResponse$inboundSchema, { + key: "MediaContainerWithNestedMetadata", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetLibraryDetails.ts b/src/funcs/libraryGetLibraryDetails.ts index 1d7a2614..3d80833b 100644 --- a/src/funcs/libraryGetLibraryDetails.ts +++ b/src/funcs/libraryGetLibraryDetails.ts @@ -17,7 +17,6 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; import { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -26,59 +25,18 @@ import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** - * Get Library Details + * Get a library section by id * * @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. + * Returns details for the library. This can be thought of as an interstitial endpoint because it contains information about the library, rather than content itself. It often contains a list of `Directory` metadata objects: These used to be used by clients to build a menuing system. */ export function libraryGetLibraryDetails( client: PlexAPICore, - sectionKey: number, - includeDetails?: operations.IncludeDetails | undefined, + request: operations.GetLibraryDetailsRequest, options?: RequestOptions, ): APIPromise< Result< operations.GetLibraryDetailsResponse, - | errors.GetLibraryDetailsBadRequest - | errors.GetLibraryDetailsUnauthorized | PlexAPIError | ResponseValidationError | ConnectionError @@ -91,23 +49,19 @@ export function libraryGetLibraryDetails( > { return new APIPromise($do( client, - sectionKey, - includeDetails, + request, options, )); } async function $do( client: PlexAPICore, - sectionKey: number, - includeDetails?: operations.IncludeDetails | undefined, + request: operations.GetLibraryDetailsRequest, options?: RequestOptions, ): Promise< [ Result< operations.GetLibraryDetailsResponse, - | errors.GetLibraryDetailsBadRequest - | errors.GetLibraryDetailsUnauthorized | PlexAPIError | ResponseValidationError | ConnectionError @@ -120,13 +74,8 @@ async function $do( APICall, ] > { - const input: operations.GetLibraryDetailsRequest = { - sectionKey: sectionKey, - includeDetails: includeDetails, - }; - const parsed = safeParse( - input, + request, (value) => operations.GetLibraryDetailsRequest$outboundSchema.parse(value), "Input validation failed", ); @@ -137,13 +86,13 @@ async function $do( const body = null; const pathParams = { - sectionKey: encodeSimple("sectionKey", payload.sectionKey, { + sectionId: encodeSimple("sectionId", payload.sectionId, { explode: false, charEncoding: "percent", }), }; - const path = pathToFunc("/library/sections/{sectionKey}")(pathParams); + const path = pathToFunc("/library/sections/{sectionId}")(pathParams); const query = encodeFormQuery({ "includeDetails": payload.includeDetails, @@ -151,21 +100,73 @@ async function $do( const headers = new Headers(compactMap({ Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), })); - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-library-details", - oAuth2Scopes: [], + operationID: "getLibraryDetails", + oAuth2Scopes: null, resolvedSecurity: requestSecurity, - securitySource: client._options.accessToken, + securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" }, @@ -190,7 +191,7 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["400", "401", "4XX", "5XX"], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -209,8 +210,6 @@ async function $do( const [result] = await M.match< operations.GetLibraryDetailsResponse, - | errors.GetLibraryDetailsBadRequest - | errors.GetLibraryDetailsUnauthorized | PlexAPIError | ResponseValidationError | ConnectionError @@ -223,8 +222,6 @@ async function $do( M.json(200, operations.GetLibraryDetailsResponse$inboundSchema, { key: "object", }), - M.jsonErr(400, errors.GetLibraryDetailsBadRequest$inboundSchema), - M.jsonErr(401, errors.GetLibraryDetailsUnauthorized$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/src/funcs/libraryGetLibraryItems.ts b/src/funcs/libraryGetLibraryItems.ts index e55b05bd..07c10fd3 100644 --- a/src/funcs/libraryGetLibraryItems.ts +++ b/src/funcs/libraryGetLibraryItems.ts @@ -17,7 +17,6 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; import { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -26,30 +25,10 @@ import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** - * Get Library Items + * Get all items in library * * @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. - * - `albums`: Items categorized by album. + * Request all metadata items according to a query. */ export function libraryGetLibraryItems( client: PlexAPICore, @@ -58,8 +37,6 @@ export function libraryGetLibraryItems( ): APIPromise< Result< operations.GetLibraryItemsResponse, - | errors.GetLibraryItemsBadRequest - | errors.GetLibraryItemsUnauthorized | PlexAPIError | ResponseValidationError | ConnectionError @@ -85,8 +62,6 @@ async function $do( [ Result< operations.GetLibraryItemsResponse, - | errors.GetLibraryItemsBadRequest - | errors.GetLibraryItemsUnauthorized | PlexAPIError | ResponseValidationError | ConnectionError @@ -110,44 +85,81 @@ async function $do( 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 path = pathToFunc("/library/sections/{sectionKey}/{tag}")(pathParams); + const path = pathToFunc("/library/all")(); 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"], + "mediaQuery": payload.mediaQuery, }); const headers = new Headers(compactMap({ Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), })); - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-library-items", - oAuth2Scopes: [], + operationID: "getLibraryItems", + oAuth2Scopes: null, resolvedSecurity: requestSecurity, - securitySource: client._options.accessToken, + securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" }, @@ -172,7 +184,7 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["400", "401", "4XX", "5XX"], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -191,8 +203,6 @@ async function $do( const [result] = await M.match< operations.GetLibraryItemsResponse, - | errors.GetLibraryItemsBadRequest - | errors.GetLibraryItemsUnauthorized | PlexAPIError | ResponseValidationError | ConnectionError @@ -203,10 +213,9 @@ async function $do( | SDKValidationError >( M.json(200, operations.GetLibraryItemsResponse$inboundSchema, { - key: "object", + hdrs: true, + key: "MediaContainerWithMetadata", }), - M.jsonErr(400, errors.GetLibraryItemsBadRequest$inboundSchema), - M.jsonErr(401, errors.GetLibraryItemsUnauthorized$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/src/funcs/libraryGetLibraryMatches.ts b/src/funcs/libraryGetLibraryMatches.ts new file mode 100644 index 00000000..d7c3d304 --- /dev/null +++ b/src/funcs/libraryGetLibraryMatches.ts @@ -0,0 +1,244 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get library matches + * + * @remarks + * The matches endpoint is used to match content external to the library with content inside the library. This is done by passing a series of semantic "hints" about the content (its type, name, or release year). Each type (e.g. movie) has a canonical set of minimal required hints. + * This ability to match content is useful in a variety of scenarios. For example, in the DVR, the EPG uses the endpoint to match recording rules against airing content. And in the cloud, the UMP uses the endpoint to match up a piece of media with rich metadata. + * The endpoint response can including multiple matches, if there is ambiguity, each one containing a `score` from 0 to 100. For somewhat historical reasons, anything over 85 is considered a positive match (we prefer false negatives over false positives in general for matching). + * The `guid` hint is somewhat special, in that it generally represents a unique identity for a piece of media (e.g. the IMDB `ttXXX`) identifier, in contrast with other hints which can be much more ambiguous (e.g. a title of `Jane Eyre`, which could refer to the 1943 or the 2011 version). + * Episodes require either a season/episode pair, or an air date (or both). Either the path must be sent, or the show title + */ +export function libraryGetLibraryMatches( + client: PlexAPICore, + request: operations.GetLibraryMatchesRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetLibraryMatchesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetLibraryMatchesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetLibraryMatchesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetLibraryMatchesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/library/matches")(); + + const query = encodeFormQuery({ + "grandparentTitle": payload.grandparentTitle, + "grandparentYear": payload.grandparentYear, + "guid": payload.guid, + "includeAlternateMetadataSources": payload.includeAlternateMetadataSources, + "includeAncestorMetadata": payload.includeAncestorMetadata, + "includeFullMetadata": payload.includeFullMetadata, + "index": payload.index, + "originallyAvailableAt": payload.originallyAvailableAt, + "parentIndex": payload.parentIndex, + "parentTitle": payload.parentTitle, + "path": payload.path, + "title": payload.title, + "type": payload.type, + "year": payload.year, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getLibraryMatches", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetLibraryMatchesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetLibraryMatchesResponse$inboundSchema, { + hdrs: true, + key: "MediaContainerWithMetadata", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetLibrarySectionsAll.ts b/src/funcs/libraryGetLibrarySectionsAll.ts deleted file mode 100644 index 60b12248..00000000 --- a/src/funcs/libraryGetLibrarySectionsAll.ts +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Library section media by tag ALL - * - * @remarks - * Retrieves a list of all general media data for this library. - */ -export function libraryGetLibrarySectionsAll( - client: PlexAPICore, - request: operations.GetLibrarySectionsAllRequest, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetLibrarySectionsAllResponse, - | errors.GetLibrarySectionsAllBadRequest - | errors.GetLibrarySectionsAllUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: PlexAPICore, - request: operations.GetLibrarySectionsAllRequest, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetLibrarySectionsAllResponse, - | errors.GetLibrarySectionsAllBadRequest - | errors.GetLibrarySectionsAllUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetLibrarySectionsAllRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - sectionKey: encodeSimple("sectionKey", payload.sectionKey, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/library/sections/{sectionKey}/all")(pathParams); - - const query = encodeFormQuery({ - "includeAdvanced": payload.includeAdvanced, - "includeCollections": payload.includeCollections, - "includeExternalMedia": payload.includeExternalMedia, - "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(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-library-sections-all", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "404", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetLibrarySectionsAllResponse, - | errors.GetLibrarySectionsAllBadRequest - | errors.GetLibrarySectionsAllUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetLibrarySectionsAllResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetLibrarySectionsAllBadRequest$inboundSchema), - M.jsonErr(401, errors.GetLibrarySectionsAllUnauthorized$inboundSchema), - M.fail([404, "4XX"]), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/libraryGetMediaArts.ts b/src/funcs/libraryGetMediaArts.ts deleted file mode 100644 index 0f66fe7e..00000000 --- a/src/funcs/libraryGetMediaArts.ts +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Media Background Artwork - * - * @remarks - * Returns the background artwork for a library item. - */ -export function libraryGetMediaArts( - client: PlexAPICore, - ratingKey: number, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetMediaArtsResponse, - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - ratingKey, - options, - )); -} - -async function $do( - client: PlexAPICore, - ratingKey: number, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetMediaArtsResponse, - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetMediaArtsRequest = { - ratingKey: ratingKey, - }; - - const parsed = safeParse( - input, - (value) => operations.GetMediaArtsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - ratingKey: encodeSimple("ratingKey", payload.ratingKey, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/library/metadata/{ratingKey}/arts")(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-media-arts", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["404", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetMediaArtsResponse, - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetMediaArtsResponse$inboundSchema, { - key: "object", - }), - M.fail([404, "4XX"]), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/libraryGetMediaMetaData.ts b/src/funcs/libraryGetMediaMetaData.ts deleted file mode 100644 index 8f0573d3..00000000 --- a/src/funcs/libraryGetMediaMetaData.ts +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Media Metadata - * - * @remarks - * This endpoint will return all the (meta)data of one or more library items specified by the ratingKey. - * Multiple rating keys can be provided as a comma-separated list (e.g., "21119,21617"). - */ -export function libraryGetMediaMetaData( - client: PlexAPICore, - request: operations.GetMediaMetaDataRequest, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetMediaMetaDataResponse, - | errors.GetMediaMetaDataBadRequest - | errors.GetMediaMetaDataUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: PlexAPICore, - request: operations.GetMediaMetaDataRequest, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetMediaMetaDataResponse, - | errors.GetMediaMetaDataBadRequest - | errors.GetMediaMetaDataUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetMediaMetaDataRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - ratingKey: encodeSimple("ratingKey", payload.ratingKey, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/library/metadata/{ratingKey}")(pathParams); - - const query = encodeFormQuery({ - "asyncAugmentMetadata": payload.asyncAugmentMetadata, - "asyncCheckFiles": payload.asyncCheckFiles, - "asyncRefreshAnalysis": payload.asyncRefreshAnalysis, - "asyncRefreshLocalMediaAgent": payload.asyncRefreshLocalMediaAgent, - "includeChapters": payload.includeChapters, - "includeConcerts": payload.includeConcerts, - "includeExternalMedia": payload.includeExternalMedia, - "includeExtras": payload.includeExtras, - "includeOnDeck": payload.includeOnDeck, - "includePopularLeaves": payload.includePopularLeaves, - "includePreferences": payload.includePreferences, - "includeReviews": payload.includeReviews, - "includeStations": payload.includeStations, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-media-meta-data", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "404", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetMediaMetaDataResponse, - | errors.GetMediaMetaDataBadRequest - | errors.GetMediaMetaDataUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetMediaMetaDataResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetMediaMetaDataBadRequest$inboundSchema), - M.jsonErr(401, errors.GetMediaMetaDataUnauthorized$inboundSchema), - M.fail([404, "4XX"]), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/libraryGetMediaPart.ts b/src/funcs/libraryGetMediaPart.ts new file mode 100644 index 00000000..9d957b52 --- /dev/null +++ b/src/funcs/libraryGetMediaPart.ts @@ -0,0 +1,243 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get a media part + * + * @remarks + * Get a media part for streaming or download. + * - streaming: This is the default scenario. Bandwidth usage on this endpoint will be guaranteed (on the server's end) to be at least the bandwidth reservation given in the decision. If no decision exists, an ad-hoc decision will be created if sufficient bandwidth exists. Clients should not rely on ad-hoc decisions being made as this may be removed in the future. + * - download: Indicated if the query parameter indicates this is a download. Bandwidth will be prioritized behind playbacks and will get a fair share of what remains. + */ +export function libraryGetMediaPart( + client: PlexAPICore, + request: operations.GetMediaPartRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetMediaPartResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetMediaPartRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetMediaPartResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetMediaPartRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + changestamp: encodeSimple("changestamp", payload.changestamp, { + explode: false, + charEncoding: "percent", + }), + filename: encodeSimple("filename", payload.filename, { + explode: false, + charEncoding: "percent", + }), + partId: encodeSimple("partId", payload.partId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/parts/{partId}/{changestamp}/{filename}")( + pathParams, + ); + + const query = encodeFormQuery({ + "download": payload.download, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getMediaPart", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["403", "404", "4XX", "503", "509", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetMediaPartResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.GetMediaPartResponse$inboundSchema, { hdrs: true }), + M.fail([403, 404, "4XX"]), + M.fail([503, 509, "5XX"]), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetMediaPosters.ts b/src/funcs/libraryGetMediaPosters.ts deleted file mode 100644 index b0dd921e..00000000 --- a/src/funcs/libraryGetMediaPosters.ts +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Media Posters - * - * @remarks - * Returns the available posters for a library item. - */ -export function libraryGetMediaPosters( - client: PlexAPICore, - ratingKey: number, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetMediaPostersResponse, - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - ratingKey, - options, - )); -} - -async function $do( - client: PlexAPICore, - ratingKey: number, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetMediaPostersResponse, - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetMediaPostersRequest = { - ratingKey: ratingKey, - }; - - const parsed = safeParse( - input, - (value) => operations.GetMediaPostersRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - ratingKey: encodeSimple("ratingKey", payload.ratingKey, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/library/metadata/{ratingKey}/posters")(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-media-posters", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["404", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetMediaPostersResponse, - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetMediaPostersResponse$inboundSchema, { - key: "object", - }), - M.fail([404, "4XX"]), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/libraryGetMetadataChildren.ts b/src/funcs/libraryGetMetadataChildren.ts deleted file mode 100644 index fbe5a97f..00000000 --- a/src/funcs/libraryGetMetadataChildren.ts +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Items Children - * - * @remarks - * This endpoint will return the children of of a library item specified with the ratingKey. - */ -export function libraryGetMetadataChildren( - client: PlexAPICore, - ratingKey: number, - includeElements?: string | undefined, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetMetadataChildrenResponse, - | errors.GetMetadataChildrenBadRequest - | errors.GetMetadataChildrenUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - ratingKey, - includeElements, - options, - )); -} - -async function $do( - client: PlexAPICore, - ratingKey: number, - includeElements?: string | undefined, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetMetadataChildrenResponse, - | errors.GetMetadataChildrenBadRequest - | errors.GetMetadataChildrenUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetMetadataChildrenRequest = { - ratingKey: ratingKey, - includeElements: includeElements, - }; - - const parsed = safeParse( - input, - (value) => - operations.GetMetadataChildrenRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - ratingKey: encodeSimple("ratingKey", payload.ratingKey, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/library/metadata/{ratingKey}/children")(pathParams); - - const query = encodeFormQuery({ - "includeElements": payload.includeElements, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getMetadataChildren", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetMetadataChildrenBadRequest - | errors.GetMetadataChildrenUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetMetadataChildrenResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetMetadataChildrenBadRequest$inboundSchema), - M.jsonErr(401, errors.GetMetadataChildrenUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/libraryGetPartIndex.ts b/src/funcs/libraryGetPartIndex.ts new file mode 100644 index 00000000..9988741c --- /dev/null +++ b/src/funcs/libraryGetPartIndex.ts @@ -0,0 +1,239 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get BIF index for a part + * + * @remarks + * Get BIF index for a part by index type + */ +export function libraryGetPartIndex( + client: PlexAPICore, + request: operations.GetPartIndexRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetPartIndexResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetPartIndexRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetPartIndexResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetPartIndexRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + index: encodeSimple("index", payload.index, { + explode: false, + charEncoding: "percent", + }), + partId: encodeSimple("partId", payload.partId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/parts/{partId}/indexes/{index}")( + pathParams, + ); + + const query = encodeFormQuery({ + "interval": payload.interval, + }); + + const headers = new Headers(compactMap({ + Accept: "application/octet-stream", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getPartIndex", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetPartIndexResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.stream(200, operations.GetPartIndexResponse$inboundSchema, { + key: "response-stream", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetPerson.ts b/src/funcs/libraryGetPerson.ts new file mode 100644 index 00000000..9383d2b4 --- /dev/null +++ b/src/funcs/libraryGetPerson.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get person details + * + * @remarks + * Get details for a single actor. + */ +export function libraryGetPerson( + client: PlexAPICore, + request: operations.GetPersonRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetPersonResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetPersonRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetPersonResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetPersonRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + personId: encodeSimple("personId", payload.personId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/people/{personId}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getPerson", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetPersonResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetPersonResponse$inboundSchema, { key: "object" }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetRandomArtwork.ts b/src/funcs/libraryGetRandomArtwork.ts new file mode 100644 index 00000000..8d765c61 --- /dev/null +++ b/src/funcs/libraryGetRandomArtwork.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get random artwork + * + * @remarks + * Get random artwork across sections. This is commonly used for a screensaver. + * + * This retrieves 100 random artwork paths in the specified sections and returns them. Restrictions are put in place to not return artwork for items the user is not allowed to access. Artwork will be for Movies, Shows, and Artists only. + */ +export function libraryGetRandomArtwork( + client: PlexAPICore, + request: operations.GetRandomArtworkRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetRandomArtworkResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetRandomArtworkRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetRandomArtworkResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetRandomArtworkRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/library/randomArtwork")(); + + const query = encodeFormQuery({ + "sections": payload.sections, + }, { explode: false }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getRandomArtwork", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetRandomArtworkResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetRandomArtworkResponse$inboundSchema, { + key: "MediaContainerWithArtwork", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetRecentlyAddedLibrary.ts b/src/funcs/libraryGetRecentlyAddedLibrary.ts deleted file mode 100644 index c68933fc..00000000 --- a/src/funcs/libraryGetRecentlyAddedLibrary.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Recently Added - * - * @remarks - * This endpoint will return the recently added content. - */ -export function libraryGetRecentlyAddedLibrary( - client: PlexAPICore, - request: operations.GetRecentlyAddedLibraryRequest, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetRecentlyAddedLibraryResponse, - | errors.GetRecentlyAddedLibraryBadRequest - | errors.GetRecentlyAddedLibraryUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: PlexAPICore, - request: operations.GetRecentlyAddedLibraryRequest, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetRecentlyAddedLibraryResponse, - | errors.GetRecentlyAddedLibraryBadRequest - | errors.GetRecentlyAddedLibraryUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetRecentlyAddedLibraryRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/library/recentlyAdded")(); - - const query = encodeFormQuery({ - "contentDirectoryID": payload.contentDirectoryID, - "includeMeta": payload.includeMeta, - "pinnedContentDirectoryID": payload.pinnedContentDirectoryID, - "sectionID": payload.sectionID, - "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(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-recently-added-library", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetRecentlyAddedLibraryResponse, - | errors.GetRecentlyAddedLibraryBadRequest - | errors.GetRecentlyAddedLibraryUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetRecentlyAddedLibraryResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetRecentlyAddedLibraryBadRequest$inboundSchema), - M.jsonErr(401, errors.GetRecentlyAddedLibraryUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/libraryGetRefreshLibraryMetadata.ts b/src/funcs/libraryGetRefreshLibraryMetadata.ts deleted file mode 100644 index 78cf4224..00000000 --- a/src/funcs/libraryGetRefreshLibraryMetadata.ts +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Refresh Metadata Of The Library - * - * @remarks - * This endpoint Refreshes all the Metadata of the library. - */ -export function libraryGetRefreshLibraryMetadata( - client: PlexAPICore, - sectionKey: number, - force?: operations.Force | undefined, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetRefreshLibraryMetadataResponse, - | errors.GetRefreshLibraryMetadataBadRequest - | errors.GetRefreshLibraryMetadataUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - sectionKey, - force, - options, - )); -} - -async function $do( - client: PlexAPICore, - sectionKey: number, - force?: operations.Force | undefined, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetRefreshLibraryMetadataResponse, - | errors.GetRefreshLibraryMetadataBadRequest - | errors.GetRefreshLibraryMetadataUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetRefreshLibraryMetadataRequest = { - sectionKey: sectionKey, - force: force, - }; - - const parsed = safeParse( - input, - (value) => - operations.GetRefreshLibraryMetadataRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - sectionKey: encodeSimple("sectionKey", payload.sectionKey, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/library/sections/{sectionKey}/refresh")(pathParams); - - const query = encodeFormQuery({ - "force": payload.force, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-refresh-library-metadata", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetRefreshLibraryMetadataBadRequest - | errors.GetRefreshLibraryMetadataUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.GetRefreshLibraryMetadataResponse$inboundSchema), - M.jsonErr(400, errors.GetRefreshLibraryMetadataBadRequest$inboundSchema), - M.jsonErr(401, errors.GetRefreshLibraryMetadataUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/libraryGetRelatedItems.ts b/src/funcs/libraryGetRelatedItems.ts new file mode 100644 index 00000000..f72d8797 --- /dev/null +++ b/src/funcs/libraryGetRelatedItems.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get related items + * + * @remarks + * Get a hub of related items to a metadata item + */ +export function libraryGetRelatedItems( + client: PlexAPICore, + request: operations.GetRelatedItemsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetRelatedItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetRelatedItemsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetRelatedItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetRelatedItemsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/related")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getRelatedItems", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetRelatedItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetRelatedItemsResponse$inboundSchema, { + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetSearchAllLibraries.ts b/src/funcs/libraryGetSearchAllLibraries.ts deleted file mode 100644 index bbe9106b..00000000 --- a/src/funcs/libraryGetSearchAllLibraries.ts +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery, encodeSimple, queryJoin } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Search All Libraries - * - * @remarks - * Search the provided query across all library sections, or a single section, and return matches as hubs, split up by type. - */ -export function libraryGetSearchAllLibraries( - client: PlexAPICore, - request: operations.GetSearchAllLibrariesRequest, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetSearchAllLibrariesResponse, - | errors.GetSearchAllLibrariesBadRequest - | errors.GetSearchAllLibrariesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: PlexAPICore, - request: operations.GetSearchAllLibrariesRequest, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetSearchAllLibrariesResponse, - | errors.GetSearchAllLibrariesBadRequest - | errors.GetSearchAllLibrariesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.GetSearchAllLibrariesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/library/search")(); - - const query = queryJoin( - encodeFormQuery({ - "searchTypes": payload.searchTypes, - }, { explode: false }), - encodeFormQuery({ - "includeCollections": payload.includeCollections, - "includeExternalMedia": payload.includeExternalMedia, - "limit": payload.limit, - "query": payload.query, - }), - ); - - const headers = new Headers(compactMap({ - Accept: "application/json", - "X-Plex-Client-Identifier": encodeSimple( - "X-Plex-Client-Identifier", - payload.ClientID, - { explode: false, charEncoding: "none" }, - ), - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-search-all-libraries", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetSearchAllLibrariesResponse, - | errors.GetSearchAllLibrariesBadRequest - | errors.GetSearchAllLibrariesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetSearchAllLibrariesResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetSearchAllLibrariesBadRequest$inboundSchema), - M.jsonErr(401, errors.GetSearchAllLibrariesUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/libraryGetSearchLibrary.ts b/src/funcs/libraryGetSearchLibrary.ts deleted file mode 100644 index 8559404f..00000000 --- a/src/funcs/libraryGetSearchLibrary.ts +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * 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. - */ -export function libraryGetSearchLibrary( - client: PlexAPICore, - sectionKey: number, - type: operations.GetSearchLibraryQueryParamTypeOpen, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetSearchLibraryResponse, - | errors.GetSearchLibraryBadRequest - | errors.GetSearchLibraryUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - sectionKey, - type, - options, - )); -} - -async function $do( - client: PlexAPICore, - sectionKey: number, - type: operations.GetSearchLibraryQueryParamTypeOpen, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetSearchLibraryResponse, - | errors.GetSearchLibraryBadRequest - | errors.GetSearchLibraryUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetSearchLibraryRequest = { - sectionKey: sectionKey, - type: type, - }; - - const parsed = safeParse( - input, - (value) => operations.GetSearchLibraryRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - sectionKey: encodeSimple("sectionKey", payload.sectionKey, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/library/sections/{sectionKey}/search")(pathParams); - - const query = encodeFormQuery({ - "type": payload.type, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-search-library", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetSearchLibraryBadRequest - | errors.GetSearchLibraryUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetSearchLibraryResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetSearchLibraryBadRequest$inboundSchema), - M.jsonErr(401, errors.GetSearchLibraryUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/libraryGetSectionFilters.ts b/src/funcs/libraryGetSectionFilters.ts new file mode 100644 index 00000000..41a1c7c8 --- /dev/null +++ b/src/funcs/libraryGetSectionFilters.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get section filters + * + * @remarks + * Get common filters on a section + */ +export function libraryGetSectionFilters( + client: PlexAPICore, + request: operations.GetSectionFiltersRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetSectionFiltersResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetSectionFiltersRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetSectionFiltersResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetSectionFiltersRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/filters")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getSectionFilters", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetSectionFiltersResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetSectionFiltersResponse$inboundSchema, { + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetSectionImage.ts b/src/funcs/libraryGetSectionImage.ts new file mode 100644 index 00000000..bcc990fb --- /dev/null +++ b/src/funcs/libraryGetSectionImage.ts @@ -0,0 +1,238 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get a section composite image + * + * @remarks + * Get a composite image of images in this section + */ +export function libraryGetSectionImage( + client: PlexAPICore, + request: operations.GetSectionImageRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetSectionImageResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetSectionImageRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetSectionImageResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetSectionImageRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + updatedAt: encodeSimple("updatedAt", payload.updatedAt, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/library/sections/{sectionId}/composite/{updatedAt}", + )(pathParams); + + const query = encodeFormQuery({ + "composite": payload.composite, + "mediaQuery": payload.mediaQuery, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getSectionImage", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetSectionImageResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.GetSectionImageResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetSectionPreferences.ts b/src/funcs/libraryGetSectionPreferences.ts new file mode 100644 index 00000000..5dfef147 --- /dev/null +++ b/src/funcs/libraryGetSectionPreferences.ts @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get section prefs + * + * @remarks + * Get the prefs for a section by id and potentially overriding the agent + */ +export function libraryGetSectionPreferences( + client: PlexAPICore, + request: operations.GetSectionPreferencesRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetSectionPreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetSectionPreferencesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetSectionPreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetSectionPreferencesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/prefs")(pathParams); + + const query = encodeFormQuery({ + "agent": payload.agent, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getSectionPreferences", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetSectionPreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetSectionPreferencesResponse$inboundSchema, { + key: "MediaContainerWithSettings", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetSections.ts b/src/funcs/libraryGetSections.ts new file mode 100644 index 00000000..2ab2678e --- /dev/null +++ b/src/funcs/libraryGetSections.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get library sections (main Media Provider Only) + * + * @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). + */ +export function libraryGetSections( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetSectionsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetSectionsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/library/sections/all")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getSections", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetSectionsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetSectionsResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetSectionsPrefs.ts b/src/funcs/libraryGetSectionsPrefs.ts new file mode 100644 index 00000000..ad0cfcba --- /dev/null +++ b/src/funcs/libraryGetSectionsPrefs.ts @@ -0,0 +1,227 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get section prefs + * + * @remarks + * Get a section's preferences for a metadata type + */ +export function libraryGetSectionsPrefs( + client: PlexAPICore, + request: operations.GetSectionsPrefsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetSectionsPrefsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetSectionsPrefsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetSectionsPrefsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetSectionsPrefsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/library/sections/prefs")(); + + const query = encodeFormQuery({ + "agent": payload.agent, + "type": payload.type, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getSectionsPrefs", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetSectionsPrefsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetSectionsPrefsResponse$inboundSchema, { + key: "requestHandler_slash-get-responses-200", + }), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetStream.ts b/src/funcs/libraryGetStream.ts new file mode 100644 index 00000000..52a98910 --- /dev/null +++ b/src/funcs/libraryGetStream.ts @@ -0,0 +1,237 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get a stream + * + * @remarks + * Get a stream (such as a sidecar subtitle stream) + */ +export function libraryGetStream( + client: PlexAPICore, + request: operations.GetStreamRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetStreamResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetStreamRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetStreamResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetStreamRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ext: encodeSimple("ext", payload.ext, { + explode: false, + charEncoding: "percent", + }), + streamId: encodeSimple("streamId", payload.streamId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/streams/{streamId}.{ext}")(pathParams); + + const query = encodeFormQuery({ + "autoAdjustSubtitle": payload.autoAdjustSubtitle, + "encoding": payload.encoding, + "format": payload.format, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getStream", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["403", "404", "4XX", "501", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetStreamResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.GetStreamResponse$inboundSchema), + M.fail([403, 404, "4XX"]), + M.fail([501, "5XX"]), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetStreamLevels.ts b/src/funcs/libraryGetStreamLevels.ts new file mode 100644 index 00000000..0b08fdb5 --- /dev/null +++ b/src/funcs/libraryGetStreamLevels.ts @@ -0,0 +1,233 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get loudness about a stream in json + * + * @remarks + * The the loudness of a stream in db, one entry per 100ms + */ +export function libraryGetStreamLevels( + client: PlexAPICore, + request: operations.GetStreamLevelsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetStreamLevelsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetStreamLevelsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetStreamLevelsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetStreamLevelsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + streamId: encodeSimple("streamId", payload.streamId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/streams/{streamId}/levels")(pathParams); + + const query = encodeFormQuery({ + "subsample": payload.subsample, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getStreamLevels", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["403", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetStreamLevelsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetStreamLevelsResponse$inboundSchema, { + key: "object", + }), + M.fail([403, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetStreamLoudness.ts b/src/funcs/libraryGetStreamLoudness.ts new file mode 100644 index 00000000..f513a0ac --- /dev/null +++ b/src/funcs/libraryGetStreamLoudness.ts @@ -0,0 +1,233 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get loudness about a stream + * + * @remarks + * The the loudness of a stream in db, one number per line, one entry per 100ms + */ +export function libraryGetStreamLoudness( + client: PlexAPICore, + request: operations.GetStreamLoudnessRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetStreamLoudnessResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetStreamLoudnessRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetStreamLoudnessResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetStreamLoudnessRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + streamId: encodeSimple("streamId", payload.streamId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/streams/{streamId}/loudness")(pathParams); + + const query = encodeFormQuery({ + "subsample": payload.subsample, + }); + + const headers = new Headers(compactMap({ + Accept: "text/plain", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getStreamLoudness", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["403", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetStreamLoudnessResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.text(200, operations.GetStreamLoudnessResponse$inboundSchema, { + key: "res", + }), + M.fail([403, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetTags.ts b/src/funcs/libraryGetTags.ts new file mode 100644 index 00000000..7819914f --- /dev/null +++ b/src/funcs/libraryGetTags.ts @@ -0,0 +1,224 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get all library tags of a type + * + * @remarks + * Get all library tags of a type + */ +export function libraryGetTags( + client: PlexAPICore, + request: operations.GetTagsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetTagsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetTagsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetTagsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetTagsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/library/tags")(); + + const query = encodeFormQuery({ + "type": payload.type, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getTags", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetTagsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetTagsResponse$inboundSchema, { key: "object" }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryGetTopWatchedContent.ts b/src/funcs/libraryGetTopWatchedContent.ts deleted file mode 100644 index e549225f..00000000 --- a/src/funcs/libraryGetTopWatchedContent.ts +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Top Watched Content - * - * @remarks - * This endpoint will return the top watched content from libraries of a certain type - */ -export function libraryGetTopWatchedContent( - client: PlexAPICore, - type: operations.GetTopWatchedContentQueryParamTypeOpen, - includeGuids?: - | operations.GetTopWatchedContentQueryParamIncludeGuids - | undefined, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetTopWatchedContentResponse, - | errors.GetTopWatchedContentBadRequest - | errors.GetTopWatchedContentUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - type, - includeGuids, - options, - )); -} - -async function $do( - client: PlexAPICore, - type: operations.GetTopWatchedContentQueryParamTypeOpen, - includeGuids?: - | operations.GetTopWatchedContentQueryParamIncludeGuids - | undefined, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetTopWatchedContentResponse, - | errors.GetTopWatchedContentBadRequest - | errors.GetTopWatchedContentUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetTopWatchedContentRequest = { - type: type, - includeGuids: includeGuids, - }; - - const parsed = safeParse( - input, - (value) => - operations.GetTopWatchedContentRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/library/all/top")(); - - const query = encodeFormQuery({ - "includeGuids": payload.includeGuids, - "type": payload.type, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getTopWatchedContent", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetTopWatchedContentBadRequest - | errors.GetTopWatchedContentUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetTopWatchedContentResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetTopWatchedContentBadRequest$inboundSchema), - M.jsonErr(401, errors.GetTopWatchedContentUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/libraryIngestTransientItem.ts b/src/funcs/libraryIngestTransientItem.ts new file mode 100644 index 00000000..84c6523d --- /dev/null +++ b/src/funcs/libraryIngestTransientItem.ts @@ -0,0 +1,232 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Ingest a transient item + * + * @remarks + * This endpoint takes a file path specified in the `url` parameter, matches it using the scanner's match mechanism, downloads rich metadata, and then ingests the item as a transient item (without a library section). In the case where the file represents an episode, the entire tree (show, season, and episode) is added as transient items. At this time, movies and episodes are the only supported types, which are gleaned automatically from the file path. + * Note that any of the parameters passed to the metadata details endpoint (e.g. `includeExtras=1`) work here. + */ +export function libraryIngestTransientItem( + client: PlexAPICore, + request: operations.IngestTransientItemRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.IngestTransientItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.IngestTransientItemRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.IngestTransientItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.IngestTransientItemRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/library/file")(); + + const query = encodeFormQuery({ + "computeHashes": payload.computeHashes, + "ingestNonMatches": payload.ingestNonMatches, + "url": payload.url, + "virtualFilePath": payload.virtualFilePath, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "ingestTransientItem", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.IngestTransientItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.IngestTransientItemResponse$inboundSchema, { + hdrs: true, + key: "MediaContainerWithMetadata", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryListMatches.ts b/src/funcs/libraryListMatches.ts new file mode 100644 index 00000000..5bac38bd --- /dev/null +++ b/src/funcs/libraryListMatches.ts @@ -0,0 +1,238 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get metadata matches for an item + * + * @remarks + * Get the list of metadata matches for a metadata item + */ +export function libraryListMatches( + client: PlexAPICore, + request: operations.ListMatchesRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ListMatchesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ListMatchesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ListMatchesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListMatchesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/matches")(pathParams); + + const query = encodeFormQuery({ + "agent": payload.agent, + "language": payload.language, + "manual": payload.manual, + "parentTitle": payload.parentTitle, + "title": payload.title, + "year": payload.year, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listMatches", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ListMatchesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ListMatchesResponse$inboundSchema, { + key: "MediaContainerWithMetadata", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryListPersonMedia.ts b/src/funcs/libraryListPersonMedia.ts new file mode 100644 index 00000000..57c0d486 --- /dev/null +++ b/src/funcs/libraryListPersonMedia.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get media for a person + * + * @remarks + * Get all the media for a single actor. + */ +export function libraryListPersonMedia( + client: PlexAPICore, + request: operations.ListPersonMediaRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ListPersonMediaResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ListPersonMediaRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ListPersonMediaResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListPersonMediaRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + personId: encodeSimple("personId", payload.personId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/people/{personId}/media")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listPersonMedia", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ListPersonMediaResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ListPersonMediaResponse$inboundSchema, { + key: "MediaContainerWithMetadata", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryListSimilar.ts b/src/funcs/libraryListSimilar.ts new file mode 100644 index 00000000..4ce824a5 --- /dev/null +++ b/src/funcs/libraryListSimilar.ts @@ -0,0 +1,233 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get similar items + * + * @remarks + * Get a list of similar items to a metadata item + */ +export function libraryListSimilar( + client: PlexAPICore, + request: operations.ListSimilarRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ListSimilarResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ListSimilarRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ListSimilarResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListSimilarRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/similar")(pathParams); + + const query = encodeFormQuery({ + "count": payload.count, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listSimilar", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ListSimilarResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ListSimilarResponse$inboundSchema, { + key: "MediaContainerWithMetadata", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryListSonicallySimilar.ts b/src/funcs/libraryListSonicallySimilar.ts new file mode 100644 index 00000000..24537bba --- /dev/null +++ b/src/funcs/libraryListSonicallySimilar.ts @@ -0,0 +1,237 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get nearest tracks to metadata item + * + * @remarks + * Get the nearest tracks, sonically, to the provided track + */ +export function libraryListSonicallySimilar( + client: PlexAPICore, + request: operations.ListSonicallySimilarRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ListSonicallySimilarResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ListSonicallySimilarRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ListSonicallySimilarResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListSonicallySimilarRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/nearest")(pathParams); + + const query = encodeFormQuery({ + "excludeGrandparentID": payload.excludeGrandparentID, + "excludeParentID": payload.excludeParentID, + "limit": payload.limit, + "maxDistance": payload.maxDistance, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listSonicallySimilar", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ListSonicallySimilarResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ListSonicallySimilarResponse$inboundSchema, { + key: "MediaContainerWithMetadata", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryListTopUsers.ts b/src/funcs/libraryListTopUsers.ts new file mode 100644 index 00000000..a8ef3b4e --- /dev/null +++ b/src/funcs/libraryListTopUsers.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get metadata top users + * + * @remarks + * Get the list of users which have played this item starting with the most + */ +export function libraryListTopUsers( + client: PlexAPICore, + request: operations.ListTopUsersRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ListTopUsersResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ListTopUsersRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ListTopUsersResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListTopUsersRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/users/top")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listTopUsers", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ListTopUsersResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ListTopUsersResponse$inboundSchema, { + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryMatchItem.ts b/src/funcs/libraryMatchItem.ts new file mode 100644 index 00000000..2aa0d9ee --- /dev/null +++ b/src/funcs/libraryMatchItem.ts @@ -0,0 +1,233 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Match a metadata item + * + * @remarks + * Match a metadata item to a guid + */ +export function libraryMatchItem( + client: PlexAPICore, + request: operations.MatchItemRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.MatchItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.MatchItemRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.MatchItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MatchItemRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/match")(pathParams); + + const query = encodeFormQuery({ + "guid": payload.guid, + "name": payload.name, + "year": payload.year, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "matchItem", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.MatchItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.MatchItemResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryMergeItems.ts b/src/funcs/libraryMergeItems.ts new file mode 100644 index 00000000..d0232ed1 --- /dev/null +++ b/src/funcs/libraryMergeItems.ts @@ -0,0 +1,231 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Merge a metadata item + * + * @remarks + * Merge a metadata item with other items + */ +export function libraryMergeItems( + client: PlexAPICore, + request: operations.MergeItemsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.MergeItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.MergeItemsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.MergeItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MergeItemsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.idsPathParameter, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/merge")(pathParams); + + const query = encodeFormQuery({ + "ids": payload.idsQueryParameter, + }, { explode: false }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "mergeItems", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.MergeItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.MergeItemsResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryOptimizeDatabase.ts b/src/funcs/libraryOptimizeDatabase.ts new file mode 100644 index 00000000..33d4ea53 --- /dev/null +++ b/src/funcs/libraryOptimizeDatabase.ts @@ -0,0 +1,224 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Optimize the Database + * + * @remarks + * Initiate optimize on the database. + */ +export function libraryOptimizeDatabase( + client: PlexAPICore, + request: operations.OptimizeDatabaseRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.OptimizeDatabaseResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.OptimizeDatabaseRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.OptimizeDatabaseResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.OptimizeDatabaseRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/library/optimize")(); + + const query = encodeFormQuery({ + "async": payload.async, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "optimizeDatabase", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.OptimizeDatabaseResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.OptimizeDatabaseResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryPlaylistsAddPlaylistItems.ts b/src/funcs/libraryPlaylistsAddPlaylistItems.ts new file mode 100644 index 00000000..39d2b60e --- /dev/null +++ b/src/funcs/libraryPlaylistsAddPlaylistItems.ts @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Adding to a Playlist + * + * @remarks + * Adds a generator to a playlist, same parameters as the POST above. 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 function libraryPlaylistsAddPlaylistItems( + client: PlexAPICore, + request: operations.AddPlaylistItemsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.AddPlaylistItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.AddPlaylistItemsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.AddPlaylistItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.AddPlaylistItemsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + playlistId: encodeSimple("playlistId", payload.playlistId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/playlists/{playlistId}/items")(pathParams); + + const query = encodeFormQuery({ + "playQueueID": payload.playQueueID, + "uri": payload.uri, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "addPlaylistItems", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.AddPlaylistItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.AddPlaylistItemsResponse$inboundSchema, { + key: "MediaContainerWithPlaylistMetadata", + }), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryPlaylistsClearPlaylistItems.ts b/src/funcs/libraryPlaylistsClearPlaylistItems.ts new file mode 100644 index 00000000..f3adc71f --- /dev/null +++ b/src/funcs/libraryPlaylistsClearPlaylistItems.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Clearing a playlist + * + * @remarks + * Clears a playlist, only works with dumb playlists. Returns the playlist. + */ +export function libraryPlaylistsClearPlaylistItems( + client: PlexAPICore, + request: operations.ClearPlaylistItemsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ClearPlaylistItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ClearPlaylistItemsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ClearPlaylistItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ClearPlaylistItemsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + playlistId: encodeSimple("playlistId", payload.playlistId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/playlists/{playlistId}/items")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "clearPlaylistItems", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ClearPlaylistItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ClearPlaylistItemsResponse$inboundSchema, { + key: "MediaContainerWithPlaylistMetadata", + }), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryPlaylistsCreatePlaylist.ts b/src/funcs/libraryPlaylistsCreatePlaylist.ts new file mode 100644 index 00000000..0968a780 --- /dev/null +++ b/src/funcs/libraryPlaylistsCreatePlaylist.ts @@ -0,0 +1,227 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Create a Playlist + * + * @remarks + * Create a new playlist. By default the playlist is blank. + */ +export function libraryPlaylistsCreatePlaylist( + client: PlexAPICore, + request: operations.CreatePlaylistRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.CreatePlaylistResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.CreatePlaylistRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.CreatePlaylistResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CreatePlaylistRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/playlists")(); + + const query = encodeFormQuery({ + "playQueueID": payload.playQueueID, + "uri": payload.uri, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "createPlaylist", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.CreatePlaylistResponse$inboundSchema, { + key: "MediaContainerWithPlaylistMetadata", + }), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryPlaylistsDeletePlaylist.ts b/src/funcs/libraryPlaylistsDeletePlaylist.ts new file mode 100644 index 00000000..f8f18636 --- /dev/null +++ b/src/funcs/libraryPlaylistsDeletePlaylist.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Delete a Playlist + * + * @remarks + * Deletes a playlist by provided id + */ +export function libraryPlaylistsDeletePlaylist( + client: PlexAPICore, + request: operations.DeletePlaylistRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DeletePlaylistResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.DeletePlaylistRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DeletePlaylistResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeletePlaylistRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + playlistId: encodeSimple("playlistId", payload.playlistId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/playlists/{playlistId}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deletePlaylist", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(204, operations.DeletePlaylistResponse$inboundSchema), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryPlaylistsDeletePlaylistItem.ts b/src/funcs/libraryPlaylistsDeletePlaylistItem.ts new file mode 100644 index 00000000..d4b19a38 --- /dev/null +++ b/src/funcs/libraryPlaylistsDeletePlaylistItem.ts @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Delete a Generator + * + * @remarks + * Deletes an item from a playlist. Only works with dumb playlists. + */ +export function libraryPlaylistsDeletePlaylistItem( + client: PlexAPICore, + request: operations.DeletePlaylistItemRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DeletePlaylistItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.DeletePlaylistItemRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DeletePlaylistItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeletePlaylistItemRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + generatorId: encodeSimple("generatorId", payload.generatorId, { + explode: false, + charEncoding: "percent", + }), + playlistId: encodeSimple("playlistId", payload.playlistId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/playlists/{playlistId}/items/{generatorId}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deletePlaylistItem", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DeletePlaylistItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.DeletePlaylistItemResponse$inboundSchema, { + key: "MediaContainerWithPlaylistMetadata", + }), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryPlaylistsGetPlaylistGenerator.ts b/src/funcs/libraryPlaylistsGetPlaylistGenerator.ts new file mode 100644 index 00000000..20278228 --- /dev/null +++ b/src/funcs/libraryPlaylistsGetPlaylistGenerator.ts @@ -0,0 +1,235 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get a playlist generator + * + * @remarks + * Get a playlist's generator. Only used for optimized versions + */ +export function libraryPlaylistsGetPlaylistGenerator( + client: PlexAPICore, + request: operations.GetPlaylistGeneratorRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetPlaylistGeneratorResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetPlaylistGeneratorRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetPlaylistGeneratorResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetPlaylistGeneratorRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + generatorId: encodeSimple("generatorId", payload.generatorId, { + explode: false, + charEncoding: "percent", + }), + playlistId: encodeSimple("playlistId", payload.playlistId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/playlists/{playlistId}/items/{generatorId}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getPlaylistGenerator", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetPlaylistGeneratorResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetPlaylistGeneratorResponse$inboundSchema, { + key: "object", + }), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryPlaylistsGetPlaylistGeneratorItems.ts b/src/funcs/libraryPlaylistsGetPlaylistGeneratorItems.ts new file mode 100644 index 00000000..51c5f6ef --- /dev/null +++ b/src/funcs/libraryPlaylistsGetPlaylistGeneratorItems.ts @@ -0,0 +1,235 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get a playlist generator's items + * + * @remarks + * Get a playlist generator's items + */ +export function libraryPlaylistsGetPlaylistGeneratorItems( + client: PlexAPICore, + request: operations.GetPlaylistGeneratorItemsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetPlaylistGeneratorItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetPlaylistGeneratorItemsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetPlaylistGeneratorItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetPlaylistGeneratorItemsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + generatorId: encodeSimple("generatorId", payload.generatorId, { + explode: false, + charEncoding: "percent", + }), + playlistId: encodeSimple("playlistId", payload.playlistId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/playlists/{playlistId}/items/{generatorId}/items")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getPlaylistGeneratorItems", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetPlaylistGeneratorItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetPlaylistGeneratorItemsResponse$inboundSchema, { + key: "object", + }), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryPlaylistsGetPlaylistGenerators.ts b/src/funcs/libraryPlaylistsGetPlaylistGenerators.ts new file mode 100644 index 00000000..37a8b5e2 --- /dev/null +++ b/src/funcs/libraryPlaylistsGetPlaylistGenerators.ts @@ -0,0 +1,229 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get a playlist's generators + * + * @remarks + * Get all the generators in a playlist + */ +export function libraryPlaylistsGetPlaylistGenerators( + client: PlexAPICore, + request: operations.GetPlaylistGeneratorsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetPlaylistGeneratorsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetPlaylistGeneratorsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetPlaylistGeneratorsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetPlaylistGeneratorsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + playlistId: encodeSimple("playlistId", payload.playlistId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/playlists/{playlistId}/generators")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getPlaylistGenerators", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetPlaylistGeneratorsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetPlaylistGeneratorsResponse$inboundSchema, { + key: "object", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryPlaylistsModifyPlaylistGenerator.ts b/src/funcs/libraryPlaylistsModifyPlaylistGenerator.ts new file mode 100644 index 00000000..120258e6 --- /dev/null +++ b/src/funcs/libraryPlaylistsModifyPlaylistGenerator.ts @@ -0,0 +1,240 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeDeepObjectQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Modify a Generator + * + * @remarks + * Modify a playlist generator. Only used for optimizer + */ +export function libraryPlaylistsModifyPlaylistGenerator( + client: PlexAPICore, + request: operations.ModifyPlaylistGeneratorRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ModifyPlaylistGeneratorResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ModifyPlaylistGeneratorRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ModifyPlaylistGeneratorResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ModifyPlaylistGeneratorRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + generatorId: encodeSimple("generatorId", payload.generatorId, { + explode: false, + charEncoding: "percent", + }), + playlistId: encodeSimple("playlistId", payload.playlistId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/playlists/{playlistId}/items/{generatorId}")( + pathParams, + ); + + const query = encodeDeepObjectQuery({ + "Item": payload.Item, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "modifyPlaylistGenerator", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ModifyPlaylistGeneratorResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ModifyPlaylistGeneratorResponse$inboundSchema, { + key: "MediaContainerWithPlaylistMetadata", + }), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryPlaylistsMovePlaylistItem.ts b/src/funcs/libraryPlaylistsMovePlaylistItem.ts new file mode 100644 index 00000000..1f1942c0 --- /dev/null +++ b/src/funcs/libraryPlaylistsMovePlaylistItem.ts @@ -0,0 +1,239 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Moving items in a playlist + * + * @remarks + * Moves an item in a playlist. Only works with dumb playlists. + */ +export function libraryPlaylistsMovePlaylistItem( + client: PlexAPICore, + request: operations.MovePlaylistItemRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.MovePlaylistItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.MovePlaylistItemRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.MovePlaylistItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MovePlaylistItemRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + playlistId: encodeSimple("playlistId", payload.playlistId, { + explode: false, + charEncoding: "percent", + }), + playlistItemId: encodeSimple("playlistItemId", payload.playlistItemId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/playlists/{playlistId}/items/{playlistItemId}/move", + )(pathParams); + + const query = encodeFormQuery({ + "after": payload.after, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "movePlaylistItem", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.MovePlaylistItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.MovePlaylistItemResponse$inboundSchema, { + key: "MediaContainerWithPlaylistMetadata", + }), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryPlaylistsRefreshPlaylist.ts b/src/funcs/libraryPlaylistsRefreshPlaylist.ts new file mode 100644 index 00000000..e3c15312 --- /dev/null +++ b/src/funcs/libraryPlaylistsRefreshPlaylist.ts @@ -0,0 +1,240 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Reprocess a generator + * + * @remarks + * Make a generator reprocess (refresh) + */ +export function libraryPlaylistsRefreshPlaylist( + client: PlexAPICore, + request: operations.RefreshPlaylistRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.RefreshPlaylistResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.RefreshPlaylistRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.RefreshPlaylistResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.RefreshPlaylistRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + action: encodeSimple("action", payload.action, { + explode: false, + charEncoding: "percent", + }), + generatorId: encodeSimple("generatorId", payload.generatorId, { + explode: false, + charEncoding: "percent", + }), + metadataId: encodeSimple("metadataId", payload.metadataId, { + explode: false, + charEncoding: "percent", + }), + playlistId: encodeSimple("playlistId", payload.playlistId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/playlists/{playlistId}/items/{generatorId}/{metadataId}/{action}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "refreshPlaylist", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.RefreshPlaylistResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.RefreshPlaylistResponse$inboundSchema), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryPlaylistsUpdatePlaylist.ts b/src/funcs/libraryPlaylistsUpdatePlaylist.ts new file mode 100644 index 00000000..22db1180 --- /dev/null +++ b/src/funcs/libraryPlaylistsUpdatePlaylist.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Editing a Playlist + * + * @remarks + * Edits a playlist in the same manner as [editing metadata](#tag/Provider/operation/metadataPutItem) + */ +export function libraryPlaylistsUpdatePlaylist( + client: PlexAPICore, + request: operations.UpdatePlaylistRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.UpdatePlaylistResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.UpdatePlaylistRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.UpdatePlaylistResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdatePlaylistRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + playlistId: encodeSimple("playlistId", payload.playlistId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/playlists/{playlistId}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "updatePlaylist", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(204, operations.UpdatePlaylistResponse$inboundSchema), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryPlaylistsUploadPlaylist.ts b/src/funcs/libraryPlaylistsUploadPlaylist.ts new file mode 100644 index 00000000..a5edffe8 --- /dev/null +++ b/src/funcs/libraryPlaylistsUploadPlaylist.ts @@ -0,0 +1,225 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Upload + * + * @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 function libraryPlaylistsUploadPlaylist( + client: PlexAPICore, + request: operations.UploadPlaylistRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.UploadPlaylistResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.UploadPlaylistRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.UploadPlaylistResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UploadPlaylistRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/playlists/upload")(); + + const query = encodeFormQuery({ + "force": payload.force, + "path": payload.path, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "uploadPlaylist", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["403", "4XX", "500", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.UploadPlaylistResponse$inboundSchema), + M.fail([403, "4XX"]), + M.fail([500, "5XX"]), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryPostMediaArts.ts b/src/funcs/libraryPostMediaArts.ts deleted file mode 100644 index a828640f..00000000 --- a/src/funcs/libraryPostMediaArts.ts +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Upload Media Background Artwork - * - * @remarks - * Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL - */ -export function libraryPostMediaArts( - client: PlexAPICore, - ratingKey: number, - requestBody?: - | ReadableStream - | Blob - | ArrayBuffer - | Uint8Array - | undefined, - url?: string | undefined, - options?: RequestOptions, -): APIPromise< - Result< - operations.PostMediaArtsResponse, - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - ratingKey, - requestBody, - url, - options, - )); -} - -async function $do( - client: PlexAPICore, - ratingKey: number, - requestBody?: - | ReadableStream - | Blob - | ArrayBuffer - | Uint8Array - | undefined, - url?: string | undefined, - options?: RequestOptions, -): Promise< - [ - Result< - operations.PostMediaArtsResponse, - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.PostMediaArtsRequest = { - ratingKey: ratingKey, - requestBody: requestBody, - url: url, - }; - - const parsed = safeParse( - input, - (value) => operations.PostMediaArtsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = payload.RequestBody; - - const pathParams = { - ratingKey: encodeSimple("ratingKey", payload.ratingKey, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/library/metadata/{ratingKey}/arts")(pathParams); - - const query = encodeFormQuery({ - "url": payload.url, - }); - - const headers = new Headers(compactMap({ - "Content-Type": "image/*", - Accept: "*/*", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "post-media-arts", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["404", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.PostMediaArtsResponse, - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.PostMediaArtsResponse$inboundSchema), - M.fail([404, "4XX"]), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/libraryPostMediaPoster.ts b/src/funcs/libraryPostMediaPoster.ts deleted file mode 100644 index 2493ff35..00000000 --- a/src/funcs/libraryPostMediaPoster.ts +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Upload Media Poster - * - * @remarks - * Uploads a poster to a library item, either from a local file or a remote URL - */ -export function libraryPostMediaPoster( - client: PlexAPICore, - ratingKey: number, - requestBody?: - | ReadableStream - | Blob - | ArrayBuffer - | Uint8Array - | undefined, - url?: string | undefined, - options?: RequestOptions, -): APIPromise< - Result< - operations.PostMediaPosterResponse, - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - ratingKey, - requestBody, - url, - options, - )); -} - -async function $do( - client: PlexAPICore, - ratingKey: number, - requestBody?: - | ReadableStream - | Blob - | ArrayBuffer - | Uint8Array - | undefined, - url?: string | undefined, - options?: RequestOptions, -): Promise< - [ - Result< - operations.PostMediaPosterResponse, - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.PostMediaPosterRequest = { - ratingKey: ratingKey, - requestBody: requestBody, - url: url, - }; - - const parsed = safeParse( - input, - (value) => operations.PostMediaPosterRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = payload.RequestBody; - - const pathParams = { - ratingKey: encodeSimple("ratingKey", payload.ratingKey, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/library/metadata/{ratingKey}/posters")(pathParams); - - const query = encodeFormQuery({ - "url": payload.url, - }); - - const headers = new Headers(compactMap({ - "Content-Type": "image/*", - Accept: "*/*", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "post-media-poster", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["404", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.PostMediaPosterResponse, - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.PostMediaPosterResponse$inboundSchema), - M.fail([404, "4XX"]), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/libraryRefreshItemsMetadata.ts b/src/funcs/libraryRefreshItemsMetadata.ts new file mode 100644 index 00000000..fde018da --- /dev/null +++ b/src/funcs/libraryRefreshItemsMetadata.ts @@ -0,0 +1,233 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Refresh a metadata item + * + * @remarks + * Refresh a metadata item from the agent + */ +export function libraryRefreshItemsMetadata( + client: PlexAPICore, + request: operations.RefreshItemsMetadataRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.RefreshItemsMetadataResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.RefreshItemsMetadataRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.RefreshItemsMetadataResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.RefreshItemsMetadataRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/refresh")(pathParams); + + const query = encodeFormQuery({ + "agent": payload.agent, + "markUpdated": payload.markUpdated, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "refreshItemsMetadata", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.RefreshItemsMetadataResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.RefreshItemsMetadataResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryRefreshSection.ts b/src/funcs/libraryRefreshSection.ts new file mode 100644 index 00000000..1db890a7 --- /dev/null +++ b/src/funcs/libraryRefreshSection.ts @@ -0,0 +1,232 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Refresh section + * + * @remarks + * Start a refresh of this section + */ +export function libraryRefreshSection( + client: PlexAPICore, + request: operations.RefreshSectionRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.RefreshSectionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.RefreshSectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.RefreshSectionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.RefreshSectionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/refresh")(pathParams); + + const query = encodeFormQuery({ + "force": payload.force, + "path": payload.path, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "refreshSection", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.RefreshSectionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.RefreshSectionResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryRefreshSectionsMetadata.ts b/src/funcs/libraryRefreshSectionsMetadata.ts new file mode 100644 index 00000000..c1f26909 --- /dev/null +++ b/src/funcs/libraryRefreshSectionsMetadata.ts @@ -0,0 +1,225 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Refresh all sections + * + * @remarks + * Tell PMS to refresh all section metadata + */ +export function libraryRefreshSectionsMetadata( + client: PlexAPICore, + request: operations.RefreshSectionsMetadataRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.RefreshSectionsMetadataResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.RefreshSectionsMetadataRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.RefreshSectionsMetadataResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.RefreshSectionsMetadataRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/library/sections/refresh")(); + + const query = encodeFormQuery({ + "force": payload.force, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "refreshSectionsMetadata", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.RefreshSectionsMetadataResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.RefreshSectionsMetadataResponse$inboundSchema), + M.fail("4XX"), + M.fail([503, "5XX"]), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/librarySetItemArtwork.ts b/src/funcs/librarySetItemArtwork.ts new file mode 100644 index 00000000..b90409d2 --- /dev/null +++ b/src/funcs/librarySetItemArtwork.ts @@ -0,0 +1,236 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Set an item's artwork, theme, etc + * + * @remarks + * Set the artwork, thumb, element for a metadata item + * Generally only the admin can perform this action. The exception is if the metadata is a playlist created by the user + */ +export function librarySetItemArtwork( + client: PlexAPICore, + request: operations.SetItemArtworkRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.SetItemArtworkResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.SetItemArtworkRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.SetItemArtworkResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.SetItemArtworkRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + element: encodeSimple("element", payload.element, { + explode: false, + charEncoding: "percent", + }), + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/{element}")(pathParams); + + const query = encodeFormQuery({ + "url": payload.url, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "setItemArtwork", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.SetItemArtworkResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.SetItemArtworkResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/librarySetItemPreferences.ts b/src/funcs/librarySetItemPreferences.ts new file mode 100644 index 00000000..9f9988b9 --- /dev/null +++ b/src/funcs/librarySetItemPreferences.ts @@ -0,0 +1,231 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Set metadata preferences + * + * @remarks + * Set the preferences on a metadata item + */ +export function librarySetItemPreferences( + client: PlexAPICore, + request: operations.SetItemPreferencesRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.SetItemPreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.SetItemPreferencesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.SetItemPreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.SetItemPreferencesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/prefs")(pathParams); + + const query = encodeFormQuery({ + "args": payload.args, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "setItemPreferences", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.SetItemPreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.SetItemPreferencesResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/librarySetSectionPreferences.ts b/src/funcs/librarySetSectionPreferences.ts new file mode 100644 index 00000000..73e007aa --- /dev/null +++ b/src/funcs/librarySetSectionPreferences.ts @@ -0,0 +1,232 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Set section prefs + * + * @remarks + * Set the prefs for a section by id + */ +export function librarySetSectionPreferences( + client: PlexAPICore, + request: operations.SetSectionPreferencesRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.SetSectionPreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.SetSectionPreferencesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.SetSectionPreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SetSectionPreferencesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/prefs")(pathParams); + + const query = encodeFormQuery({ + "prefs": payload.prefs, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "setSectionPreferences", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.SetSectionPreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.SetSectionPreferencesResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/librarySetStreamOffset.ts b/src/funcs/librarySetStreamOffset.ts new file mode 100644 index 00000000..a7ac5571 --- /dev/null +++ b/src/funcs/librarySetStreamOffset.ts @@ -0,0 +1,235 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Set a stream offset + * + * @remarks + * Set a stream offset in ms. This may not be respected by all clients + */ +export function librarySetStreamOffset( + client: PlexAPICore, + request: operations.SetStreamOffsetRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.SetStreamOffsetResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.SetStreamOffsetRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.SetStreamOffsetResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.SetStreamOffsetRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ext: encodeSimple("ext", payload.ext, { + explode: false, + charEncoding: "percent", + }), + streamId: encodeSimple("streamId", payload.streamId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/streams/{streamId}.{ext}")(pathParams); + + const query = encodeFormQuery({ + "offset": payload.offset, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "setStreamOffset", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.SetStreamOffsetResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.SetStreamOffsetResponse$inboundSchema), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/librarySetStreamSelection.ts b/src/funcs/librarySetStreamSelection.ts new file mode 100644 index 00000000..c1affb72 --- /dev/null +++ b/src/funcs/librarySetStreamSelection.ts @@ -0,0 +1,233 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Set stream selection + * + * @remarks + * Set which streams (audio/subtitle) are selected by this user + */ +export function librarySetStreamSelection( + client: PlexAPICore, + request: operations.SetStreamSelectionRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.SetStreamSelectionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.SetStreamSelectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.SetStreamSelectionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.SetStreamSelectionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + partId: encodeSimple("partId", payload.partId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/parts/{partId}")(pathParams); + + const query = encodeFormQuery({ + "allParts": payload.allParts, + "audioStreamID": payload.audioStreamID, + "subtitleStreamID": payload.subtitleStreamID, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "setStreamSelection", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.SetStreamSelectionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.SetStreamSelectionResponse$inboundSchema), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/librarySplitItem.ts b/src/funcs/librarySplitItem.ts new file mode 100644 index 00000000..832bfdbd --- /dev/null +++ b/src/funcs/librarySplitItem.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Split a metadata item + * + * @remarks + * Split a metadata item into multiple items + */ +export function librarySplitItem( + client: PlexAPICore, + request: operations.SplitItemRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.SplitItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.SplitItemRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.SplitItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.SplitItemRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/split")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "splitItem", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.SplitItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.SplitItemResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryStartAnalysis.ts b/src/funcs/libraryStartAnalysis.ts new file mode 100644 index 00000000..bb56d944 --- /dev/null +++ b/src/funcs/libraryStartAnalysis.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Analyze a section + * + * @remarks + * Start analysis of all items in a section. If BIF generation is enabled, this will also be started on this section + */ +export function libraryStartAnalysis( + client: PlexAPICore, + request: operations.StartAnalysisRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.StartAnalysisResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.StartAnalysisRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.StartAnalysisResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.StartAnalysisRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/analyze")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "startAnalysis", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.StartAnalysisResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.StartAnalysisResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryStartBifGeneration.ts b/src/funcs/libraryStartBifGeneration.ts new file mode 100644 index 00000000..3ee4eaff --- /dev/null +++ b/src/funcs/libraryStartBifGeneration.ts @@ -0,0 +1,231 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Start BIF generation of an item + * + * @remarks + * Start the indexing (BIF generation) of an item + */ +export function libraryStartBifGeneration( + client: PlexAPICore, + request: operations.StartBifGenerationRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.StartBifGenerationResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.StartBifGenerationRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.StartBifGenerationResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.StartBifGenerationRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/index")(pathParams); + + const query = encodeFormQuery({ + "force": payload.force, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "startBifGeneration", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.StartBifGenerationResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.StartBifGenerationResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryStopAllRefreshes.ts b/src/funcs/libraryStopAllRefreshes.ts new file mode 100644 index 00000000..3410f0f6 --- /dev/null +++ b/src/funcs/libraryStopAllRefreshes.ts @@ -0,0 +1,152 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Stop refresh + * + * @remarks + * Stop all refreshes across all sections + */ +export function libraryStopAllRefreshes( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.StopAllRefreshesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.StopAllRefreshesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/library/sections/all/refresh")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "stopAllRefreshes", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.StopAllRefreshesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.StopAllRefreshesResponse$inboundSchema, { + key: "requestHandler_slash-get-responses-200", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryUnmatch.ts b/src/funcs/libraryUnmatch.ts new file mode 100644 index 00000000..22084595 --- /dev/null +++ b/src/funcs/libraryUnmatch.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Unmatch a metadata item + * + * @remarks + * Unmatch a metadata item to info fetched from the agent + */ +export function libraryUnmatch( + client: PlexAPICore, + request: operations.UnmatchRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.UnmatchResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.UnmatchRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.UnmatchResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UnmatchRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/unmatch")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "unmatch", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.UnmatchResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.UnmatchResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryUpdateItemArtwork.ts b/src/funcs/libraryUpdateItemArtwork.ts new file mode 100644 index 00000000..cb699ee4 --- /dev/null +++ b/src/funcs/libraryUpdateItemArtwork.ts @@ -0,0 +1,236 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Set an item's artwork, theme, etc + * + * @remarks + * Set the artwork, thumb, element for a metadata item + * Generally only the admin can perform this action. The exception is if the metadata is a playlist created by the user + */ +export function libraryUpdateItemArtwork( + client: PlexAPICore, + request: operations.UpdateItemArtworkRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.UpdateItemArtworkResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.UpdateItemArtworkRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.UpdateItemArtworkResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateItemArtworkRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + element: encodeSimple("element", payload.element, { + explode: false, + charEncoding: "percent", + }), + ids: encodeSimple("ids", payload.ids, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/metadata/{ids}/{element}")(pathParams); + + const query = encodeFormQuery({ + "url": payload.url, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "updateItemArtwork", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.UpdateItemArtworkResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.UpdateItemArtworkResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/libraryUpdateItems.ts b/src/funcs/libraryUpdateItems.ts new file mode 100644 index 00000000..5ed37e49 --- /dev/null +++ b/src/funcs/libraryUpdateItems.ts @@ -0,0 +1,287 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Set the fields of the filtered items + * + * @remarks + * This endpoint takes an large possible set of values. Here are some examples. + * - **Parameters, extra documentation** + * - artist.title.value + * - When used with track, both artist.title.value and album.title.value need to be specified + * - title.value usage + * - Summary + * - Tracks always rename and never merge + * - Albums and Artists + * - if single item and item without title does not exist, it is renamed. + * - if single item and item with title does exist they are merged. + * - if multiple they are always merged. + * - Tracks + * - Works as expected will update the track's title + * - Single track: `/library/sections/{id}/all?type=10&id=42&title.value=NewName` + * - Multiple tracks: `/library/sections/{id}/all?type=10&id=42,43,44&title.value=NewName` + * - All tracks: `/library/sections/{id}/all?type=10&title.value=NewName` + * - Albums + * - Functionality changes depending on the existence of an album with the same title + * - Album exists + * - Single album: `/library/sections/{id}/all?type=9&id=42&title.value=Album 2` + * - Album with id 42 is merged into album titled "Album 2" + * - Multiple/All albums: `/library/sections/{id}/all?type=9&title.value=Moo Album` + * - All albums are merged into the existing album titled "Moo Album" + * - Album does not exist + * - Single album: `/library/sections/{id}/all?type=9&id=42&title.value=NewAlbumTitle` + * - Album with id 42 has title modified to "NewAlbumTitle" + * - Multiple/All albums: `/library/sections/{id}/all?type=9&title.value=NewAlbumTitle` + * - All albums are merged into a new album with title="NewAlbumTitle" + * - Artists + * - Functionaly changes depending on the existence of an artist with the same title. + * - Artist exists + * - Single artist: `/library/sections/{id}/all?type=8&id=42&title.value=Artist 2` + * - Artist with id 42 is merged into existing artist titled "Artist 2" + * - Multiple/All artists: `/library/sections/{id}/all?type=8&title.value=Artist 3` + * - All artists are merged into the existing artist titled "Artist 3" + * - Artist does not exist + * - Single artist: `/library/sections/{id}/all?type=8&id=42&title.value=NewArtistTitle` + * - Artist with id 42 has title modified to "NewArtistTitle" + * - Multiple/All artists: `/library/sections/{id}/all?type=8&title.value=NewArtistTitle` + * - All artists are merged into a new artist with title="NewArtistTitle" + * + * - **Notes** + * - Technically square brackets are not allowed in an URI except the Internet Protocol Literal Address + * - RFC3513: A host identified by an Internet Protocol literal address, version 6 [RFC3513] or later, is distinguished by enclosing the IP literal within square brackets ("[" and "]"). This is the only place where square bracket characters are allowed in the URI syntax. + * - Escaped square brackets are allowed, but don't render well + */ +export function libraryUpdateItems( + client: PlexAPICore, + request: operations.UpdateItemsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.UpdateItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.UpdateItemsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.UpdateItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateItemsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sectionId: encodeSimple("sectionId", payload.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/library/sections/{sectionId}/all")(pathParams); + + const query = encodeFormQuery({ + "album.title.id": payload["album.title.id"], + "album.title.value": payload["album.title.value"], + "artist.title.id": payload["artist.title.id"], + "artist.title.value": payload["artist.title.value"], + "field.locked": payload["field.locked"], + "field.value": payload["field.value"], + "filters": payload.filters, + "tagtype[].tag": payload["tagtype[].tag"], + "tagtype[].tag.tag-": payload["tagtype[].tag.tag-"], + "tagtype[idx].tag.tag": payload["tagtype[idx].tag.tag"], + "tagtype[idx].tagging.object": payload["tagtype[idx].tagging.object"], + "title.value": payload["title.value"], + "type": payload.type, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "updateItems", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "409", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.UpdateItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.UpdateItemsResponse$inboundSchema), + M.fail([400, 404, 409, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/liveTVGetLiveTVSession.ts b/src/funcs/liveTVGetLiveTVSession.ts new file mode 100644 index 00000000..12b13950 --- /dev/null +++ b/src/funcs/liveTVGetLiveTVSession.ts @@ -0,0 +1,229 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get a single session + * + * @remarks + * Get a single livetv session and metadata + */ +export function liveTVGetLiveTVSession( + client: PlexAPICore, + request: operations.GetLiveTVSessionRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetLiveTVSessionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetLiveTVSessionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetLiveTVSessionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetLiveTVSessionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + sessionId: encodeSimple("sessionId", payload.sessionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/livetv/sessions/{sessionId}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getLiveTVSession", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetLiveTVSessionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetLiveTVSessionResponse$inboundSchema, { + hdrs: true, + key: "MediaContainerWithMetadata", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/liveTVGetSessionPlaylistIndex.ts b/src/funcs/liveTVGetSessionPlaylistIndex.ts new file mode 100644 index 00000000..e9f3469c --- /dev/null +++ b/src/funcs/liveTVGetSessionPlaylistIndex.ts @@ -0,0 +1,233 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get a session playlist index + * + * @remarks + * Get a playlist index for playing this session + */ +export function liveTVGetSessionPlaylistIndex( + client: PlexAPICore, + request: operations.GetSessionPlaylistIndexRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetSessionPlaylistIndexResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetSessionPlaylistIndexRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetSessionPlaylistIndexResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetSessionPlaylistIndexRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + consumerId: encodeSimple("consumerId", payload.consumerId, { + explode: false, + charEncoding: "percent", + }), + sessionId: encodeSimple("sessionId", payload.sessionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/livetv/sessions/{sessionId}/{consumerId}/index.m3u8", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getSessionPlaylistIndex", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetSessionPlaylistIndexResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.GetSessionPlaylistIndexResponse$inboundSchema), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/liveTVGetSessionSegment.ts b/src/funcs/liveTVGetSessionSegment.ts new file mode 100644 index 00000000..41d19a1e --- /dev/null +++ b/src/funcs/liveTVGetSessionSegment.ts @@ -0,0 +1,236 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get a single session segment + * + * @remarks + * Get a single LiveTV session segment + */ +export function liveTVGetSessionSegment( + client: PlexAPICore, + request: operations.GetSessionSegmentRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetSessionSegmentResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetSessionSegmentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetSessionSegmentResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetSessionSegmentRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + consumerId: encodeSimple("consumerId", payload.consumerId, { + explode: false, + charEncoding: "percent", + }), + segmentId: encodeSimple("segmentId", payload.segmentId, { + explode: false, + charEncoding: "percent", + }), + sessionId: encodeSimple("sessionId", payload.sessionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/livetv/sessions/{sessionId}/{consumerId}/{segmentId}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getSessionSegment", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetSessionSegmentResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.GetSessionSegmentResponse$inboundSchema), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/liveTVGetSessions.ts b/src/funcs/liveTVGetSessions.ts new file mode 100644 index 00000000..14338e26 --- /dev/null +++ b/src/funcs/liveTVGetSessions.ts @@ -0,0 +1,153 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get all sessions + * + * @remarks + * Get all livetv sessions and metadata + */ +export function liveTVGetSessions( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetSessionsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetSessionsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/livetv/sessions")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getSessions", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetSessionsResponse$inboundSchema, { + hdrs: true, + key: "MediaContainerWithMetadata", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/logEnablePaperTrail.ts b/src/funcs/logEnablePaperTrail.ts deleted file mode 100644 index 02267725..00000000 --- a/src/funcs/logEnablePaperTrail.ts +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * 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. - */ -export function logEnablePaperTrail( - client: PlexAPICore, - options?: RequestOptions, -): APIPromise< - Result< - operations.EnablePaperTrailResponse, - | errors.EnablePaperTrailBadRequest - | errors.EnablePaperTrailUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - options, - )); -} - -async function $do( - client: PlexAPICore, - options?: RequestOptions, -): Promise< - [ - Result< - operations.EnablePaperTrailResponse, - | errors.EnablePaperTrailBadRequest - | errors.EnablePaperTrailUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const path = pathToFunc("/log/networked")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "enablePaperTrail", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "403", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.EnablePaperTrailBadRequest - | errors.EnablePaperTrailUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.EnablePaperTrailResponse$inboundSchema), - M.jsonErr(400, errors.EnablePaperTrailBadRequest$inboundSchema), - M.jsonErr(401, errors.EnablePaperTrailUnauthorized$inboundSchema), - M.fail([403, "4XX"]), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/logEnablePapertrail.ts b/src/funcs/logEnablePapertrail.ts new file mode 100644 index 00000000..28163ea2 --- /dev/null +++ b/src/funcs/logEnablePapertrail.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Enabling Papertrail + * + * @remarks + * This endpoint will enable all Plex Media Server logs to be sent to the Papertrail networked logging site for a period of time + * + * Note: This endpoint responds to all HTTP verbs but POST is preferred + */ +export function logEnablePapertrail( + client: PlexAPICore, + request: operations.EnablePapertrailRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.EnablePapertrailResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.EnablePapertrailRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.EnablePapertrailResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.EnablePapertrailRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/log/networked")(); + + const query = encodeFormQuery({ + "minutes": payload.minutes, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "enablePapertrail", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["403", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.EnablePapertrailResponse$inboundSchema), + M.fail([403, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/logLogLine.ts b/src/funcs/logLogLine.ts deleted file mode 100644 index c13699bb..00000000 --- a/src/funcs/logLogLine.ts +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * 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. - */ -export function logLogLine( - client: PlexAPICore, - level: operations.LevelOpen, - message: string, - source: string, - options?: RequestOptions, -): APIPromise< - Result< - operations.LogLineResponse, - | errors.LogLineBadRequest - | errors.LogLineUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - level, - message, - source, - options, - )); -} - -async function $do( - client: PlexAPICore, - level: operations.LevelOpen, - message: string, - source: string, - options?: RequestOptions, -): Promise< - [ - Result< - operations.LogLineResponse, - | errors.LogLineBadRequest - | errors.LogLineUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.LogLineRequest = { - level: level, - message: message, - source: source, - }; - - const parsed = safeParse( - input, - (value) => operations.LogLineRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/log")(); - - const query = encodeFormQuery({ - "level": payload.level, - "message": payload.message, - "source": payload.source, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "logLine", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.LogLineBadRequest - | errors.LogLineUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.LogLineResponse$inboundSchema), - M.jsonErr(400, errors.LogLineBadRequest$inboundSchema), - M.jsonErr(401, errors.LogLineUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/logLogMultiLine.ts b/src/funcs/logLogMultiLine.ts deleted file mode 100644 index 9f389c6c..00000000 --- a/src/funcs/logLogMultiLine.ts +++ /dev/null @@ -1,197 +0,0 @@ -/* - * 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 { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * 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. - */ -export function logLogMultiLine( - client: PlexAPICore, - request: string, - options?: RequestOptions, -): APIPromise< - Result< - operations.LogMultiLineResponse, - | errors.LogMultiLineBadRequest - | errors.LogMultiLineUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: PlexAPICore, - request: string, - options?: RequestOptions, -): Promise< - [ - Result< - operations.LogMultiLineResponse, - | errors.LogMultiLineBadRequest - | errors.LogMultiLineUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => z.string().parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = payload; - - const path = pathToFunc("/log")(); - - const headers = new Headers(compactMap({ - "Content-Type": "text/plain", - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "logMultiLine", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.LogMultiLineBadRequest - | errors.LogMultiLineUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.LogMultiLineResponse$inboundSchema), - M.jsonErr(400, errors.LogMultiLineBadRequest$inboundSchema), - M.jsonErr(401, errors.LogMultiLineUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/logWriteLog.ts b/src/funcs/logWriteLog.ts new file mode 100644 index 00000000..734b35de --- /dev/null +++ b/src/funcs/logWriteLog.ts @@ -0,0 +1,174 @@ +/* + * 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 { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Logging a multi-line message to the Plex Media Server log + * + * @remarks + * This endpoint will write multiple lines to the main Plex Media Server log in a single request. It takes a set of query strings as would normally sent to the above PUT endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above. + */ +export function logWriteLog( + client: PlexAPICore, + request: ReadableStream | Blob | ArrayBuffer | Uint8Array, + options?: RequestOptions, +): APIPromise< + Result< + operations.WriteLogResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: ReadableStream | Blob | ArrayBuffer | Uint8Array, + options?: RequestOptions, +): Promise< + [ + Result< + operations.WriteLogResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + z.union([ + z.instanceof(ReadableStream), + z.instanceof(Blob), + z.instanceof(ArrayBuffer), + z.instanceof(Uint8Array), + ]).parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = payload; + + const path = pathToFunc("/log")(); + + const headers = new Headers(compactMap({ + "Content-Type": "text/plain", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "writeLog", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.WriteLogResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.WriteLogResponse$inboundSchema), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/logWriteMessage.ts b/src/funcs/logWriteMessage.ts new file mode 100644 index 00000000..1d137721 --- /dev/null +++ b/src/funcs/logWriteMessage.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Logging a single-line message to the Plex Media Server log + * + * @remarks + * This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. + * + * Note: This endpoint responds to all HTTP verbs **except POST** but PUT is preferred + */ +export function logWriteMessage( + client: PlexAPICore, + request: operations.WriteMessageRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.WriteMessageResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.WriteMessageRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.WriteMessageResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.WriteMessageRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/log")(); + + const query = encodeFormQuery({ + "level": payload.level, + "message": payload.message, + "source": payload.source, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "writeMessage", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.WriteMessageResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.WriteMessageResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/mediaGetBannerImage.ts b/src/funcs/mediaGetBannerImage.ts deleted file mode 100644 index 500751ce..00000000 --- a/src/funcs/mediaGetBannerImage.ts +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Banner Image - * - * @remarks - * Gets the banner image of the media item - */ -export function mediaGetBannerImage( - client: PlexAPICore, - request: operations.GetBannerImageRequest, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetBannerImageResponse, - | errors.GetBannerImageBadRequest - | errors.GetBannerImageUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: PlexAPICore, - request: operations.GetBannerImageRequest, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetBannerImageResponse, - | errors.GetBannerImageBadRequest - | errors.GetBannerImageUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetBannerImageRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - ratingKey: encodeSimple("ratingKey", payload.ratingKey, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/library/metadata/{ratingKey}/banner")(pathParams); - - const query = encodeFormQuery({ - "height": payload.height, - "minSize": payload.minSize, - "upscale": payload.upscale, - "width": payload.width, - }); - - const headers = new Headers(compactMap({ - Accept: "image/jpeg", - "X-Plex-Token": encodeSimple("X-Plex-Token", payload["X-Plex-Token"], { - explode: false, - charEncoding: "none", - }), - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-banner-image", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetBannerImageBadRequest - | errors.GetBannerImageUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - 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"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/mediaGetThumbImage.ts b/src/funcs/mediaGetThumbImage.ts deleted file mode 100644 index bd7986c8..00000000 --- a/src/funcs/mediaGetThumbImage.ts +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Thumb Image - * - * @remarks - * Gets the thumbnail image of the media item - */ -export function mediaGetThumbImage( - client: PlexAPICore, - request: operations.GetThumbImageRequest, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetThumbImageResponse, - | errors.GetThumbImageBadRequest - | errors.GetThumbImageUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: PlexAPICore, - request: operations.GetThumbImageRequest, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetThumbImageResponse, - | errors.GetThumbImageBadRequest - | errors.GetThumbImageUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetThumbImageRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - ratingKey: encodeSimple("ratingKey", payload.ratingKey, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/library/metadata/{ratingKey}/thumb")(pathParams); - - const query = encodeFormQuery({ - "height": payload.height, - "minSize": payload.minSize, - "upscale": payload.upscale, - "width": payload.width, - }); - - const headers = new Headers(compactMap({ - Accept: "image/jpeg", - "X-Plex-Token": encodeSimple("X-Plex-Token", payload["X-Plex-Token"], { - explode: false, - charEncoding: "none", - }), - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-thumb-image", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetThumbImageBadRequest - | errors.GetThumbImageUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - 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"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/mediaMarkPlayed.ts b/src/funcs/mediaMarkPlayed.ts deleted file mode 100644 index a39f14a0..00000000 --- a/src/funcs/mediaMarkPlayed.ts +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Mark Media Played - * - * @remarks - * This will mark the provided media key as Played. - */ -export function mediaMarkPlayed( - client: PlexAPICore, - key: number, - options?: RequestOptions, -): APIPromise< - Result< - operations.MarkPlayedResponse, - | errors.MarkPlayedBadRequest - | errors.MarkPlayedUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - key, - options, - )); -} - -async function $do( - client: PlexAPICore, - key: number, - options?: RequestOptions, -): Promise< - [ - Result< - operations.MarkPlayedResponse, - | errors.MarkPlayedBadRequest - | errors.MarkPlayedUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.MarkPlayedRequest = { - key: key, - }; - - const parsed = safeParse( - input, - (value) => operations.MarkPlayedRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/:/scrobble")(); - - const query = encodeFormQuery({ - "key": payload.key, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "markPlayed", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.MarkPlayedBadRequest - | errors.MarkPlayedUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.MarkPlayedResponse$inboundSchema), - M.jsonErr(400, errors.MarkPlayedBadRequest$inboundSchema), - M.jsonErr(401, errors.MarkPlayedUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/mediaMarkUnplayed.ts b/src/funcs/mediaMarkUnplayed.ts deleted file mode 100644 index 5075b5da..00000000 --- a/src/funcs/mediaMarkUnplayed.ts +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Mark Media Unplayed - * - * @remarks - * This will mark the provided media key as Unplayed. - */ -export function mediaMarkUnplayed( - client: PlexAPICore, - key: number, - options?: RequestOptions, -): APIPromise< - Result< - operations.MarkUnplayedResponse, - | errors.MarkUnplayedBadRequest - | errors.MarkUnplayedUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - key, - options, - )); -} - -async function $do( - client: PlexAPICore, - key: number, - options?: RequestOptions, -): Promise< - [ - Result< - operations.MarkUnplayedResponse, - | errors.MarkUnplayedBadRequest - | errors.MarkUnplayedUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.MarkUnplayedRequest = { - key: key, - }; - - const parsed = safeParse( - input, - (value) => operations.MarkUnplayedRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/:/unscrobble")(); - - const query = encodeFormQuery({ - "key": payload.key, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "markUnplayed", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.MarkUnplayedBadRequest - | errors.MarkUnplayedUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.MarkUnplayedResponse$inboundSchema), - M.jsonErr(400, errors.MarkUnplayedBadRequest$inboundSchema), - M.jsonErr(401, errors.MarkUnplayedUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/mediaUpdatePlayProgress.ts b/src/funcs/mediaUpdatePlayProgress.ts deleted file mode 100644 index 7b1fd6ac..00000000 --- a/src/funcs/mediaUpdatePlayProgress.ts +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Update Media Play Progress - * - * @remarks - * This API command can be used to update the play progress of a media item. - */ -export function mediaUpdatePlayProgress( - client: PlexAPICore, - key: string, - time: number, - state: string, - options?: RequestOptions, -): APIPromise< - Result< - operations.UpdatePlayProgressResponse, - | errors.UpdatePlayProgressBadRequest - | errors.UpdatePlayProgressUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - key, - time, - state, - options, - )); -} - -async function $do( - client: PlexAPICore, - key: string, - time: number, - state: string, - options?: RequestOptions, -): Promise< - [ - Result< - operations.UpdatePlayProgressResponse, - | errors.UpdatePlayProgressBadRequest - | errors.UpdatePlayProgressUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.UpdatePlayProgressRequest = { - key: key, - time: time, - state: state, - }; - - const parsed = safeParse( - input, - (value) => operations.UpdatePlayProgressRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/:/progress")(); - - const query = encodeFormQuery({ - "key": payload.key, - "state": payload.state, - "time": payload.time, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "updatePlayProgress", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.UpdatePlayProgressBadRequest - | errors.UpdatePlayProgressUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.UpdatePlayProgressResponse$inboundSchema), - M.jsonErr(400, errors.UpdatePlayProgressBadRequest$inboundSchema), - M.jsonErr(401, errors.UpdatePlayProgressUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/playQueueAddToPlayQueue.ts b/src/funcs/playQueueAddToPlayQueue.ts new file mode 100644 index 00000000..e2616f96 --- /dev/null +++ b/src/funcs/playQueueAddToPlayQueue.ts @@ -0,0 +1,235 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Add a generator or playlist to a play queue + * + * @remarks + * Adds an item to a play queue (e.g. party mode). Increments the version of the play queue. Takes the following parameters (`uri` and `playlistID` are mutually exclusive). Returns the modified play queue. + */ +export function playQueueAddToPlayQueue( + client: PlexAPICore, + request: operations.AddToPlayQueueRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.AddToPlayQueueResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.AddToPlayQueueRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.AddToPlayQueueResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.AddToPlayQueueRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + playQueueId: encodeSimple("playQueueId", payload.playQueueId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/playQueues/{playQueueId}")(pathParams); + + const query = encodeFormQuery({ + "next": payload.next, + "playlistID": payload.playlistID, + "uri": payload.uri, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "addToPlayQueue", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.AddToPlayQueueResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.AddToPlayQueueResponse$inboundSchema, { + key: "MediaContainerWithPlaylistMetadata", + }), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/playQueueClearPlayQueue.ts b/src/funcs/playQueueClearPlayQueue.ts new file mode 100644 index 00000000..de680347 --- /dev/null +++ b/src/funcs/playQueueClearPlayQueue.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Clear a play queue + * + * @remarks + * Deletes all items in the play queue, and increases the version of the play queue. + */ +export function playQueueClearPlayQueue( + client: PlexAPICore, + request: operations.ClearPlayQueueRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ClearPlayQueueResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ClearPlayQueueRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ClearPlayQueueResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ClearPlayQueueRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + playQueueId: encodeSimple("playQueueId", payload.playQueueId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/playQueues/{playQueueId}/items")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "clearPlayQueue", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ClearPlayQueueResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ClearPlayQueueResponse$inboundSchema, { + key: "MediaContainerWithPlaylistMetadata", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/playQueueCreatePlayQueue.ts b/src/funcs/playQueueCreatePlayQueue.ts new file mode 100644 index 00000000..d626f8bb --- /dev/null +++ b/src/funcs/playQueueCreatePlayQueue.ts @@ -0,0 +1,237 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Create a play queue + * + * @remarks + * Makes a new play queue for a device. The source of the playqueue can either be a URI, or a playlist. The response is a media container with the initial items in the queue. Each item in the queue will be a regular item but with `playQueueItemID` - a unique ID since the queue could have repeated items with the same `ratingKey`. + * Note: Either `uri` or `playlistID` must be specified + */ +export function playQueueCreatePlayQueue( + client: PlexAPICore, + request: operations.CreatePlayQueueRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.CreatePlayQueueResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.CreatePlayQueueRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.CreatePlayQueueResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CreatePlayQueueRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/playQueues")(); + + const query = encodeFormQuery({ + "continuous": payload.continuous, + "extrasPrefixCount": payload.extrasPrefixCount, + "key": payload.key, + "onDeck": payload.onDeck, + "playlistID": payload.playlistID, + "recursive": payload.recursive, + "repeat": payload.repeat, + "shuffle": payload.shuffle, + "type": payload.type, + "uri": payload.uri, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "createPlayQueue", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.CreatePlayQueueResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.CreatePlayQueueResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/playQueueDeletePlayQueueItem.ts b/src/funcs/playQueueDeletePlayQueueItem.ts new file mode 100644 index 00000000..c8ea825b --- /dev/null +++ b/src/funcs/playQueueDeletePlayQueueItem.ts @@ -0,0 +1,235 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Delete an item from a play queue + * + * @remarks + * Deletes an item in a play queue. Increments the version of the play queue. Returns the modified play queue. + */ +export function playQueueDeletePlayQueueItem( + client: PlexAPICore, + request: operations.DeletePlayQueueItemRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DeletePlayQueueItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.DeletePlayQueueItemRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DeletePlayQueueItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeletePlayQueueItemRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + playQueueId: encodeSimple("playQueueId", payload.playQueueId, { + explode: false, + charEncoding: "percent", + }), + playQueueItemId: encodeSimple("playQueueItemId", payload.playQueueItemId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/playQueues/{playQueueId}/items/{playQueueItemId}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deletePlayQueueItem", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DeletePlayQueueItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.DeletePlayQueueItemResponse$inboundSchema, { + key: "MediaContainerWithPlaylistMetadata", + }), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/playQueueGetPlayQueue.ts b/src/funcs/playQueueGetPlayQueue.ts new file mode 100644 index 00000000..5ce843d2 --- /dev/null +++ b/src/funcs/playQueueGetPlayQueue.ts @@ -0,0 +1,237 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Retrieve a play queue + * + * @remarks + * Retrieves the play queue, centered at current item. This can be treated as a regular container by play queue-oblivious clients, but they may wish to request a large window onto the queue since they won't know to refresh. + */ +export function playQueueGetPlayQueue( + client: PlexAPICore, + request: operations.GetPlayQueueRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetPlayQueueResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetPlayQueueRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetPlayQueueResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetPlayQueueRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + playQueueId: encodeSimple("playQueueId", payload.playQueueId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/playQueues/{playQueueId}")(pathParams); + + const query = encodeFormQuery({ + "center": payload.center, + "includeAfter": payload.includeAfter, + "includeBefore": payload.includeBefore, + "own": payload.own, + "window": payload.window, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getPlayQueue", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetPlayQueueResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetPlayQueueResponse$inboundSchema, { + key: "MediaContainerWithPlaylistMetadata", + }), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/playQueueMovePlayQueueItem.ts b/src/funcs/playQueueMovePlayQueueItem.ts new file mode 100644 index 00000000..39b3390b --- /dev/null +++ b/src/funcs/playQueueMovePlayQueueItem.ts @@ -0,0 +1,239 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Move an item in a play queue + * + * @remarks + * Moves an item in a play queue, and increases the version of the play queue. Returns the modified play queue. + */ +export function playQueueMovePlayQueueItem( + client: PlexAPICore, + request: operations.MovePlayQueueItemRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.MovePlayQueueItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.MovePlayQueueItemRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.MovePlayQueueItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MovePlayQueueItemRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + playQueueId: encodeSimple("playQueueId", payload.playQueueId, { + explode: false, + charEncoding: "percent", + }), + playQueueItemId: encodeSimple("playQueueItemId", payload.playQueueItemId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/playQueues/{playQueueId}/items/{playQueueItemId}/move", + )(pathParams); + + const query = encodeFormQuery({ + "after": payload.after, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "movePlayQueueItem", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.MovePlayQueueItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.MovePlayQueueItemResponse$inboundSchema, { + key: "MediaContainerWithPlaylistMetadata", + }), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/playQueueResetPlayQueue.ts b/src/funcs/playQueueResetPlayQueue.ts new file mode 100644 index 00000000..dcb9a6e1 --- /dev/null +++ b/src/funcs/playQueueResetPlayQueue.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Reset a play queue + * + * @remarks + * Reset a play queue to the first item being the current item + */ +export function playQueueResetPlayQueue( + client: PlexAPICore, + request: operations.ResetPlayQueueRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ResetPlayQueueResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ResetPlayQueueRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ResetPlayQueueResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ResetPlayQueueRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + playQueueId: encodeSimple("playQueueId", payload.playQueueId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/playQueues/{playQueueId}/reset")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "resetPlayQueue", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ResetPlayQueueResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ResetPlayQueueResponse$inboundSchema, { + key: "MediaContainerWithPlaylistMetadata", + }), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/playQueueShuffle.ts b/src/funcs/playQueueShuffle.ts new file mode 100644 index 00000000..58805388 --- /dev/null +++ b/src/funcs/playQueueShuffle.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Shuffle a play queue + * + * @remarks + * Shuffle a play queue (or reshuffles if already shuffled). The currently selected item is maintained. Note that this is currently only supported for play queues *without* an Up Next area. Returns the modified play queue. + */ +export function playQueueShuffle( + client: PlexAPICore, + request: operations.ShuffleRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ShuffleResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ShuffleRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ShuffleResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ShuffleRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + playQueueId: encodeSimple("playQueueId", payload.playQueueId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/playQueues/{playQueueId}/shuffle")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "shuffle", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ShuffleResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ShuffleResponse$inboundSchema, { + key: "MediaContainerWithPlaylistMetadata", + }), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/playQueueUnshuffle.ts b/src/funcs/playQueueUnshuffle.ts new file mode 100644 index 00000000..fdc0d833 --- /dev/null +++ b/src/funcs/playQueueUnshuffle.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Unshuffle a play queue + * + * @remarks + * Unshuffles a play queue and restores "natural order". Note that this is currently only supported for play queues *without* an Up Next area. Returns the modified play queue. + */ +export function playQueueUnshuffle( + client: PlexAPICore, + request: operations.UnshuffleRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.UnshuffleResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.UnshuffleRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.UnshuffleResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UnshuffleRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + playQueueId: encodeSimple("playQueueId", payload.playQueueId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/playQueues/{playQueueId}/unshuffle")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "unshuffle", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.UnshuffleResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.UnshuffleResponse$inboundSchema, { + key: "MediaContainerWithPlaylistMetadata", + }), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/playlistGetPlaylist.ts b/src/funcs/playlistGetPlaylist.ts new file mode 100644 index 00000000..a11c8033 --- /dev/null +++ b/src/funcs/playlistGetPlaylist.ts @@ -0,0 +1,229 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * 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. + */ +export function playlistGetPlaylist( + client: PlexAPICore, + request: operations.GetPlaylistRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetPlaylistResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetPlaylistRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetPlaylistResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetPlaylistRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + playlistId: encodeSimple("playlistId", payload.playlistId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/playlists/{playlistId}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getPlaylist", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetPlaylistResponse$inboundSchema, { + key: "MediaContainerWithPlaylistMetadata", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/playlistGetPlaylistItems.ts b/src/funcs/playlistGetPlaylistItems.ts new file mode 100644 index 00000000..54549807 --- /dev/null +++ b/src/funcs/playlistGetPlaylistItems.ts @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * 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. + */ +export function playlistGetPlaylistItems( + client: PlexAPICore, + request: operations.GetPlaylistItemsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetPlaylistItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetPlaylistItemsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetPlaylistItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetPlaylistItemsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + playlistId: encodeSimple("playlistId", payload.playlistId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/playlists/{playlistId}/items")(pathParams); + + const query = encodeFormQuery({ + "type": payload.type, + }, { explode: false }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getPlaylistItems", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetPlaylistItemsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetPlaylistItemsResponse$inboundSchema, { + hdrs: true, + key: "MediaContainerWithMetadata", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/playlistListPlaylists.ts b/src/funcs/playlistListPlaylists.ts new file mode 100644 index 00000000..4f5ac1a5 --- /dev/null +++ b/src/funcs/playlistListPlaylists.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * List playlists + * + * @remarks + * Gets a list of playlists and playlist folders for a user. General filters are permitted, such as `sort=lastViewedAt:desc`. A flat playlist list can be retrieved using `type=15` to limit the collection to just playlists. + */ +export function playlistListPlaylists( + client: PlexAPICore, + request: operations.ListPlaylistsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ListPlaylistsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ListPlaylistsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ListPlaylistsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListPlaylistsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/playlists")(); + + const query = encodeFormQuery({ + "playlistType": payload.playlistType, + "smart": payload.smart, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listPlaylists", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ListPlaylistsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ListPlaylistsResponse$inboundSchema, { + hdrs: true, + key: "MediaContainerWithPlaylistMetadata", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/playlistsAddPlaylistContents.ts b/src/funcs/playlistsAddPlaylistContents.ts deleted file mode 100644 index fe3422ca..00000000 --- a/src/funcs/playlistsAddPlaylistContents.ts +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * 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. - */ -export function playlistsAddPlaylistContents( - client: PlexAPICore, - playlistID: number, - uri: string, - playQueueID?: number | undefined, - options?: RequestOptions, -): APIPromise< - Result< - operations.AddPlaylistContentsResponse, - | errors.AddPlaylistContentsBadRequest - | errors.AddPlaylistContentsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - playlistID, - uri, - playQueueID, - options, - )); -} - -async function $do( - client: PlexAPICore, - playlistID: number, - uri: string, - playQueueID?: number | undefined, - options?: RequestOptions, -): Promise< - [ - Result< - operations.AddPlaylistContentsResponse, - | errors.AddPlaylistContentsBadRequest - | errors.AddPlaylistContentsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.AddPlaylistContentsRequest = { - playlistID: playlistID, - uri: uri, - playQueueID: playQueueID, - }; - - const parsed = safeParse( - input, - (value) => - operations.AddPlaylistContentsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - playlistID: encodeSimple("playlistID", payload.playlistID, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/playlists/{playlistID}/items")(pathParams); - - const query = encodeFormQuery({ - "playQueueID": payload.playQueueID, - "uri": payload.uri, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "addPlaylistContents", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PUT", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.AddPlaylistContentsBadRequest - | errors.AddPlaylistContentsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.AddPlaylistContentsResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.AddPlaylistContentsBadRequest$inboundSchema), - M.jsonErr(401, errors.AddPlaylistContentsUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/playlistsClearPlaylistContents.ts b/src/funcs/playlistsClearPlaylistContents.ts deleted file mode 100644 index 4c38b83a..00000000 --- a/src/funcs/playlistsClearPlaylistContents.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Delete Playlist Contents - * - * @remarks - * Clears a playlist, only works with dumb playlists. Returns the playlist. - */ -export function playlistsClearPlaylistContents( - client: PlexAPICore, - playlistID: number, - options?: RequestOptions, -): APIPromise< - Result< - operations.ClearPlaylistContentsResponse, - | errors.ClearPlaylistContentsBadRequest - | errors.ClearPlaylistContentsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - playlistID, - options, - )); -} - -async function $do( - client: PlexAPICore, - playlistID: number, - options?: RequestOptions, -): Promise< - [ - Result< - operations.ClearPlaylistContentsResponse, - | errors.ClearPlaylistContentsBadRequest - | errors.ClearPlaylistContentsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.ClearPlaylistContentsRequest = { - playlistID: playlistID, - }; - - const parsed = safeParse( - input, - (value) => - operations.ClearPlaylistContentsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - playlistID: encodeSimple("playlistID", payload.playlistID, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/playlists/{playlistID}/items")(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "clearPlaylistContents", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.ClearPlaylistContentsBadRequest - | errors.ClearPlaylistContentsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.ClearPlaylistContentsResponse$inboundSchema), - M.jsonErr(400, errors.ClearPlaylistContentsBadRequest$inboundSchema), - M.jsonErr(401, errors.ClearPlaylistContentsUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/playlistsCreatePlaylist.ts b/src/funcs/playlistsCreatePlaylist.ts deleted file mode 100644 index 91d2d3bf..00000000 --- a/src/funcs/playlistsCreatePlaylist.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * 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. - */ -export function playlistsCreatePlaylist( - client: PlexAPICore, - request: operations.CreatePlaylistRequest, - options?: RequestOptions, -): APIPromise< - Result< - operations.CreatePlaylistResponse, - | errors.CreatePlaylistBadRequest - | errors.CreatePlaylistUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: PlexAPICore, - request: operations.CreatePlaylistRequest, - options?: RequestOptions, -): Promise< - [ - Result< - operations.CreatePlaylistResponse, - | errors.CreatePlaylistBadRequest - | errors.CreatePlaylistUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.CreatePlaylistRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/playlists")(); - - const query = encodeFormQuery({ - "playQueueID": payload.playQueueID, - "smart": payload.smart, - "title": payload.title, - "type": payload.type, - "uri": payload.uri, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "createPlaylist", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.CreatePlaylistBadRequest - | errors.CreatePlaylistUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.CreatePlaylistResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.CreatePlaylistBadRequest$inboundSchema), - M.jsonErr(401, errors.CreatePlaylistUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/playlistsDeletePlaylist.ts b/src/funcs/playlistsDeletePlaylist.ts deleted file mode 100644 index 0c4d64e5..00000000 --- a/src/funcs/playlistsDeletePlaylist.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Deletes a Playlist - * - * @remarks - * This endpoint will delete a playlist - */ -export function playlistsDeletePlaylist( - client: PlexAPICore, - playlistID: number, - options?: RequestOptions, -): APIPromise< - Result< - operations.DeletePlaylistResponse, - | errors.DeletePlaylistBadRequest - | errors.DeletePlaylistUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - playlistID, - options, - )); -} - -async function $do( - client: PlexAPICore, - playlistID: number, - options?: RequestOptions, -): Promise< - [ - Result< - operations.DeletePlaylistResponse, - | errors.DeletePlaylistBadRequest - | errors.DeletePlaylistUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.DeletePlaylistRequest = { - playlistID: playlistID, - }; - - const parsed = safeParse( - input, - (value) => operations.DeletePlaylistRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - playlistID: encodeSimple("playlistID", payload.playlistID, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/playlists/{playlistID}")(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "deletePlaylist", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.DeletePlaylistBadRequest - | errors.DeletePlaylistUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(204, operations.DeletePlaylistResponse$inboundSchema), - M.jsonErr(400, errors.DeletePlaylistBadRequest$inboundSchema), - M.jsonErr(401, errors.DeletePlaylistUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/playlistsGetPlaylist.ts b/src/funcs/playlistsGetPlaylist.ts deleted file mode 100644 index 204999df..00000000 --- a/src/funcs/playlistsGetPlaylist.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * 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. - */ -export function playlistsGetPlaylist( - client: PlexAPICore, - playlistID: number, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetPlaylistResponse, - | errors.GetPlaylistBadRequest - | errors.GetPlaylistUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - playlistID, - options, - )); -} - -async function $do( - client: PlexAPICore, - playlistID: number, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetPlaylistResponse, - | errors.GetPlaylistBadRequest - | errors.GetPlaylistUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetPlaylistRequest = { - playlistID: playlistID, - }; - - const parsed = safeParse( - input, - (value) => operations.GetPlaylistRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - playlistID: encodeSimple("playlistID", payload.playlistID, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/playlists/{playlistID}")(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getPlaylist", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetPlaylistBadRequest - | errors.GetPlaylistUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetPlaylistResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetPlaylistBadRequest$inboundSchema), - M.jsonErr(401, errors.GetPlaylistUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/playlistsGetPlaylistContents.ts b/src/funcs/playlistsGetPlaylistContents.ts deleted file mode 100644 index c83dacfd..00000000 --- a/src/funcs/playlistsGetPlaylistContents.ts +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * 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. - */ -export function playlistsGetPlaylistContents( - client: PlexAPICore, - playlistID: number, - type: operations.GetPlaylistContentsQueryParamTypeOpen, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetPlaylistContentsResponse, - | errors.GetPlaylistContentsBadRequest - | errors.GetPlaylistContentsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - playlistID, - type, - options, - )); -} - -async function $do( - client: PlexAPICore, - playlistID: number, - type: operations.GetPlaylistContentsQueryParamTypeOpen, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetPlaylistContentsResponse, - | errors.GetPlaylistContentsBadRequest - | errors.GetPlaylistContentsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetPlaylistContentsRequest = { - playlistID: playlistID, - type: type, - }; - - const parsed = safeParse( - input, - (value) => - operations.GetPlaylistContentsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - playlistID: encodeSimple("playlistID", payload.playlistID, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/playlists/{playlistID}/items")(pathParams); - - const query = encodeFormQuery({ - "type": payload.type, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getPlaylistContents", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetPlaylistContentsBadRequest - | errors.GetPlaylistContentsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetPlaylistContentsResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetPlaylistContentsBadRequest$inboundSchema), - M.jsonErr(401, errors.GetPlaylistContentsUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/playlistsGetPlaylists.ts b/src/funcs/playlistsGetPlaylists.ts deleted file mode 100644 index 27b8289b..00000000 --- a/src/funcs/playlistsGetPlaylists.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get All Playlists - * - * @remarks - * Get All Playlists given the specified filters. - */ -export function playlistsGetPlaylists( - client: PlexAPICore, - playlistType?: operations.PlaylistTypeOpen | undefined, - smart?: operations.QueryParamSmartOpen | undefined, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetPlaylistsResponse, - | errors.GetPlaylistsBadRequest - | errors.GetPlaylistsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - playlistType, - smart, - options, - )); -} - -async function $do( - client: PlexAPICore, - playlistType?: operations.PlaylistTypeOpen | undefined, - smart?: operations.QueryParamSmartOpen | undefined, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetPlaylistsResponse, - | errors.GetPlaylistsBadRequest - | errors.GetPlaylistsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetPlaylistsRequest = { - playlistType: playlistType, - smart: smart, - }; - - const parsed = safeParse( - input, - (value) => operations.GetPlaylistsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/playlists")(); - - const query = encodeFormQuery({ - "playlistType": payload.playlistType, - "smart": payload.smart, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getPlaylists", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetPlaylistsBadRequest - | errors.GetPlaylistsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetPlaylistsResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetPlaylistsBadRequest$inboundSchema), - M.jsonErr(401, errors.GetPlaylistsUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/playlistsUpdatePlaylist.ts b/src/funcs/playlistsUpdatePlaylist.ts deleted file mode 100644 index 4ef41c5b..00000000 --- a/src/funcs/playlistsUpdatePlaylist.ts +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * 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}` - */ -export function playlistsUpdatePlaylist( - client: PlexAPICore, - playlistID: number, - title?: string | undefined, - summary?: string | undefined, - options?: RequestOptions, -): APIPromise< - Result< - operations.UpdatePlaylistResponse, - | errors.UpdatePlaylistBadRequest - | errors.UpdatePlaylistUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - playlistID, - title, - summary, - options, - )); -} - -async function $do( - client: PlexAPICore, - playlistID: number, - title?: string | undefined, - summary?: string | undefined, - options?: RequestOptions, -): Promise< - [ - Result< - operations.UpdatePlaylistResponse, - | errors.UpdatePlaylistBadRequest - | errors.UpdatePlaylistUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.UpdatePlaylistRequest = { - playlistID: playlistID, - title: title, - summary: summary, - }; - - const parsed = safeParse( - input, - (value) => operations.UpdatePlaylistRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - playlistID: encodeSimple("playlistID", payload.playlistID, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/playlists/{playlistID}")(pathParams); - - const query = encodeFormQuery({ - "summary": payload.summary, - "title": payload.title, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "updatePlaylist", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PUT", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.UpdatePlaylistBadRequest - | errors.UpdatePlaylistUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.UpdatePlaylistResponse$inboundSchema), - M.jsonErr(400, errors.UpdatePlaylistBadRequest$inboundSchema), - M.jsonErr(401, errors.UpdatePlaylistUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/playlistsUploadPlaylist.ts b/src/funcs/playlistsUploadPlaylist.ts deleted file mode 100644 index 6ff0e944..00000000 --- a/src/funcs/playlistsUploadPlaylist.ts +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * 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. - */ -export function playlistsUploadPlaylist( - client: PlexAPICore, - path: string, - force: operations.QueryParamForce, - sectionID: number | undefined, - options?: RequestOptions, -): APIPromise< - Result< - operations.UploadPlaylistResponse, - | errors.UploadPlaylistBadRequest - | errors.UploadPlaylistUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - path, - force, - sectionID, - options, - )); -} - -async function $do( - client: PlexAPICore, - path: string, - force: operations.QueryParamForce, - sectionID: number | undefined, - options?: RequestOptions, -): Promise< - [ - Result< - operations.UploadPlaylistResponse, - | errors.UploadPlaylistBadRequest - | errors.UploadPlaylistUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.UploadPlaylistRequest = { - path: path, - force: force, - sectionID: sectionID, - }; - - const parsed = safeParse( - input, - (value) => operations.UploadPlaylistRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path$ = pathToFunc("/playlists/upload")(); - - const query = encodeFormQuery({ - "force": payload.force, - "path": payload.path, - "sectionID": payload.sectionID, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "uploadPlaylist", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path$, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.UploadPlaylistBadRequest - | errors.UploadPlaylistUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.UploadPlaylistResponse$inboundSchema), - M.jsonErr(400, errors.UploadPlaylistBadRequest$inboundSchema), - M.jsonErr(401, errors.UploadPlaylistUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/plexGetCompanionsData.ts b/src/funcs/plexGetCompanionsData.ts deleted file mode 100644 index 4db6ec77..00000000 --- a/src/funcs/plexGetCompanionsData.ts +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import { GetCompanionsDataServerList } from "../sdk/models/operations/getcompanionsdata.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Companions Data - * - * @remarks - * Get Companions Data - */ -export function plexGetCompanionsData( - client: PlexAPICore, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetCompanionsDataResponse, - | errors.GetCompanionsDataBadRequest - | errors.GetCompanionsDataUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - options, - )); -} - -async function $do( - client: PlexAPICore, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetCompanionsDataResponse, - | errors.GetCompanionsDataBadRequest - | errors.GetCompanionsDataUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const baseURL = options?.serverURL - || pathToFunc(GetCompanionsDataServerList[0], { - charEncoding: "percent", - })(); - - const path = pathToFunc("/companions")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: baseURL ?? "", - operationID: "getCompanionsData", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: baseURL, - path: path, - headers: headers, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetCompanionsDataBadRequest - | errors.GetCompanionsDataUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetCompanionsDataResponse$inboundSchema, { - key: "responseBodies", - }), - M.jsonErr(400, errors.GetCompanionsDataBadRequest$inboundSchema), - M.jsonErr(401, errors.GetCompanionsDataUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/plexGetGeoData.ts b/src/funcs/plexGetGeoData.ts deleted file mode 100644 index 963fb64d..00000000 --- a/src/funcs/plexGetGeoData.ts +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { RequestOptions } from "../lib/sdks.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import { GetGeoDataServerList } from "../sdk/models/operations/getgeodata.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Geo Data - * - * @remarks - * Returns the geolocation and locale data of the caller - */ -export function plexGetGeoData( - client: PlexAPICore, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetGeoDataResponse, - | errors.GetGeoDataBadRequest - | errors.GetGeoDataUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - options, - )); -} - -async function $do( - client: PlexAPICore, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetGeoDataResponse, - | errors.GetGeoDataBadRequest - | errors.GetGeoDataUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const baseURL = options?.serverURL - || pathToFunc(GetGeoDataServerList[0], { charEncoding: "percent" })(); - - const path = pathToFunc("/geoip")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const context = { - options: client._options, - baseURL: baseURL ?? "", - operationID: "getGeoData", - oAuth2Scopes: [], - - resolvedSecurity: null, - - securitySource: null, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - method: "GET", - baseURL: baseURL, - path: path, - headers: headers, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetGeoDataBadRequest - | errors.GetGeoDataUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetGeoDataResponse$inboundSchema, { - key: "GeoData", - }), - M.jsonErr(400, errors.GetGeoDataBadRequest$inboundSchema), - M.jsonErr(401, errors.GetGeoDataUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/plexGetHomeData.ts b/src/funcs/plexGetHomeData.ts deleted file mode 100644 index 4c73b8f6..00000000 --- a/src/funcs/plexGetHomeData.ts +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * 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. - */ -export function plexGetHomeData( - client: PlexAPICore, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetHomeDataResponse, - | errors.GetHomeDataBadRequest - | errors.GetHomeDataUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - options, - )); -} - -async function $do( - client: PlexAPICore, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetHomeDataResponse, - | errors.GetHomeDataBadRequest - | errors.GetHomeDataUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const path = pathToFunc("/home")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getHomeData", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetHomeDataBadRequest - | errors.GetHomeDataUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetHomeDataResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetHomeDataBadRequest$inboundSchema), - M.jsonErr(401, errors.GetHomeDataUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/plexGetPin.ts b/src/funcs/plexGetPin.ts deleted file mode 100644 index 80de40e5..00000000 --- a/src/funcs/plexGetPin.ts +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import { GetPinServerList } from "../sdk/models/operations/getpin.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get a Pin - * - * @remarks - * Retrieve a Pin ID from Plex.tv to use for authentication flows - */ -export function plexGetPin( - client: PlexAPICore, - request: operations.GetPinRequest, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetPinResponse, - | errors.GetPinBadRequest - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: PlexAPICore, - request: operations.GetPinRequest, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetPinResponse, - | errors.GetPinBadRequest - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetPinRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const baseURL = options?.serverURL - || pathToFunc(GetPinServerList[0], { charEncoding: "percent" })(); - - const path = pathToFunc("/pins")(); - - const query = encodeFormQuery({ - "strong": payload.strong, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - "X-Plex-Client-Identifier": encodeSimple( - "X-Plex-Client-Identifier", - payload.ClientID, - { explode: false, charEncoding: "none" }, - ), - "X-Plex-Product": encodeSimple("X-Plex-Product", payload.ClientName, { - explode: false, - charEncoding: "none", - }), - "X-Plex-Version": encodeSimple("X-Plex-Version", payload.ClientVersion, { - explode: false, - charEncoding: "none", - }), - "X-Plex-Device": encodeSimple("X-Plex-Device", payload.DeviceNickname, { - explode: false, - charEncoding: "none", - }), - "X-Plex-Platform": encodeSimple("X-Plex-Platform", payload.Platform, { - explode: false, - charEncoding: "none", - }), - })); - - const context = { - options: client._options, - baseURL: baseURL ?? "", - operationID: "getPin", - oAuth2Scopes: [], - - resolvedSecurity: null, - - securitySource: null, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - method: "POST", - baseURL: baseURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetPinBadRequest - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(201, operations.GetPinResponse$inboundSchema, { - key: "AuthPinContainer", - }), - M.jsonErr(400, errors.GetPinBadRequest$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/plexGetServerResources.ts b/src/funcs/plexGetServerResources.ts deleted file mode 100644 index 646148ef..00000000 --- a/src/funcs/plexGetServerResources.ts +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import { GetServerResourcesServerList } from "../sdk/models/operations/getserverresources.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Server Resources - * - * @remarks - * Get Plex server access tokens and server connections - */ -export function plexGetServerResources( - client: PlexAPICore, - clientID: string, - includeHttps?: operations.IncludeHttps | undefined, - includeRelay?: operations.IncludeRelay | undefined, - includeIPv6?: operations.IncludeIPv6 | undefined, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetServerResourcesResponse, - | errors.GetServerResourcesBadRequest - | errors.GetServerResourcesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - clientID, - includeHttps, - includeRelay, - includeIPv6, - options, - )); -} - -async function $do( - client: PlexAPICore, - clientID: string, - includeHttps?: operations.IncludeHttps | undefined, - includeRelay?: operations.IncludeRelay | undefined, - includeIPv6?: operations.IncludeIPv6 | undefined, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetServerResourcesResponse, - | errors.GetServerResourcesBadRequest - | errors.GetServerResourcesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetServerResourcesRequest = { - clientID: clientID, - includeHttps: includeHttps, - includeRelay: includeRelay, - includeIPv6: includeIPv6, - }; - - const parsed = safeParse( - input, - (value) => operations.GetServerResourcesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const baseURL = options?.serverURL - || pathToFunc(GetServerResourcesServerList[0], { - charEncoding: "percent", - })(); - - const path = pathToFunc("/resources")(); - - const query = encodeFormQuery({ - "includeHttps": payload.includeHttps, - "includeIPv6": payload.includeIPv6, - "includeRelay": payload.includeRelay, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - "X-Plex-Client-Identifier": encodeSimple( - "X-Plex-Client-Identifier", - payload.ClientID, - { explode: false, charEncoding: "none" }, - ), - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: baseURL ?? "", - operationID: "get-server-resources", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: baseURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetServerResourcesBadRequest - | errors.GetServerResourcesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetServerResourcesResponse$inboundSchema, { - key: "PlexDevices", - }), - M.jsonErr(400, errors.GetServerResourcesBadRequest$inboundSchema), - M.jsonErr(401, errors.GetServerResourcesUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/plexGetTokenByPinId.ts b/src/funcs/plexGetTokenByPinId.ts deleted file mode 100644 index c140dfa6..00000000 --- a/src/funcs/plexGetTokenByPinId.ts +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import { GetTokenByPinIdServerList } from "../sdk/models/operations/gettokenbypinid.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Access Token by PinId - * - * @remarks - * Retrieve an Access Token from Plex.tv after the Pin has been authenticated - */ -export function plexGetTokenByPinId( - client: PlexAPICore, - request: operations.GetTokenByPinIdRequest, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetTokenByPinIdResponse, - | errors.GetTokenByPinIdBadRequest - | errors.GetTokenByPinIdResponseBody - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: PlexAPICore, - request: operations.GetTokenByPinIdRequest, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetTokenByPinIdResponse, - | errors.GetTokenByPinIdBadRequest - | errors.GetTokenByPinIdResponseBody - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetTokenByPinIdRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const baseURL = options?.serverURL - || pathToFunc(GetTokenByPinIdServerList[0], { charEncoding: "percent" })(); - - const pathParams = { - pinID: encodeSimple("pinID", payload.pinID, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/pins/{pinID}")(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - "X-Plex-Client-Identifier": encodeSimple( - "X-Plex-Client-Identifier", - payload.ClientID, - { explode: false, charEncoding: "none" }, - ), - "X-Plex-Product": encodeSimple("X-Plex-Product", payload.ClientName, { - explode: false, - charEncoding: "none", - }), - "X-Plex-Version": encodeSimple("X-Plex-Version", payload.ClientVersion, { - explode: false, - charEncoding: "none", - }), - "X-Plex-Device": encodeSimple("X-Plex-Device", payload.DeviceNickname, { - explode: false, - charEncoding: "none", - }), - "X-Plex-Platform": encodeSimple("X-Plex-Platform", payload.Platform, { - explode: false, - charEncoding: "none", - }), - })); - - const context = { - options: client._options, - baseURL: baseURL ?? "", - operationID: "getTokenByPinId", - oAuth2Scopes: [], - - resolvedSecurity: null, - - securitySource: null, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - method: "GET", - baseURL: baseURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "404", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetTokenByPinIdBadRequest - | errors.GetTokenByPinIdResponseBody - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetTokenByPinIdResponse$inboundSchema, { - key: "AuthPinContainer", - }), - M.jsonErr(400, errors.GetTokenByPinIdBadRequest$inboundSchema), - M.jsonErr(404, errors.GetTokenByPinIdResponseBody$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/plexGetUserFriends.ts b/src/funcs/plexGetUserFriends.ts deleted file mode 100644 index 24f0a5de..00000000 --- a/src/funcs/plexGetUserFriends.ts +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import { GetUserFriendsServerList } from "../sdk/models/operations/getuserfriends.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get list of friends of the user logged in - * - * @remarks - * Get friends of provided auth token. - */ -export function plexGetUserFriends( - client: PlexAPICore, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetUserFriendsResponse, - | errors.GetUserFriendsBadRequest - | errors.GetUserFriendsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - options, - )); -} - -async function $do( - client: PlexAPICore, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetUserFriendsResponse, - | errors.GetUserFriendsBadRequest - | errors.GetUserFriendsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const baseURL = options?.serverURL - || pathToFunc(GetUserFriendsServerList[0], { charEncoding: "percent" })(); - - const path = pathToFunc("/friends")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: baseURL ?? "", - operationID: "getUserFriends", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: baseURL, - path: path, - headers: headers, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetUserFriendsBadRequest - | errors.GetUserFriendsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetUserFriendsResponse$inboundSchema, { - key: "Friends", - }), - M.jsonErr(400, errors.GetUserFriendsBadRequest$inboundSchema), - M.jsonErr(401, errors.GetUserFriendsUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/preferencesGetAllPreferences.ts b/src/funcs/preferencesGetAllPreferences.ts new file mode 100644 index 00000000..f26b7f46 --- /dev/null +++ b/src/funcs/preferencesGetAllPreferences.ts @@ -0,0 +1,152 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get all preferences + * + * @remarks + * Get the list of all preferences + */ +export function preferencesGetAllPreferences( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetAllPreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetAllPreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/:/prefs")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getAllPreferences", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetAllPreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetAllPreferencesResponse$inboundSchema, { + key: "MediaContainerWithSettings", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/preferencesGetPreference.ts b/src/funcs/preferencesGetPreference.ts new file mode 100644 index 00000000..26bbbc09 --- /dev/null +++ b/src/funcs/preferencesGetPreference.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get a preferences + * + * @remarks + * Get a single preference and value + */ +export function preferencesGetPreference( + client: PlexAPICore, + request: operations.GetPreferenceRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetPreferenceResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetPreferenceRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetPreferenceResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetPreferenceRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/:/prefs/get")(); + + const query = encodeFormQuery({ + "id": payload.id, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getPreference", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetPreferenceResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetPreferenceResponse$inboundSchema, { + key: "MediaContainerWithSettings", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/preferencesSetPreferences.ts b/src/funcs/preferencesSetPreferences.ts new file mode 100644 index 00000000..275f88fb --- /dev/null +++ b/src/funcs/preferencesSetPreferences.ts @@ -0,0 +1,224 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Set preferences + * + * @remarks + * Set a set of preferences in query parameters + */ +export function preferencesSetPreferences( + client: PlexAPICore, + request: operations.SetPreferencesRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.SetPreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.SetPreferencesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.SetPreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.SetPreferencesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/:/prefs")(); + + const query = encodeFormQuery({ + "prefs": payload.prefs, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "setPreferences", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "403", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.SetPreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.SetPreferencesResponse$inboundSchema), + M.fail([400, 403, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/providerAddProvider.ts b/src/funcs/providerAddProvider.ts new file mode 100644 index 00000000..4f101bef --- /dev/null +++ b/src/funcs/providerAddProvider.ts @@ -0,0 +1,224 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Add a media provider + * + * @remarks + * This endpoint registers a media provider with the server. Once registered, the media server acts as a reverse proxy to the provider, allowing both local and remote providers to work. + */ +export function providerAddProvider( + client: PlexAPICore, + request: operations.AddProviderRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.AddProviderResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.AddProviderRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.AddProviderResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.AddProviderRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/media/providers")(); + + const query = encodeFormQuery({ + "url": payload.url, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "addProvider", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.AddProviderResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.AddProviderResponse$inboundSchema), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/providerDeleteMediaProvider.ts b/src/funcs/providerDeleteMediaProvider.ts new file mode 100644 index 00000000..ad8937e7 --- /dev/null +++ b/src/funcs/providerDeleteMediaProvider.ts @@ -0,0 +1,227 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Delete a media provider + * + * @remarks + * Deletes a media provider with the given id + */ +export function providerDeleteMediaProvider( + client: PlexAPICore, + request: operations.DeleteMediaProviderRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DeleteMediaProviderResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.DeleteMediaProviderRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DeleteMediaProviderResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteMediaProviderRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + provider: encodeSimple("provider", payload.provider, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/media/providers/{provider}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deleteMediaProvider", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "403", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DeleteMediaProviderResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.DeleteMediaProviderResponse$inboundSchema), + M.fail([400, 403, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/providerListProviders.ts b/src/funcs/providerListProviders.ts new file mode 100644 index 00000000..143db3c1 --- /dev/null +++ b/src/funcs/providerListProviders.ts @@ -0,0 +1,152 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get the list of available media providers + * + * @remarks + * Get the list of all available media providers for this PMS. This will generally include the library provider and possibly EPG if DVR is set up. + */ +export function providerListProviders( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.ListProvidersResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ListProvidersResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/media/providers")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listProviders", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ListProvidersResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ListProvidersResponse$inboundSchema, { + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/providerRefreshProviders.ts b/src/funcs/providerRefreshProviders.ts new file mode 100644 index 00000000..e2587251 --- /dev/null +++ b/src/funcs/providerRefreshProviders.ts @@ -0,0 +1,150 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Refresh media providers + * + * @remarks + * Refresh all known media providers. This is useful in case a provider has updated features. + */ +export function providerRefreshProviders( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.RefreshProvidersResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.RefreshProvidersResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/media/providers/refresh")(); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "refreshProviders", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.RefreshProvidersResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.RefreshProvidersResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/rateSetRating.ts b/src/funcs/rateSetRating.ts new file mode 100644 index 00000000..4e425be6 --- /dev/null +++ b/src/funcs/rateSetRating.ts @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Rate an item + * + * @remarks + * Set the rating on an item. + * This API does respond to the GET verb but applications should use PUT + */ +export function rateSetRating( + client: PlexAPICore, + request: operations.SetRatingRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.SetRatingResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.SetRatingRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.SetRatingResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.SetRatingRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/:/rate")(); + + const query = encodeFormQuery({ + "identifier": payload.identifier, + "key": payload.key, + "ratedAt": payload.ratedAt, + "rating": payload.rating, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "setRating", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.SetRatingResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.SetRatingResponse$inboundSchema), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/searchGetSearchResults.ts b/src/funcs/searchGetSearchResults.ts deleted file mode 100644 index 1e41ed06..00000000 --- a/src/funcs/searchGetSearchResults.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Search Results - * - * @remarks - * This will search the database for the string provided. - */ -export function searchGetSearchResults( - client: PlexAPICore, - query: string, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetSearchResultsResponse, - | errors.GetSearchResultsBadRequest - | errors.GetSearchResultsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - query, - options, - )); -} - -async function $do( - client: PlexAPICore, - query: string, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetSearchResultsResponse, - | errors.GetSearchResultsBadRequest - | errors.GetSearchResultsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetSearchResultsRequest = { - query: query, - }; - - const parsed = safeParse( - input, - (value) => operations.GetSearchResultsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/search")(); - - const query$ = encodeFormQuery({ - "query": payload.query, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getSearchResults", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query$, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetSearchResultsBadRequest - | errors.GetSearchResultsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetSearchResultsResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetSearchResultsBadRequest$inboundSchema), - M.jsonErr(401, errors.GetSearchResultsUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/searchPerformSearch.ts b/src/funcs/searchPerformSearch.ts deleted file mode 100644 index 26a358de..00000000 --- a/src/funcs/searchPerformSearch.ts +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * 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. - */ -export function searchPerformSearch( - client: PlexAPICore, - query: string, - sectionId?: number | undefined, - limit?: number | undefined, - options?: RequestOptions, -): APIPromise< - Result< - operations.PerformSearchResponse, - | errors.PerformSearchBadRequest - | errors.PerformSearchUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - query, - sectionId, - limit, - options, - )); -} - -async function $do( - client: PlexAPICore, - query: string, - sectionId?: number | undefined, - limit?: number | undefined, - options?: RequestOptions, -): Promise< - [ - Result< - operations.PerformSearchResponse, - | errors.PerformSearchBadRequest - | errors.PerformSearchUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.PerformSearchRequest = { - query: query, - sectionId: sectionId, - limit: limit, - }; - - const parsed = safeParse( - input, - (value) => operations.PerformSearchRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/hubs/search")(); - - const query$ = encodeFormQuery({ - "limit": payload.limit, - "query": payload.query, - "sectionId": payload.sectionId, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "performSearch", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query$, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.PerformSearchBadRequest - | errors.PerformSearchUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.PerformSearchResponse$inboundSchema), - M.jsonErr(400, errors.PerformSearchBadRequest$inboundSchema), - M.jsonErr(401, errors.PerformSearchUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/searchPerformVoiceSearch.ts b/src/funcs/searchPerformVoiceSearch.ts deleted file mode 100644 index 51f3a6a7..00000000 --- a/src/funcs/searchPerformVoiceSearch.ts +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * 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. - */ -export function searchPerformVoiceSearch( - client: PlexAPICore, - query: string, - sectionId?: number | undefined, - limit?: number | undefined, - options?: RequestOptions, -): APIPromise< - Result< - operations.PerformVoiceSearchResponse, - | errors.PerformVoiceSearchBadRequest - | errors.PerformVoiceSearchUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - query, - sectionId, - limit, - options, - )); -} - -async function $do( - client: PlexAPICore, - query: string, - sectionId?: number | undefined, - limit?: number | undefined, - options?: RequestOptions, -): Promise< - [ - Result< - operations.PerformVoiceSearchResponse, - | errors.PerformVoiceSearchBadRequest - | errors.PerformVoiceSearchUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.PerformVoiceSearchRequest = { - query: query, - sectionId: sectionId, - limit: limit, - }; - - const parsed = safeParse( - input, - (value) => operations.PerformVoiceSearchRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/hubs/search/voice")(); - - const query$ = encodeFormQuery({ - "limit": payload.limit, - "query": payload.query, - "sectionId": payload.sectionId, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "performVoiceSearch", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query$, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.PerformVoiceSearchBadRequest - | errors.PerformVoiceSearchUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.PerformVoiceSearchResponse$inboundSchema), - M.jsonErr(400, errors.PerformVoiceSearchBadRequest$inboundSchema), - M.jsonErr(401, errors.PerformVoiceSearchUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/searchSearchHubs.ts b/src/funcs/searchSearchHubs.ts new file mode 100644 index 00000000..9927b001 --- /dev/null +++ b/src/funcs/searchSearchHubs.ts @@ -0,0 +1,242 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Search Hub + * + * @remarks + * Perform a search and get the result as hubs + * + * 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. + */ +export function searchSearchHubs( + client: PlexAPICore, + request: operations.SearchHubsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.SearchHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.SearchHubsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.SearchHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.SearchHubsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/hubs/search")(); + + const query = encodeFormQuery({ + "limit": payload.limit, + "query": payload.query, + "sectionId": payload.sectionId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "searchHubs", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.SearchHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.SearchHubsResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/searchVoiceSearchHubs.ts b/src/funcs/searchVoiceSearchHubs.ts new file mode 100644 index 00000000..603e351f --- /dev/null +++ b/src/funcs/searchVoiceSearchHubs.ts @@ -0,0 +1,233 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Voice Search Hub + * + * @remarks + * Perform a search tailored to voice input and get the result as hubs + * + * 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. + */ +export function searchVoiceSearchHubs( + client: PlexAPICore, + request: operations.VoiceSearchHubsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.VoiceSearchHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.VoiceSearchHubsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.VoiceSearchHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.VoiceSearchHubsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/hubs/search/voice")(); + + const query = encodeFormQuery({ + "limit": payload.limit, + "query": payload.query, + "type": payload.type, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "voiceSearchHubs", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.VoiceSearchHubsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.VoiceSearchHubsResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/serverGetAvailableClients.ts b/src/funcs/serverGetAvailableClients.ts deleted file mode 100644 index acf929b7..00000000 --- a/src/funcs/serverGetAvailableClients.ts +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Available Clients - * - * @remarks - * Get Available Clients - */ -export function serverGetAvailableClients( - client: PlexAPICore, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetAvailableClientsResponse, - | errors.GetAvailableClientsBadRequest - | errors.GetAvailableClientsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - options, - )); -} - -async function $do( - client: PlexAPICore, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetAvailableClientsResponse, - | errors.GetAvailableClientsBadRequest - | errors.GetAvailableClientsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const path = pathToFunc("/clients")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getAvailableClients", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetAvailableClientsBadRequest - | errors.GetAvailableClientsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetAvailableClientsResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetAvailableClientsBadRequest$inboundSchema), - M.jsonErr(401, errors.GetAvailableClientsUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/serverGetDevices.ts b/src/funcs/serverGetDevices.ts deleted file mode 100644 index 878a7b0d..00000000 --- a/src/funcs/serverGetDevices.ts +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Devices - * - * @remarks - * Get Devices - */ -export function serverGetDevices( - client: PlexAPICore, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetDevicesResponse, - | errors.GetDevicesBadRequest - | errors.GetDevicesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - options, - )); -} - -async function $do( - client: PlexAPICore, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetDevicesResponse, - | errors.GetDevicesBadRequest - | errors.GetDevicesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const path = pathToFunc("/devices")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getDevices", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetDevicesBadRequest - | errors.GetDevicesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetDevicesResponse$inboundSchema, { key: "object" }), - M.jsonErr(400, errors.GetDevicesBadRequest$inboundSchema), - M.jsonErr(401, errors.GetDevicesUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/serverGetMediaProviders.ts b/src/funcs/serverGetMediaProviders.ts deleted file mode 100644 index 9702482e..00000000 --- a/src/funcs/serverGetMediaProviders.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Media Providers - * - * @remarks - * Retrieves media providers and their features from the Plex server. - */ -export function serverGetMediaProviders( - client: PlexAPICore, - xPlexToken: string, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetMediaProvidersResponse, - | errors.GetMediaProvidersBadRequest - | errors.GetMediaProvidersUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - xPlexToken, - options, - )); -} - -async function $do( - client: PlexAPICore, - xPlexToken: string, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetMediaProvidersResponse, - | errors.GetMediaProvidersBadRequest - | errors.GetMediaProvidersUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetMediaProvidersRequest = { - xPlexToken: xPlexToken, - }; - - const parsed = safeParse( - input, - (value) => operations.GetMediaProvidersRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/media/providers")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - "X-Plex-Token": encodeSimple("X-Plex-Token", payload["X-Plex-Token"], { - explode: false, - charEncoding: "none", - }), - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-media-providers", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetMediaProvidersBadRequest - | errors.GetMediaProvidersUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetMediaProvidersResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetMediaProvidersBadRequest$inboundSchema), - M.jsonErr(401, errors.GetMediaProvidersUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/serverGetMyPlexAccount.ts b/src/funcs/serverGetMyPlexAccount.ts deleted file mode 100644 index 8f5c7934..00000000 --- a/src/funcs/serverGetMyPlexAccount.ts +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get MyPlex Account - * - * @remarks - * Returns MyPlex Account Information - */ -export function serverGetMyPlexAccount( - client: PlexAPICore, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetMyPlexAccountResponse, - | errors.GetMyPlexAccountBadRequest - | errors.GetMyPlexAccountUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - options, - )); -} - -async function $do( - client: PlexAPICore, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetMyPlexAccountResponse, - | errors.GetMyPlexAccountBadRequest - | errors.GetMyPlexAccountUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const path = pathToFunc("/myplex/account")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getMyPlexAccount", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetMyPlexAccountBadRequest - | errors.GetMyPlexAccountUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetMyPlexAccountResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetMyPlexAccountBadRequest$inboundSchema), - M.jsonErr(401, errors.GetMyPlexAccountUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/serverGetResizedPhoto.ts b/src/funcs/serverGetResizedPhoto.ts deleted file mode 100644 index e950c72f..00000000 --- a/src/funcs/serverGetResizedPhoto.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get a Resized Photo - * - * @remarks - * Plex's Photo transcoder is used throughout the service to serve images at specified sizes. - */ -export function serverGetResizedPhoto( - client: PlexAPICore, - request: operations.GetResizedPhotoRequest, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetResizedPhotoResponse, - | errors.GetResizedPhotoBadRequest - | errors.GetResizedPhotoUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: PlexAPICore, - request: operations.GetResizedPhotoRequest, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetResizedPhotoResponse, - | errors.GetResizedPhotoBadRequest - | errors.GetResizedPhotoUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetResizedPhotoRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - 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 headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getResizedPhoto", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetResizedPhotoBadRequest - | errors.GetResizedPhotoUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.GetResizedPhotoResponse$inboundSchema), - M.jsonErr(400, errors.GetResizedPhotoBadRequest$inboundSchema), - M.jsonErr(401, errors.GetResizedPhotoUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/serverGetServerCapabilities.ts b/src/funcs/serverGetServerCapabilities.ts deleted file mode 100644 index c8688014..00000000 --- a/src/funcs/serverGetServerCapabilities.ts +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Server Capabilities - * - * @remarks - * Get Server Capabilities - */ -export function serverGetServerCapabilities( - client: PlexAPICore, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetServerCapabilitiesResponse, - | errors.GetServerCapabilitiesBadRequest - | errors.GetServerCapabilitiesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - options, - )); -} - -async function $do( - client: PlexAPICore, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetServerCapabilitiesResponse, - | errors.GetServerCapabilitiesBadRequest - | errors.GetServerCapabilitiesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const path = pathToFunc("/")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getServerCapabilities", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetServerCapabilitiesBadRequest - | errors.GetServerCapabilitiesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetServerCapabilitiesResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetServerCapabilitiesBadRequest$inboundSchema), - M.jsonErr(401, errors.GetServerCapabilitiesUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/serverGetServerIdentity.ts b/src/funcs/serverGetServerIdentity.ts deleted file mode 100644 index 491b1828..00000000 --- a/src/funcs/serverGetServerIdentity.ts +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { RequestOptions } from "../lib/sdks.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Server Identity - * - * @remarks - * This request is useful to determine if the server is online or offline - */ -export function serverGetServerIdentity( - client: PlexAPICore, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetServerIdentityResponse, - | errors.GetServerIdentityRequestTimeout - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - options, - )); -} - -async function $do( - client: PlexAPICore, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetServerIdentityResponse, - | errors.GetServerIdentityRequestTimeout - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const path = pathToFunc("/identity")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "get-server-identity", - oAuth2Scopes: [], - - resolvedSecurity: null, - - securitySource: null, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["408", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetServerIdentityRequestTimeout - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetServerIdentityResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(408, errors.GetServerIdentityRequestTimeout$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/serverGetServerList.ts b/src/funcs/serverGetServerList.ts deleted file mode 100644 index 18436cf5..00000000 --- a/src/funcs/serverGetServerList.ts +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Server List - * - * @remarks - * Get Server List - */ -export function serverGetServerList( - client: PlexAPICore, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetServerListResponse, - | errors.GetServerListBadRequest - | errors.GetServerListUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - options, - )); -} - -async function $do( - client: PlexAPICore, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetServerListResponse, - | errors.GetServerListBadRequest - | errors.GetServerListUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const path = pathToFunc("/servers")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getServerList", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetServerListBadRequest - | errors.GetServerListUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetServerListResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetServerListBadRequest$inboundSchema), - M.jsonErr(401, errors.GetServerListUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/serverGetServerPreferences.ts b/src/funcs/serverGetServerPreferences.ts deleted file mode 100644 index 5305dd23..00000000 --- a/src/funcs/serverGetServerPreferences.ts +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Server Preferences - * - * @remarks - * Get Server Preferences - */ -export function serverGetServerPreferences( - client: PlexAPICore, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetServerPreferencesResponse, - | errors.GetServerPreferencesBadRequest - | errors.GetServerPreferencesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - options, - )); -} - -async function $do( - client: PlexAPICore, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetServerPreferencesResponse, - | errors.GetServerPreferencesBadRequest - | errors.GetServerPreferencesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const path = pathToFunc("/:/prefs")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getServerPreferences", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetServerPreferencesBadRequest - | errors.GetServerPreferencesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetServerPreferencesResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetServerPreferencesBadRequest$inboundSchema), - M.jsonErr(401, errors.GetServerPreferencesUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/sessionsGetSessionHistory.ts b/src/funcs/sessionsGetSessionHistory.ts deleted file mode 100644 index 43825876..00000000 --- a/src/funcs/sessionsGetSessionHistory.ts +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Session History - * - * @remarks - * This will Retrieve a listing of all history views. - */ -export function sessionsGetSessionHistory( - client: PlexAPICore, - sort?: string | undefined, - accountId?: number | undefined, - filter?: operations.QueryParamFilter | undefined, - librarySectionID?: number | undefined, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetSessionHistoryResponse, - | errors.GetSessionHistoryBadRequest - | errors.GetSessionHistoryUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - sort, - accountId, - filter, - librarySectionID, - options, - )); -} - -async function $do( - client: PlexAPICore, - sort?: string | undefined, - accountId?: number | undefined, - filter?: operations.QueryParamFilter | undefined, - librarySectionID?: number | undefined, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetSessionHistoryResponse, - | errors.GetSessionHistoryBadRequest - | errors.GetSessionHistoryUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetSessionHistoryRequest = { - sort: sort, - accountId: accountId, - filter: filter, - librarySectionID: librarySectionID, - }; - - const parsed = safeParse( - input, - (value) => operations.GetSessionHistoryRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/status/sessions/history/all")(); - - const query = encodeFormQuery({ - "accountId": payload.accountId, - "filter": payload.filter, - "librarySectionID": payload.librarySectionID, - "sort": payload.sort, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getSessionHistory", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetSessionHistoryBadRequest - | errors.GetSessionHistoryUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetSessionHistoryResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetSessionHistoryBadRequest$inboundSchema), - M.jsonErr(401, errors.GetSessionHistoryUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/sessionsGetSessions.ts b/src/funcs/sessionsGetSessions.ts deleted file mode 100644 index 5e5151fd..00000000 --- a/src/funcs/sessionsGetSessions.ts +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Active Sessions - * - * @remarks - * This will retrieve the "Now Playing" Information of the PMS. - */ -export function sessionsGetSessions( - client: PlexAPICore, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetSessionsResponse, - | errors.GetSessionsBadRequest - | errors.GetSessionsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - options, - )); -} - -async function $do( - client: PlexAPICore, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetSessionsResponse, - | errors.GetSessionsBadRequest - | errors.GetSessionsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const path = pathToFunc("/status/sessions")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getSessions", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetSessionsBadRequest - | errors.GetSessionsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetSessionsResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetSessionsBadRequest$inboundSchema), - M.jsonErr(401, errors.GetSessionsUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/sessionsGetTranscodeSessions.ts b/src/funcs/sessionsGetTranscodeSessions.ts deleted file mode 100644 index 576a075f..00000000 --- a/src/funcs/sessionsGetTranscodeSessions.ts +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Transcode Sessions - * - * @remarks - * Get Transcode Sessions - */ -export function sessionsGetTranscodeSessions( - client: PlexAPICore, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetTranscodeSessionsResponse, - | errors.GetTranscodeSessionsBadRequest - | errors.GetTranscodeSessionsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - options, - )); -} - -async function $do( - client: PlexAPICore, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetTranscodeSessionsResponse, - | errors.GetTranscodeSessionsBadRequest - | errors.GetTranscodeSessionsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const path = pathToFunc("/transcode/sessions")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getTranscodeSessions", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetTranscodeSessionsBadRequest - | errors.GetTranscodeSessionsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetTranscodeSessionsResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetTranscodeSessionsBadRequest$inboundSchema), - M.jsonErr(401, errors.GetTranscodeSessionsUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/sessionsStopTranscodeSession.ts b/src/funcs/sessionsStopTranscodeSession.ts deleted file mode 100644 index 5c897f89..00000000 --- a/src/funcs/sessionsStopTranscodeSession.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Stop a Transcode Session - * - * @remarks - * Stop a Transcode Session - */ -export function sessionsStopTranscodeSession( - client: PlexAPICore, - sessionKey: string, - options?: RequestOptions, -): APIPromise< - Result< - operations.StopTranscodeSessionResponse, - | errors.StopTranscodeSessionBadRequest - | errors.StopTranscodeSessionUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - sessionKey, - options, - )); -} - -async function $do( - client: PlexAPICore, - sessionKey: string, - options?: RequestOptions, -): Promise< - [ - Result< - operations.StopTranscodeSessionResponse, - | errors.StopTranscodeSessionBadRequest - | errors.StopTranscodeSessionUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.StopTranscodeSessionRequest = { - sessionKey: sessionKey, - }; - - const parsed = safeParse( - input, - (value) => - operations.StopTranscodeSessionRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - sessionKey: encodeSimple("sessionKey", payload.sessionKey, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/transcode/sessions/{sessionKey}")(pathParams); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "stopTranscodeSession", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.StopTranscodeSessionBadRequest - | errors.StopTranscodeSessionUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(204, operations.StopTranscodeSessionResponse$inboundSchema), - M.jsonErr(400, errors.StopTranscodeSessionBadRequest$inboundSchema), - M.jsonErr(401, errors.StopTranscodeSessionUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/statisticsGetBandwidthStatistics.ts b/src/funcs/statisticsGetBandwidthStatistics.ts deleted file mode 100644 index ebd7ad80..00000000 --- a/src/funcs/statisticsGetBandwidthStatistics.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Bandwidth Statistics - * - * @remarks - * This will return the bandwidth statistics for the server - */ -export function statisticsGetBandwidthStatistics( - client: PlexAPICore, - timespan?: number | undefined, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetBandwidthStatisticsResponse, - | errors.GetBandwidthStatisticsBadRequest - | errors.GetBandwidthStatisticsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - timespan, - options, - )); -} - -async function $do( - client: PlexAPICore, - timespan?: number | undefined, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetBandwidthStatisticsResponse, - | errors.GetBandwidthStatisticsBadRequest - | errors.GetBandwidthStatisticsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetBandwidthStatisticsRequest = { - timespan: timespan, - }; - - const parsed = safeParse( - input, - (value) => - operations.GetBandwidthStatisticsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/statistics/bandwidth")(); - - const query = encodeFormQuery({ - "timespan": payload.timespan, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getBandwidthStatistics", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetBandwidthStatisticsBadRequest - | errors.GetBandwidthStatisticsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetBandwidthStatisticsResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetBandwidthStatisticsBadRequest$inboundSchema), - M.jsonErr(401, errors.GetBandwidthStatisticsUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/statisticsGetResourcesStatistics.ts b/src/funcs/statisticsGetResourcesStatistics.ts deleted file mode 100644 index c100d8c3..00000000 --- a/src/funcs/statisticsGetResourcesStatistics.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Resources Statistics - * - * @remarks - * This will return the resources for the server - */ -export function statisticsGetResourcesStatistics( - client: PlexAPICore, - timespan?: number | undefined, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetResourcesStatisticsResponse, - | errors.GetResourcesStatisticsBadRequest - | errors.GetResourcesStatisticsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - timespan, - options, - )); -} - -async function $do( - client: PlexAPICore, - timespan?: number | undefined, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetResourcesStatisticsResponse, - | errors.GetResourcesStatisticsBadRequest - | errors.GetResourcesStatisticsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetResourcesStatisticsRequest = { - timespan: timespan, - }; - - const parsed = safeParse( - input, - (value) => - operations.GetResourcesStatisticsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/statistics/resources")(); - - const query = encodeFormQuery({ - "timespan": payload.timespan, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getResourcesStatistics", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetResourcesStatisticsBadRequest - | errors.GetResourcesStatisticsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetResourcesStatisticsResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetResourcesStatisticsBadRequest$inboundSchema), - M.jsonErr(401, errors.GetResourcesStatisticsUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/statisticsGetStatistics.ts b/src/funcs/statisticsGetStatistics.ts deleted file mode 100644 index 5979ec84..00000000 --- a/src/funcs/statisticsGetStatistics.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get Media Statistics - * - * @remarks - * This will return the media statistics for the server - */ -export function statisticsGetStatistics( - client: PlexAPICore, - timespan?: number | undefined, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetStatisticsResponse, - | errors.GetStatisticsBadRequest - | errors.GetStatisticsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - timespan, - options, - )); -} - -async function $do( - client: PlexAPICore, - timespan?: number | undefined, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetStatisticsResponse, - | errors.GetStatisticsBadRequest - | errors.GetStatisticsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.GetStatisticsRequest = { - timespan: timespan, - }; - - const parsed = safeParse( - input, - (value) => operations.GetStatisticsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/statistics/media")(); - - const query = encodeFormQuery({ - "timespan": payload.timespan, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getStatistics", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetStatisticsBadRequest - | errors.GetStatisticsUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetStatisticsResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetStatisticsBadRequest$inboundSchema), - M.jsonErr(401, errors.GetStatisticsUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/statusDeleteHistory.ts b/src/funcs/statusDeleteHistory.ts new file mode 100644 index 00000000..5b8644d4 --- /dev/null +++ b/src/funcs/statusDeleteHistory.ts @@ -0,0 +1,229 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Delete Single History Item + * + * @remarks + * Delete a single history item by id + */ +export function statusDeleteHistory( + client: PlexAPICore, + request: operations.DeleteHistoryRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DeleteHistoryResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.DeleteHistoryRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DeleteHistoryResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteHistoryRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + historyId: encodeSimple("historyId", payload.historyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/status/sessions/history/{historyId}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deleteHistory", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DeleteHistoryResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.DeleteHistoryResponse$inboundSchema, { + hdrs: true, + key: "MediaContainer", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusGetBackgroundTasks.ts b/src/funcs/statusGetBackgroundTasks.ts new file mode 100644 index 00000000..bcf8c0d8 --- /dev/null +++ b/src/funcs/statusGetBackgroundTasks.ts @@ -0,0 +1,152 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get background tasks + * + * @remarks + * Get the list of all background tasks + */ +export function statusGetBackgroundTasks( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetBackgroundTasksResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetBackgroundTasksResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/status/sessions/background")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getBackgroundTasks", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetBackgroundTasksResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetBackgroundTasksResponse$inboundSchema, { + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusGetHistoryItem.ts b/src/funcs/statusGetHistoryItem.ts new file mode 100644 index 00000000..e2f3b99c --- /dev/null +++ b/src/funcs/statusGetHistoryItem.ts @@ -0,0 +1,229 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get Single History Item + * + * @remarks + * Get a single history item by id + */ +export function statusGetHistoryItem( + client: PlexAPICore, + request: operations.GetHistoryItemRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetHistoryItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetHistoryItemRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetHistoryItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetHistoryItemRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + historyId: encodeSimple("historyId", payload.historyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/status/sessions/history/{historyId}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getHistoryItem", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetHistoryItemResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetHistoryItemResponse$inboundSchema, { + hdrs: true, + key: "historyAll-get-responses-200", + }), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusListPlaybackHistory.ts b/src/funcs/statusListPlaybackHistory.ts new file mode 100644 index 00000000..af25ec09 --- /dev/null +++ b/src/funcs/statusListPlaybackHistory.ts @@ -0,0 +1,233 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * List Playback History + * + * @remarks + * List all playback history (Admin can see all users, others can only see their own). + * Pagination should be used on this endpoint. Additionally this endpoint supports `includeFields`, `excludeFields`, `includeElements`, and `excludeElements` parameters. + */ +export function statusListPlaybackHistory( + client: PlexAPICore, + request: operations.ListPlaybackHistoryRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ListPlaybackHistoryResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ListPlaybackHistoryRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ListPlaybackHistoryResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListPlaybackHistoryRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/status/sessions/history/all")(); + + const query = encodeFormQuery({ + "accountID": payload.accountID, + "librarySectionID": payload.librarySectionID, + "metadataItemID": payload.metadataItemID, + "sort": payload.sort, + "viewedAt": payload.viewedAt, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listPlaybackHistory", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ListPlaybackHistoryResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ListPlaybackHistoryResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusListSessions.ts b/src/funcs/statusListSessions.ts new file mode 100644 index 00000000..12140f6d --- /dev/null +++ b/src/funcs/statusListSessions.ts @@ -0,0 +1,153 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * List Sessions + * + * @remarks + * List all current playbacks on this server + */ +export function statusListSessions( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.ListSessionsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ListSessionsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/status/sessions")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listSessions", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ListSessionsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ListSessionsResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusTerminateSession.ts b/src/funcs/statusTerminateSession.ts new file mode 100644 index 00000000..40f70c85 --- /dev/null +++ b/src/funcs/statusTerminateSession.ts @@ -0,0 +1,225 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Terminate a session + * + * @remarks + * Terminate a playback session kicking off the user + */ +export function statusTerminateSession( + client: PlexAPICore, + request: operations.TerminateSessionRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.TerminateSessionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.TerminateSessionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.TerminateSessionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.TerminateSessionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/status/sessions/terminate")(); + + const query = encodeFormQuery({ + "reason": payload.reason, + "sessionId": payload.sessionId, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "terminateSession", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["401", "403", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.TerminateSessionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.TerminateSessionResponse$inboundSchema), + M.fail([401, 403, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/subscriptionsCancelGrab.ts b/src/funcs/subscriptionsCancelGrab.ts new file mode 100644 index 00000000..73588638 --- /dev/null +++ b/src/funcs/subscriptionsCancelGrab.ts @@ -0,0 +1,229 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Cancel an existing grab + * + * @remarks + * Cancels an existing media grab (recording). It can be used to resolve a conflict which exists for a rolling subscription. + * Note: This cancellation does not persist across a server restart, but neither does a rolling subscription itself. + */ +export function subscriptionsCancelGrab( + client: PlexAPICore, + request: operations.CancelGrabRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.CancelGrabResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.CancelGrabRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.CancelGrabResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CancelGrabRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + operationId: encodeSimple("operationId", payload.operationId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/media/grabbers/operations/{operationId}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "cancelGrab", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["403", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.CancelGrabResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.CancelGrabResponse$inboundSchema), + M.fail([403, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/subscriptionsCreateSubscription.ts b/src/funcs/subscriptionsCreateSubscription.ts new file mode 100644 index 00000000..bc6dfc27 --- /dev/null +++ b/src/funcs/subscriptionsCreateSubscription.ts @@ -0,0 +1,241 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { + encodeDeepObjectQuery, + encodeFormQuery, + encodeSimple, + queryJoin, +} from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Create a subscription + * + * @remarks + * Create a subscription. The query parameters should be mostly derived from the [template](#tag/Subscriptions/operation/mediaSubscriptionsGetTemplate) + */ +export function subscriptionsCreateSubscription( + client: PlexAPICore, + request: operations.CreateSubscriptionRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.CreateSubscriptionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.CreateSubscriptionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.CreateSubscriptionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CreateSubscriptionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/media/subscriptions")(); + + const query = queryJoin( + encodeDeepObjectQuery({ + "hints": payload.hints, + "params": payload.params, + "prefs": payload.prefs, + }), + encodeFormQuery({ + "targetLibrarySectionID": payload.targetLibrarySectionID, + "targetSectionLocationID": payload.targetSectionLocationID, + "type": payload.type, + }), + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "createSubscription", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "403", "409", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.CreateSubscriptionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.CreateSubscriptionResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail([400, 403, 409, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/subscriptionsDeleteSubscription.ts b/src/funcs/subscriptionsDeleteSubscription.ts new file mode 100644 index 00000000..9e24a978 --- /dev/null +++ b/src/funcs/subscriptionsDeleteSubscription.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Delete a subscription + * + * @remarks + * Delete a subscription, cancelling all of its grabs as well + */ +export function subscriptionsDeleteSubscription( + client: PlexAPICore, + request: operations.DeleteSubscriptionRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DeleteSubscriptionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.DeleteSubscriptionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DeleteSubscriptionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteSubscriptionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + subscriptionId: encodeSimple("subscriptionId", payload.subscriptionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/media/subscriptions/{subscriptionId}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deleteSubscription", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "403", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.DeleteSubscriptionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.DeleteSubscriptionResponse$inboundSchema), + M.fail([400, 403, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/subscriptionsEditSubscriptionPreferences.ts b/src/funcs/subscriptionsEditSubscriptionPreferences.ts new file mode 100644 index 00000000..29d0b856 --- /dev/null +++ b/src/funcs/subscriptionsEditSubscriptionPreferences.ts @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeDeepObjectQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Edit a subscription + * + * @remarks + * Edit a subscription's preferences + */ +export function subscriptionsEditSubscriptionPreferences( + client: PlexAPICore, + request: operations.EditSubscriptionPreferencesRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.EditSubscriptionPreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.EditSubscriptionPreferencesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.EditSubscriptionPreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.EditSubscriptionPreferencesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + subscriptionId: encodeSimple("subscriptionId", payload.subscriptionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/media/subscriptions/{subscriptionId}")(pathParams); + + const query = encodeDeepObjectQuery({ + "prefs": payload.prefs, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "editSubscriptionPreferences", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "403", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.EditSubscriptionPreferencesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.EditSubscriptionPreferencesResponse$inboundSchema, { + key: "MediaContainerWithSubscription", + }), + M.fail([400, 403, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/subscriptionsGetAllSubscriptions.ts b/src/funcs/subscriptionsGetAllSubscriptions.ts new file mode 100644 index 00000000..a3d2c38a --- /dev/null +++ b/src/funcs/subscriptionsGetAllSubscriptions.ts @@ -0,0 +1,229 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get all subscriptions + * + * @remarks + * Get all subscriptions and potentially the grabs too + */ +export function subscriptionsGetAllSubscriptions( + client: PlexAPICore, + request: operations.GetAllSubscriptionsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetAllSubscriptionsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetAllSubscriptionsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetAllSubscriptionsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetAllSubscriptionsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/media/subscriptions")(); + + const query = encodeFormQuery({ + "includeGrabs": payload.includeGrabs, + "includeStorage": payload.includeStorage, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getAllSubscriptions", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["403", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetAllSubscriptionsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetAllSubscriptionsResponse$inboundSchema, { + hdrs: true, + key: "MediaContainerWithSubscription", + }), + M.fail([403, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/subscriptionsGetScheduledRecordings.ts b/src/funcs/subscriptionsGetScheduledRecordings.ts new file mode 100644 index 00000000..623a5555 --- /dev/null +++ b/src/funcs/subscriptionsGetScheduledRecordings.ts @@ -0,0 +1,153 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get all scheduled recordings + * + * @remarks + * Get all scheduled recordings across all subscriptions + */ +export function subscriptionsGetScheduledRecordings( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetScheduledRecordingsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetScheduledRecordingsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/media/subscriptions/scheduled")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getScheduledRecordings", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["403", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetScheduledRecordingsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetScheduledRecordingsResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail([403, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/subscriptionsGetSubscription.ts b/src/funcs/subscriptionsGetSubscription.ts new file mode 100644 index 00000000..2e2b14a7 --- /dev/null +++ b/src/funcs/subscriptionsGetSubscription.ts @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get a single subscription + * + * @remarks + * Get a single subscription and potentially the grabs too + */ +export function subscriptionsGetSubscription( + client: PlexAPICore, + request: operations.GetSubscriptionRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetSubscriptionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetSubscriptionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetSubscriptionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetSubscriptionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + subscriptionId: encodeSimple("subscriptionId", payload.subscriptionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/media/subscriptions/{subscriptionId}")(pathParams); + + const query = encodeFormQuery({ + "includeGrabs": payload.includeGrabs, + "includeStorage": payload.includeStorage, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getSubscription", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "403", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetSubscriptionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetSubscriptionResponse$inboundSchema, { + key: "MediaContainerWithSubscription", + }), + M.fail([400, 403, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/subscriptionsGetTemplate.ts b/src/funcs/subscriptionsGetTemplate.ts new file mode 100644 index 00000000..67d64fba --- /dev/null +++ b/src/funcs/subscriptionsGetTemplate.ts @@ -0,0 +1,227 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get the subscription template + * + * @remarks + * Get the templates for a piece of media which could include fetching one airing, season, the whole show, etc. + */ +export function subscriptionsGetTemplate( + client: PlexAPICore, + request: operations.GetTemplateRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetTemplateResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetTemplateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetTemplateResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetTemplateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/media/subscriptions/template")(); + + const query = encodeFormQuery({ + "guid": payload.guid, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getTemplate", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["403", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetTemplateResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetTemplateResponse$inboundSchema, { + hdrs: true, + key: "object", + }), + M.fail([403, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/subscriptionsProcessSubscriptions.ts b/src/funcs/subscriptionsProcessSubscriptions.ts new file mode 100644 index 00000000..d7a578c6 --- /dev/null +++ b/src/funcs/subscriptionsProcessSubscriptions.ts @@ -0,0 +1,152 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Process all subscriptions + * + * @remarks + * Process all subscriptions asynchronously + */ +export function subscriptionsProcessSubscriptions( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.ProcessSubscriptionsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ProcessSubscriptionsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/media/subscriptions/process")(); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "processSubscriptions", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["403", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ProcessSubscriptionsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.ProcessSubscriptionsResponse$inboundSchema, { + hdrs: true, + }), + M.fail([403, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/subscriptionsReorderSubscription.ts b/src/funcs/subscriptionsReorderSubscription.ts new file mode 100644 index 00000000..79e198e4 --- /dev/null +++ b/src/funcs/subscriptionsReorderSubscription.ts @@ -0,0 +1,236 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Re-order a subscription + * + * @remarks + * Re-order a subscription to change its priority + */ +export function subscriptionsReorderSubscription( + client: PlexAPICore, + request: operations.ReorderSubscriptionRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ReorderSubscriptionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ReorderSubscriptionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ReorderSubscriptionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ReorderSubscriptionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + subscriptionId: encodeSimple("subscriptionId", payload.subscriptionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/media/subscriptions/{subscriptionId}/move")( + pathParams, + ); + + const query = encodeFormQuery({ + "after": payload.after, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "reorderSubscription", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "403", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ReorderSubscriptionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ReorderSubscriptionResponse$inboundSchema, { + key: "MediaContainerWithSubscription", + }), + M.fail([400, 403, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/timelineMarkPlayed.ts b/src/funcs/timelineMarkPlayed.ts new file mode 100644 index 00000000..042860ba --- /dev/null +++ b/src/funcs/timelineMarkPlayed.ts @@ -0,0 +1,227 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Mark an item as played + * + * @remarks + * Mark an item as played. Note, this does not create any view history of this item but rather just sets the state as played. The client must provide either the `key` or `uri` query parameter + * This API does respond to the GET verb but applications should use PUT + */ +export function timelineMarkPlayed( + client: PlexAPICore, + request: operations.MarkPlayedRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.MarkPlayedResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.MarkPlayedRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.MarkPlayedResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MarkPlayedRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/:/scrobble")(); + + const query = encodeFormQuery({ + "identifier": payload.identifier, + "key": payload.key, + "uri": payload.uri, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "markPlayed", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.MarkPlayedResponse$inboundSchema), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/timelineReport.ts b/src/funcs/timelineReport.ts new file mode 100644 index 00000000..0813551e --- /dev/null +++ b/src/funcs/timelineReport.ts @@ -0,0 +1,242 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Report media timeline + * + * @remarks + * This endpoint is hit during media playback for an item. It must be hit whenever the play state changes, or in the absence of a play state change, in a regular fashion (generally this means every 10 seconds on a LAN/WAN, and every 20 seconds over cellular). + */ +export function timelineReport( + client: PlexAPICore, + request: operations.ReportRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ReportResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.ReportRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ReportResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ReportRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/:/timeline")(); + + const query = encodeFormQuery({ + "bandwidth": payload.bandwidth, + "bufferedSize": payload.bufferedSize, + "bufferedTime": payload.bufferedTime, + "continuing": payload.continuing, + "duration": payload.duration, + "key": payload.key, + "offline": payload.offline, + "playQueueItemID": payload.playQueueItemID, + "ratingKey": payload.ratingKey, + "state": payload.state, + "time": payload.time, + "timeStalled": payload.timeStalled, + "timeToFirstFrame": payload.timeToFirstFrame, + "updated": payload.updated, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Session-Identifier": encodeSimple( + "X-Plex-Session-Identifier", + payload["X-Plex-Session-Identifier"], + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "report", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.ReportResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ReportResponse$inboundSchema, { key: "object" }), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/timelineUnscrobble.ts b/src/funcs/timelineUnscrobble.ts new file mode 100644 index 00000000..0f8b68d9 --- /dev/null +++ b/src/funcs/timelineUnscrobble.ts @@ -0,0 +1,227 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Mark an item as unplayed + * + * @remarks + * Mark an item as unplayed. The client must provide either the `key` or `uri` query parameter + * This API does respond to the GET verb but applications should use PUT + */ +export function timelineUnscrobble( + client: PlexAPICore, + request: operations.UnscrobbleRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.UnscrobbleResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.UnscrobbleRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.UnscrobbleResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UnscrobbleRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/:/unscrobble")(); + + const query = encodeFormQuery({ + "identifier": payload.identifier, + "key": payload.key, + "uri": payload.uri, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "unscrobble", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.UnscrobbleResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.UnscrobbleResponse$inboundSchema), + M.fail([400, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/transcoderMakeDecision.ts b/src/funcs/transcoderMakeDecision.ts new file mode 100644 index 00000000..11c56037 --- /dev/null +++ b/src/funcs/transcoderMakeDecision.ts @@ -0,0 +1,276 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Make a decision on media playback + * + * @remarks + * Make a decision on media playback based on client profile, and requested settings such as bandwidth and resolution. + */ +export function transcoderMakeDecision( + client: PlexAPICore, + request: operations.MakeDecisionRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.MakeDecisionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.MakeDecisionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.MakeDecisionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.MakeDecisionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + transcodeType: encodeSimple("transcodeType", payload.transcodeType, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/{transcodeType}/:/transcode/universal/decision")( + pathParams, + ); + + const query = encodeFormQuery({ + "advancedSubtitles": payload.advancedSubtitles, + "audioBoost": payload.audioBoost, + "audioChannelCount": payload.audioChannelCount, + "autoAdjustQuality": payload.autoAdjustQuality, + "autoAdjustSubtitle": payload.autoAdjustSubtitle, + "directPlay": payload.directPlay, + "directStream": payload.directStream, + "directStreamAudio": payload.directStreamAudio, + "disableResolutionRotation": payload.disableResolutionRotation, + "hasMDE": payload.hasMDE, + "location": payload.location, + "mediaBufferSize": payload.mediaBufferSize, + "mediaIndex": payload.mediaIndex, + "musicBitrate": payload.musicBitrate, + "offset": payload.offset, + "partIndex": payload.partIndex, + "path": payload.path, + "peakBitrate": payload.peakBitrate, + "photoResolution": payload.photoResolution, + "protocol": payload.protocol, + "secondsPerSegment": payload.secondsPerSegment, + "subtitles": payload.subtitles, + "subtitleSize": payload.subtitleSize, + "transcodeSessionId": payload.transcodeSessionId, + "videoBitrate": payload.videoBitrate, + "videoQuality": payload.videoQuality, + "videoResolution": payload.videoResolution, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Client-Profile-Extra": encodeSimple( + "X-Plex-Client-Profile-Extra", + payload["X-Plex-Client-Profile-Extra"], + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Client-Profile-Name": encodeSimple( + "X-Plex-Client-Profile-Name", + payload["X-Plex-Client-Profile-Name"], + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Session-Identifier": encodeSimple( + "X-Plex-Session-Identifier", + payload["X-Plex-Session-Identifier"], + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "makeDecision", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.MakeDecisionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.MakeDecisionResponse$inboundSchema, { + key: "MediaContainerWithDecision", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/transcoderStartTranscodeSession.ts b/src/funcs/transcoderStartTranscodeSession.ts new file mode 100644 index 00000000..19b9b242 --- /dev/null +++ b/src/funcs/transcoderStartTranscodeSession.ts @@ -0,0 +1,282 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Start A Transcoding Session + * + * @remarks + * Starts the transcoder and returns the corresponding streaming resource document. + */ +export function transcoderStartTranscodeSession( + client: PlexAPICore, + request: operations.StartTranscodeSessionRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.StartTranscodeSessionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.StartTranscodeSessionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.StartTranscodeSessionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.StartTranscodeSessionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + extension: encodeSimple("extension", payload.extension, { + explode: false, + charEncoding: "percent", + }), + transcodeType: encodeSimple("transcodeType", payload.transcodeType, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/{transcodeType}/:/transcode/universal/start.{extension}", + )(pathParams); + + const query = encodeFormQuery({ + "advancedSubtitles": payload.advancedSubtitles, + "audioBoost": payload.audioBoost, + "audioChannelCount": payload.audioChannelCount, + "autoAdjustQuality": payload.autoAdjustQuality, + "autoAdjustSubtitle": payload.autoAdjustSubtitle, + "directPlay": payload.directPlay, + "directStream": payload.directStream, + "directStreamAudio": payload.directStreamAudio, + "disableResolutionRotation": payload.disableResolutionRotation, + "hasMDE": payload.hasMDE, + "location": payload.location, + "mediaBufferSize": payload.mediaBufferSize, + "mediaIndex": payload.mediaIndex, + "musicBitrate": payload.musicBitrate, + "offset": payload.offset, + "partIndex": payload.partIndex, + "path": payload.path, + "peakBitrate": payload.peakBitrate, + "photoResolution": payload.photoResolution, + "protocol": payload.protocol, + "secondsPerSegment": payload.secondsPerSegment, + "subtitles": payload.subtitles, + "subtitleSize": payload.subtitleSize, + "transcodeSessionId": payload.transcodeSessionId, + "videoBitrate": payload.videoBitrate, + "videoQuality": payload.videoQuality, + "videoResolution": payload.videoResolution, + }); + + const headers = new Headers(compactMap({ + Accept: "video/x-matroska", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Client-Profile-Extra": encodeSimple( + "X-Plex-Client-Profile-Extra", + payload["X-Plex-Client-Profile-Extra"], + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Client-Profile-Name": encodeSimple( + "X-Plex-Client-Profile-Name", + payload["X-Plex-Client-Profile-Name"], + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Session-Identifier": encodeSimple( + "X-Plex-Session-Identifier", + payload["X-Plex-Session-Identifier"], + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "startTranscodeSession", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "403", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.StartTranscodeSessionResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.stream(200, operations.StartTranscodeSessionResponse$inboundSchema, { + ctype: "video/x-matroska", + key: "response-stream", + }), + M.fail([400, 403, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/transcoderTranscodeImage.ts b/src/funcs/transcoderTranscodeImage.ts new file mode 100644 index 00000000..887ed180 --- /dev/null +++ b/src/funcs/transcoderTranscodeImage.ts @@ -0,0 +1,259 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +export enum TranscodeImageAcceptEnum { + imageJpeg = "image/jpeg", + imagePng = "image/png", + imageXPortablePixmap = "image/x-portable-pixmap", +} + +/** + * Transcode an image + * + * @remarks + * Transcode an image, possibly changing format or size + */ +export function transcoderTranscodeImage( + client: PlexAPICore, + request: operations.TranscodeImageRequest, + options?: RequestOptions & { + acceptHeaderOverride?: TranscodeImageAcceptEnum; + }, +): APIPromise< + Result< + operations.TranscodeImageResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.TranscodeImageRequest, + options?: RequestOptions & { + acceptHeaderOverride?: TranscodeImageAcceptEnum; + }, +): Promise< + [ + Result< + operations.TranscodeImageResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.TranscodeImageRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/photo/:/transcode")(); + + const query = encodeFormQuery({ + "background": payload.background, + "blendColor": payload.blendColor, + "blur": payload.blur, + "chromaSubsampling": payload.chromaSubsampling, + "format": payload.format, + "height": payload.height, + "minSize": payload.minSize, + "opacity": payload.opacity, + "quality": payload.quality, + "rotate": payload.rotate, + "saturation": payload.saturation, + "upscale": payload.upscale, + "url": payload.url, + "width": payload.width, + }); + + const headers = new Headers(compactMap({ + Accept: options?.acceptHeaderOverride + || "image/jpeg;q=1, image/png;q=0.7, image/x-portable-pixmap;q=0", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "transcodeImage", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "403", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.TranscodeImageResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.stream(200, operations.TranscodeImageResponse$inboundSchema, { + ctype: "image/jpeg", + key: "200_image/jpeg_response-stream", + }), + M.stream(200, operations.TranscodeImageResponse$inboundSchema, { + ctype: "image/png", + key: "200_image/png_response-stream", + }), + M.stream(200, operations.TranscodeImageResponse$inboundSchema, { + ctype: "image/x-portable-pixmap", + key: "200_image/x-portable-pixmap_response-stream", + }), + M.fail([400, 403, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/transcoderTranscodeSubtitles.ts b/src/funcs/transcoderTranscodeSubtitles.ts new file mode 100644 index 00000000..1ea665e3 --- /dev/null +++ b/src/funcs/transcoderTranscodeSubtitles.ts @@ -0,0 +1,274 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Transcode subtitles + * + * @remarks + * Only transcode subtitle streams. + */ +export function transcoderTranscodeSubtitles( + client: PlexAPICore, + request: operations.TranscodeSubtitlesRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.TranscodeSubtitlesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.TranscodeSubtitlesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.TranscodeSubtitlesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.TranscodeSubtitlesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + transcodeType: encodeSimple("transcodeType", payload.transcodeType, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/{transcodeType}/:/transcode/universal/subtitles")( + pathParams, + ); + + const query = encodeFormQuery({ + "advancedSubtitles": payload.advancedSubtitles, + "audioBoost": payload.audioBoost, + "audioChannelCount": payload.audioChannelCount, + "autoAdjustQuality": payload.autoAdjustQuality, + "autoAdjustSubtitle": payload.autoAdjustSubtitle, + "directPlay": payload.directPlay, + "directStream": payload.directStream, + "directStreamAudio": payload.directStreamAudio, + "disableResolutionRotation": payload.disableResolutionRotation, + "hasMDE": payload.hasMDE, + "location": payload.location, + "mediaBufferSize": payload.mediaBufferSize, + "mediaIndex": payload.mediaIndex, + "musicBitrate": payload.musicBitrate, + "offset": payload.offset, + "partIndex": payload.partIndex, + "path": payload.path, + "peakBitrate": payload.peakBitrate, + "photoResolution": payload.photoResolution, + "protocol": payload.protocol, + "secondsPerSegment": payload.secondsPerSegment, + "subtitles": payload.subtitles, + "subtitleSize": payload.subtitleSize, + "transcodeSessionId": payload.transcodeSessionId, + "videoBitrate": payload.videoBitrate, + "videoQuality": payload.videoQuality, + "videoResolution": payload.videoResolution, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Client-Profile-Extra": encodeSimple( + "X-Plex-Client-Profile-Extra", + payload["X-Plex-Client-Profile-Extra"], + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Client-Profile-Name": encodeSimple( + "X-Plex-Client-Profile-Name", + payload["X-Plex-Client-Profile-Name"], + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Session-Identifier": encodeSimple( + "X-Plex-Session-Identifier", + payload["X-Plex-Session-Identifier"], + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "transcodeSubtitles", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "403", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.TranscodeSubtitlesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.TranscodeSubtitlesResponse$inboundSchema), + M.fail([400, 403, 404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/transcoderTriggerFallback.ts b/src/funcs/transcoderTriggerFallback.ts new file mode 100644 index 00000000..d468fa12 --- /dev/null +++ b/src/funcs/transcoderTriggerFallback.ts @@ -0,0 +1,233 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Manually trigger a transcoder fallback + * + * @remarks + * Manually trigger a transcoder fallback ex: HEVC to h.264 or hw to sw + */ +export function transcoderTriggerFallback( + client: PlexAPICore, + request: operations.TriggerFallbackRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.TriggerFallbackResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.TriggerFallbackRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.TriggerFallbackResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.TriggerFallbackRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + transcodeType: encodeSimple("transcodeType", payload.transcodeType, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/{transcodeType}/:/transcode/universal/fallback")( + pathParams, + ); + + const query = encodeFormQuery({ + "transcodeSessionId": payload.transcodeSessionId, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "triggerFallback", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "412", "4XX", "500", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.TriggerFallbackResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.TriggerFallbackResponse$inboundSchema), + M.fail([404, 412, "4XX"]), + M.fail([500, "5XX"]), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ultraBlurGetColors.ts b/src/funcs/ultraBlurGetColors.ts new file mode 100644 index 00000000..b5a0b317 --- /dev/null +++ b/src/funcs/ultraBlurGetColors.ts @@ -0,0 +1,224 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get UltraBlur Colors + * + * @remarks + * Retrieves the four colors extracted from an image for clients to use to generate an ultrablur image. + */ +export function ultraBlurGetColors( + client: PlexAPICore, + request: operations.GetColorsRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetColorsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetColorsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetColorsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetColorsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/services/ultrablur/colors")(); + + const query = encodeFormQuery({ + "url": payload.url, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getColors", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "500", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetColorsResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetColorsResponse$inboundSchema, { key: "object" }), + M.fail([404, "4XX"]), + M.fail([500, "5XX"]), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ultraBlurGetImage.ts b/src/funcs/ultraBlurGetImage.ts new file mode 100644 index 00000000..123ee91d --- /dev/null +++ b/src/funcs/ultraBlurGetImage.ts @@ -0,0 +1,233 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get UltraBlur Image + * + * @remarks + * Retrieves a server-side generated UltraBlur image based on the provided color inputs. Clients should always call this via the photo transcoder endpoint. + */ +export function ultraBlurGetImage( + client: PlexAPICore, + request: operations.GetImageRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetImageResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.GetImageRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetImageResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetImageRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/services/ultrablur/image")(); + + const query = encodeFormQuery({ + "bottomLeft": payload.bottomLeft, + "bottomRight": payload.bottomRight, + "height": payload.height, + "noise": payload.noise, + "topLeft": payload.topLeft, + "topRight": payload.topRight, + "width": payload.width, + }); + + const headers = new Headers(compactMap({ + Accept: "image/png", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getImage", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetImageResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.stream(200, operations.GetImageResponse$inboundSchema, { + ctype: "image/png", + key: "response-stream", + }), + M.fail([400, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/updaterApplyUpdates.ts b/src/funcs/updaterApplyUpdates.ts index f342af39..284cea56 100644 --- a/src/funcs/updaterApplyUpdates.ts +++ b/src/funcs/updaterApplyUpdates.ts @@ -3,7 +3,7 @@ */ import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -17,7 +17,6 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; import { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -26,21 +25,18 @@ import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** - * Apply Updates + * Applying 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 + * Apply any downloaded updates. Note that the two parameters `tonight` and `skip` are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed. */ export function updaterApplyUpdates( client: PlexAPICore, - tonight?: operations.Tonight | undefined, - skip?: operations.Skip | undefined, + request: operations.ApplyUpdatesRequest, options?: RequestOptions, ): APIPromise< Result< operations.ApplyUpdatesResponse, - | errors.ApplyUpdatesBadRequest - | errors.ApplyUpdatesUnauthorized | PlexAPIError | ResponseValidationError | ConnectionError @@ -53,23 +49,19 @@ export function updaterApplyUpdates( > { return new APIPromise($do( client, - tonight, - skip, + request, options, )); } async function $do( client: PlexAPICore, - tonight?: operations.Tonight | undefined, - skip?: operations.Skip | undefined, + request: operations.ApplyUpdatesRequest, options?: RequestOptions, ): Promise< [ Result< operations.ApplyUpdatesResponse, - | errors.ApplyUpdatesBadRequest - | errors.ApplyUpdatesUnauthorized | PlexAPIError | ResponseValidationError | ConnectionError @@ -82,13 +74,8 @@ async function $do( APICall, ] > { - const input: operations.ApplyUpdatesRequest = { - tonight: tonight, - skip: skip, - }; - const parsed = safeParse( - input, + request, (value) => operations.ApplyUpdatesRequest$outboundSchema.parse(value), "Input validation failed", ); @@ -106,22 +93,74 @@ async function $do( }); const headers = new Headers(compactMap({ - Accept: "application/json", + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), })); - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "applyUpdates", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, - securitySource: client._options.accessToken, + securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" }, @@ -146,7 +185,7 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["400", "401", "4XX", "500", "5XX"], + errorCodes: ["400", "4XX", "500", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -165,8 +204,6 @@ async function $do( const [result] = await M.match< operations.ApplyUpdatesResponse, - | errors.ApplyUpdatesBadRequest - | errors.ApplyUpdatesUnauthorized | PlexAPIError | ResponseValidationError | ConnectionError @@ -177,9 +214,7 @@ async function $do( | SDKValidationError >( M.nil(200, operations.ApplyUpdatesResponse$inboundSchema), - M.jsonErr(400, errors.ApplyUpdatesBadRequest$inboundSchema), - M.jsonErr(401, errors.ApplyUpdatesUnauthorized$inboundSchema), - M.fail("4XX"), + M.fail([400, "4XX"]), M.fail([500, "5XX"]), )(response, req, { extraFields: responseFields }); if (!result.ok) { diff --git a/src/funcs/updaterCheckForUpdates.ts b/src/funcs/updaterCheckForUpdates.ts deleted file mode 100644 index 4342ce8d..00000000 --- a/src/funcs/updaterCheckForUpdates.ts +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Checking for updates - * - * @remarks - * Checking for updates - */ -export function updaterCheckForUpdates( - client: PlexAPICore, - download?: operations.Download | undefined, - options?: RequestOptions, -): APIPromise< - Result< - operations.CheckForUpdatesResponse, - | errors.CheckForUpdatesBadRequest - | errors.CheckForUpdatesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - download, - options, - )); -} - -async function $do( - client: PlexAPICore, - download?: operations.Download | undefined, - options?: RequestOptions, -): Promise< - [ - Result< - operations.CheckForUpdatesResponse, - | errors.CheckForUpdatesBadRequest - | errors.CheckForUpdatesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const input: operations.CheckForUpdatesRequest = { - download: download, - }; - - const parsed = safeParse( - input, - (value) => operations.CheckForUpdatesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/updater/check")(); - - const query = encodeFormQuery({ - "download": payload.download, - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "checkForUpdates", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PUT", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.CheckForUpdatesBadRequest - | errors.CheckForUpdatesUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.CheckForUpdatesResponse$inboundSchema), - M.jsonErr(400, errors.CheckForUpdatesBadRequest$inboundSchema), - M.jsonErr(401, errors.CheckForUpdatesUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/updaterCheckUpdates.ts b/src/funcs/updaterCheckUpdates.ts new file mode 100644 index 00000000..759baf94 --- /dev/null +++ b/src/funcs/updaterCheckUpdates.ts @@ -0,0 +1,224 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Checking for updates + * + * @remarks + * Perform an update check and potentially download + */ +export function updaterCheckUpdates( + client: PlexAPICore, + request: operations.CheckUpdatesRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.CheckUpdatesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: PlexAPICore, + request: operations.CheckUpdatesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.CheckUpdatesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CheckUpdatesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/updater/check")(); + + const query = encodeFormQuery({ + "download": payload.download, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + "X-Plex-Client-Identifier": encodeSimple( + "X-Plex-Client-Identifier", + payload["X-Plex-Client-Identifier"] + ?? client._options.xPlexClientIdentifier, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device": encodeSimple( + "X-Plex-Device", + payload["X-Plex-Device"] ?? client._options.xPlexDevice, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Name": encodeSimple( + "X-Plex-Device-Name", + payload["X-Plex-Device-Name"] ?? client._options.xPlexDeviceName, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Device-Vendor": encodeSimple( + "X-Plex-Device-Vendor", + payload["X-Plex-Device-Vendor"] ?? client._options.xPlexDeviceVendor, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Marketplace": encodeSimple( + "X-Plex-Marketplace", + payload["X-Plex-Marketplace"] ?? client._options.xPlexMarketplace, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Model": encodeSimple( + "X-Plex-Model", + payload["X-Plex-Model"] ?? client._options.xPlexModel, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform": encodeSimple( + "X-Plex-Platform", + payload["X-Plex-Platform"] ?? client._options.xPlexPlatform, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Platform-Version": encodeSimple( + "X-Plex-Platform-Version", + payload["X-Plex-Platform-Version"] + ?? client._options.xPlexPlatformVersion, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Product": encodeSimple( + "X-Plex-Product", + payload["X-Plex-Product"] ?? client._options.xPlexProduct, + { explode: false, charEncoding: "none" }, + ), + "X-Plex-Version": encodeSimple( + "X-Plex-Version", + payload["X-Plex-Version"] ?? client._options.xPlexVersion, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "checkUpdates", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.CheckUpdatesResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, operations.CheckUpdatesResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/updaterGetUpdateStatus.ts b/src/funcs/updaterGetUpdateStatus.ts deleted file mode 100644 index e00b33c1..00000000 --- a/src/funcs/updaterGetUpdateStatus.ts +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Querying status of updates - * - * @remarks - * Querying status of updates - */ -export function updaterGetUpdateStatus( - client: PlexAPICore, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetUpdateStatusResponse, - | errors.GetUpdateStatusBadRequest - | errors.GetUpdateStatusUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - options, - )); -} - -async function $do( - client: PlexAPICore, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetUpdateStatusResponse, - | errors.GetUpdateStatusBadRequest - | errors.GetUpdateStatusUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const path = pathToFunc("/updater/status")(); - - const headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getUpdateStatus", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetUpdateStatusBadRequest - | errors.GetUpdateStatusUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetUpdateStatusResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetUpdateStatusBadRequest$inboundSchema), - M.jsonErr(401, errors.GetUpdateStatusUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/updaterGetUpdatesStatus.ts b/src/funcs/updaterGetUpdatesStatus.ts new file mode 100644 index 00000000..35dbbcc3 --- /dev/null +++ b/src/funcs/updaterGetUpdatesStatus.ts @@ -0,0 +1,152 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Querying status of updates + * + * @remarks + * Get the status of updating the server + */ +export function updaterGetUpdatesStatus( + client: PlexAPICore, + options?: RequestOptions, +): APIPromise< + Result< + operations.GetUpdatesStatusResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: PlexAPICore, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetUpdatesStatusResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/updater/status")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getUpdatesStatus", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + 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.GetUpdatesStatusResponse, + | PlexAPIError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.GetUpdatesStatusResponse$inboundSchema, { + key: "object", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/usersGetUsers.ts b/src/funcs/usersGetUsers.ts deleted file mode 100644 index a0ad3c7f..00000000 --- a/src/funcs/usersGetUsers.ts +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import { GetUsersServerList } from "../sdk/models/operations/getusers.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get list of all connected users - * - * @remarks - * Get list of all users that are friends and have library access with the provided Plex authentication token - */ -export function usersGetUsers( - client: PlexAPICore, - request: operations.GetUsersRequest, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetUsersResponse, - | errors.GetUsersBadRequest - | errors.GetUsersUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: PlexAPICore, - request: operations.GetUsersRequest, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetUsersResponse, - | errors.GetUsersBadRequest - | errors.GetUsersUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetUsersRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const baseURL = options?.serverURL - || pathToFunc(GetUsersServerList[0], { charEncoding: "percent" })(); - - const path = pathToFunc("/users")(); - - const headers = new Headers(compactMap({ - Accept: "application/xml", - "X-Plex-Features": encodeSimple("X-Plex-Features", payload.ClientFeatures, { - explode: false, - charEncoding: "none", - }), - "X-Plex-Client-Identifier": encodeSimple( - "X-Plex-Client-Identifier", - payload.ClientID, - { explode: false, charEncoding: "none" }, - ), - "X-Plex-Product": encodeSimple("X-Plex-Product", payload.ClientName, { - explode: false, - charEncoding: "none", - }), - "X-Plex-Version": encodeSimple("X-Plex-Version", payload.ClientVersion, { - explode: false, - charEncoding: "none", - }), - "X-Plex-Device-Name": encodeSimple( - "X-Plex-Device-Name", - payload.DeviceName, - { explode: false, charEncoding: "none" }, - ), - "X-Plex-Device": encodeSimple("X-Plex-Device", payload.DeviceNickname, { - explode: false, - charEncoding: "none", - }), - "X-Plex-Device-Screen-Resolution": encodeSimple( - "X-Plex-Device-Screen-Resolution", - payload.DeviceScreenResolution, - { explode: false, charEncoding: "none" }, - ), - "X-Plex-Model": encodeSimple("X-Plex-Model", payload.Model, { - explode: false, - charEncoding: "none", - }), - "X-Plex-Platform": encodeSimple("X-Plex-Platform", payload.Platform, { - explode: false, - charEncoding: "none", - }), - "X-Plex-Platform-Version": encodeSimple( - "X-Plex-Platform-Version", - payload.PlatformVersion, - { explode: false, charEncoding: "none" }, - ), - "X-Plex-Language": encodeSimple( - "X-Plex-Language", - payload["X-Plex-Language"], - { explode: false, charEncoding: "none" }, - ), - "X-Plex-Session-Id": encodeSimple( - "X-Plex-Session-Id", - payload["X-Plex-Session-Id"], - { explode: false, charEncoding: "none" }, - ), - "X-Plex-Token": encodeSimple("X-Plex-Token", payload["X-Plex-Token"], { - explode: false, - charEncoding: "none", - }), - })); - - const context = { - options: client._options, - baseURL: baseURL ?? "", - operationID: "get-users", - oAuth2Scopes: [], - - resolvedSecurity: null, - - securitySource: null, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - method: "GET", - baseURL: baseURL, - path: path, - headers: headers, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetUsersResponse, - | errors.GetUsersBadRequest - | errors.GetUsersUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.bytes(200, operations.GetUsersResponse$inboundSchema, { - ctype: "application/xml", - key: "Body", - }), - M.jsonErr(400, errors.GetUsersBadRequest$inboundSchema), - M.jsonErr(401, errors.GetUsersUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/videoGetTimeline.ts b/src/funcs/videoGetTimeline.ts deleted file mode 100644 index d8e24b74..00000000 --- a/src/funcs/videoGetTimeline.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get the timeline for a media item - * - * @remarks - * Get the timeline for a media item - */ -export function videoGetTimeline( - client: PlexAPICore, - request: operations.GetTimelineRequest, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetTimelineResponse, - | errors.GetTimelineBadRequest - | errors.GetTimelineUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: PlexAPICore, - request: operations.GetTimelineRequest, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetTimelineResponse, - | errors.GetTimelineBadRequest - | errors.GetTimelineUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetTimelineRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - 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 headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getTimeline", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetTimelineBadRequest - | errors.GetTimelineUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.GetTimelineResponse$inboundSchema), - M.jsonErr(400, errors.GetTimelineBadRequest$inboundSchema), - M.jsonErr(401, errors.GetTimelineUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/videoStartUniversalTranscode.ts b/src/funcs/videoStartUniversalTranscode.ts deleted file mode 100644 index 071e8fe9..00000000 --- a/src/funcs/videoStartUniversalTranscode.ts +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Start Universal Transcode - * - * @remarks - * Begin a Universal Transcode Session - */ -export function videoStartUniversalTranscode( - client: PlexAPICore, - request: operations.StartUniversalTranscodeRequest, - options?: RequestOptions, -): APIPromise< - Result< - operations.StartUniversalTranscodeResponse, - | errors.StartUniversalTranscodeBadRequest - | errors.StartUniversalTranscodeUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: PlexAPICore, - request: operations.StartUniversalTranscodeRequest, - options?: RequestOptions, -): Promise< - [ - Result< - operations.StartUniversalTranscodeResponse, - | errors.StartUniversalTranscodeBadRequest - | errors.StartUniversalTranscodeUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => - operations.StartUniversalTranscodeRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - 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 headers = new Headers(compactMap({ - Accept: "application/json", - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "startUniversalTranscode", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.StartUniversalTranscodeBadRequest - | errors.StartUniversalTranscodeUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.nil(200, operations.StartUniversalTranscodeResponse$inboundSchema), - M.jsonErr(400, errors.StartUniversalTranscodeBadRequest$inboundSchema), - M.jsonErr(401, errors.StartUniversalTranscodeUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/funcs/watchlistGetWatchList.ts b/src/funcs/watchlistGetWatchList.ts deleted file mode 100644 index 06ba13eb..00000000 --- a/src/funcs/watchlistGetWatchList.ts +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { compactMap } from "../lib/primitives.js"; -import { safeParse } 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 { PlexAPIError } from "../sdk/models/errors/plexapierror.js"; -import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import { GetWatchListServerList } from "../sdk/models/operations/getwatchlist.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { APICall, APIPromise } from "../sdk/types/async.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get User Watchlist - * - * @remarks - * Get User Watchlist - */ -export function watchlistGetWatchList( - client: PlexAPICore, - request: operations.GetWatchListRequest, - options?: RequestOptions, -): APIPromise< - Result< - operations.GetWatchListResponse, - | errors.GetWatchListBadRequest - | errors.GetWatchListUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - > -> { - return new APIPromise($do( - client, - request, - options, - )); -} - -async function $do( - client: PlexAPICore, - request: operations.GetWatchListRequest, - options?: RequestOptions, -): Promise< - [ - Result< - operations.GetWatchListResponse, - | errors.GetWatchListBadRequest - | errors.GetWatchListUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >, - APICall, - ] -> { - const parsed = safeParse( - request, - (value) => operations.GetWatchListRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return [parsed, { status: "invalid" }]; - } - const payload = parsed.value; - const body = null; - - const baseURL = options?.serverURL - || pathToFunc(GetWatchListServerList[0], { charEncoding: "percent" })(); - - const pathParams = { - filter: encodeSimple("filter", payload.filter, { - explode: false, - charEncoding: "percent", - }), - }; - - 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"], - }); - - const headers = new Headers(compactMap({ - Accept: "application/json", - "X-Plex-Token": encodeSimple("X-Plex-Token", payload["X-Plex-Token"], { - explode: false, - charEncoding: "none", - }), - })); - - const secConfig = await extractSecurity(client._options.accessToken); - const securityInput = secConfig == null ? {} : { accessToken: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - options: client._options, - baseURL: baseURL ?? "", - operationID: "get-watch-list", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.accessToken, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: baseURL, - path: path, - headers: headers, - query: query, - body: body, - userAgent: client._options.userAgent, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; - } - 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.GetWatchListBadRequest - | errors.GetWatchListUnauthorized - | PlexAPIError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError - >( - M.json(200, operations.GetWatchListResponse$inboundSchema, { - key: "object", - }), - M.jsonErr(400, errors.GetWatchListBadRequest$inboundSchema), - M.jsonErr(401, errors.GetWatchListUnauthorized$inboundSchema), - M.fail("4XX"), - M.fail("5XX"), - )(response, req, { extraFields: responseFields }); - if (!result.ok) { - return [result, { status: "complete", request: req, response }]; - } - - return [result, { status: "complete", request: req, response }]; -} diff --git a/src/lib/config.ts b/src/lib/config.ts index 944fec64..298936e3 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -2,7 +2,6 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../sdk/types/enums.js"; import { HTTPClient } from "./http.js"; import { Logger } from "./logger.js"; import { RetryConfig } from "./retries.js"; @@ -12,26 +11,63 @@ 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}", + "https://{IP-description}.{identifier}.plex.direct:{port}", + "{protocol}://{host}:{port}", + "https://{server_url}", ] as const; -/** - * The protocol to use for the server connection - */ -export const ServerProtocol = { - Http: "http", - Https: "https", -} as const; -/** - * The protocol to use for the server connection - */ -export type ServerProtocol = ClosedEnum; - export type SDKOptions = { - accessToken?: string | (() => Promise) | undefined; + apiKey?: string | (() => Promise) | undefined; + + /** + * Allows setting the xPlexClientIdentifier parameter for all supported operations + */ + xPlexClientIdentifier?: string | undefined; + + /** + * Allows setting the xPlexProduct parameter for all supported operations + */ + xPlexProduct?: string | undefined; + + /** + * Allows setting the xPlexVersion parameter for all supported operations + */ + xPlexVersion?: string | undefined; + + /** + * Allows setting the xPlexPlatform parameter for all supported operations + */ + xPlexPlatform?: string | undefined; + + /** + * Allows setting the xPlexPlatformVersion parameter for all supported operations + */ + xPlexPlatformVersion?: string | undefined; + + /** + * Allows setting the xPlexDevice parameter for all supported operations + */ + xPlexDevice?: string | undefined; + + /** + * Allows setting the xPlexModel parameter for all supported operations + */ + xPlexModel?: string | undefined; + + /** + * Allows setting the xPlexDeviceVendor parameter for all supported operations + */ + xPlexDeviceVendor?: string | undefined; + + /** + * Allows setting the xPlexDeviceName parameter for all supported operations + */ + xPlexDeviceName?: string | undefined; + + /** + * Allows setting the xPlexMarketplace parameter for all supported operations + */ + xPlexMarketplace?: string | undefined; httpClient?: HTTPClient; /** @@ -39,17 +75,29 @@ export type SDKOptions = { */ serverIdx?: number | undefined; /** - * Sets the protocol variable for url substitution + * Sets the identifier variable for url substitution */ - protocol?: ServerProtocol | undefined; + identifier?: string | undefined; /** - * Sets the ip variable for url substitution + * Sets the IP-description variable for url substitution */ - ip?: string | undefined; + ipDescription?: string | undefined; /** * Sets the port variable for url substitution */ port?: string | undefined; + /** + * Sets the protocol variable for url substitution + */ + protocol?: string | undefined; + /** + * Sets the host variable for url substitution + */ + host?: string | undefined; + /** + * Sets the server_url variable for url substitution + */ + serverUrl?: string | undefined; /** * Allows overriding the default server URL used by the SDK */ @@ -71,10 +119,18 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { const serverParams: Params[] = [ { - "protocol": options.protocol ?? "https", - "ip": options.ip ?? "10.10.10.47", + "identifier": options.identifier ?? "0123456789abcdef0123456789abcdef", + "IP-description": options.ipDescription ?? "1-2-3-4", "port": options.port ?? "32400", }, + { + "protocol": options.protocol ?? "http", + "host": options.host ?? "localhost", + "port": options.port ?? "32400", + }, + { + "server_url": options.serverUrl ?? "http://localhost:32400", + }, ]; let params: Params = {}; @@ -93,8 +149,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", - openapiDocVersion: "0.0.3", - sdkVersion: "0.40.3", - genVersion: "2.698.4", - userAgent: "speakeasy-sdk/typescript 0.40.3 2.698.4 0.0.3 @lukehagar/plexjs", + openapiDocVersion: "1.1.1", + sdkVersion: "0.41.0", + genVersion: "2.723.11", + userAgent: "speakeasy-sdk/typescript 0.41.0 2.723.11 1.1.1 @lukehagar/plexjs", } as const; diff --git a/src/lib/security.ts b/src/lib/security.ts index a9478209..35f7e4f8 100644 --- a/src/lib/security.ts +++ b/src/lib/security.ts @@ -246,7 +246,7 @@ export function resolveGlobalSecurity( { fieldName: "X-Plex-Token", type: "apiKey:header", - value: security?.accessToken, + value: security?.apiKey, }, ], ); diff --git a/src/lib/url.ts b/src/lib/url.ts index 6bc6356e..f3a8de6c 100644 --- a/src/lib/url.ts +++ b/src/lib/url.ts @@ -10,7 +10,7 @@ export function pathToFunc( pathPattern: string, options?: { charEncoding?: "percent" | "none" }, ): (params?: Params) => string { - const paramRE = /\{([a-zA-Z0-9_]+?)\}/g; + const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g; return function buildURLPath(params: Record = {}): string { return pathPattern.replace(paramRE, function (_, placeholder) { diff --git a/src/sdk/activities.ts b/src/sdk/activities.ts index d9d0d5c2..52ef1500 100644 --- a/src/sdk/activities.ts +++ b/src/sdk/activities.ts @@ -2,41 +2,41 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { activitiesCancelServerActivities } from "../funcs/activitiesCancelServerActivities.js"; -import { activitiesGetServerActivities } from "../funcs/activitiesGetServerActivities.js"; +import { activitiesCancelActivity } from "../funcs/activitiesCancelActivity.js"; +import { activitiesListActivities } from "../funcs/activitiesListActivities.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Activities extends ClientSDK { /** - * Get Server Activities + * Get all activities * * @remarks - * Get Server Activities + * List all activities on the server. Admins can see all activities but other users can only see their own */ - async getServerActivities( + async listActivities( options?: RequestOptions, - ): Promise { - return unwrapAsync(activitiesGetServerActivities( + ): Promise { + return unwrapAsync(activitiesListActivities( this, options, )); } /** - * Cancel Server Activities + * Cancel a running activity * * @remarks - * Cancel Server Activities + * Cancel a running activity. Admins can cancel all activities but other users can only cancel their own */ - async cancelServerActivities( - activityUUID: string, + async cancelActivity( + request: operations.CancelActivityRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(activitiesCancelServerActivities( + ): Promise { + return unwrapAsync(activitiesCancelActivity( this, - activityUUID, + request, options, )); } diff --git a/src/sdk/authentication.ts b/src/sdk/authentication.ts deleted file mode 100644 index 22c45abf..00000000 --- a/src/sdk/authentication.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { authenticationGetSourceConnectionInformation } from "../funcs/authenticationGetSourceConnectionInformation.js"; -import { authenticationGetTokenDetails } from "../funcs/authenticationGetTokenDetails.js"; -import { authenticationGetTransientToken } from "../funcs/authenticationGetTransientToken.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 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 Token Details - * - * @remarks - * Get the User data from the provided X-Plex-Token - */ - async getTokenDetails( - options?: RequestOptions, - ): 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( - request: operations.PostUsersSignInDataRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(authenticationPostUsersSignInData( - this, - request, - options, - )); - } -} diff --git a/src/sdk/butler.ts b/src/sdk/butler.ts index 03cda4cd..4144a2e3 100644 --- a/src/sdk/butler.ts +++ b/src/sdk/butler.ts @@ -2,26 +2,41 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { butlerGetButlerTasks } from "../funcs/butlerGetButlerTasks.js"; -import { butlerStartAllTasks } from "../funcs/butlerStartAllTasks.js"; +import { butlerGetTasks } from "../funcs/butlerGetTasks.js"; import { butlerStartTask } from "../funcs/butlerStartTask.js"; -import { butlerStopAllTasks } from "../funcs/butlerStopAllTasks.js"; +import { butlerStartTasks } from "../funcs/butlerStartTasks.js"; import { butlerStopTask } from "../funcs/butlerStopTask.js"; +import { butlerStopTasks } from "../funcs/butlerStopTasks.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Butler extends ClientSDK { /** - * Get Butler tasks + * Stop all Butler tasks * * @remarks - * Returns a list of butler tasks + * This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. */ - async getButlerTasks( + async stopTasks( options?: RequestOptions, - ): Promise { - return unwrapAsync(butlerGetButlerTasks( + ): Promise { + return unwrapAsync(butlerStopTasks( + this, + options, + )); + } + + /** + * Get all Butler tasks + * + * @remarks + * Get the list of butler tasks and their scheduling + */ + async getTasks( + options?: RequestOptions, + ): Promise { + return unwrapAsync(butlerGetTasks( this, options, )); @@ -32,69 +47,51 @@ export class Butler extends ClientSDK { * * @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. + * 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 stopAllTasks( + async startTasks( options?: RequestOptions, - ): Promise { - return unwrapAsync(butlerStopAllTasks( + ): Promise { + return unwrapAsync(butlerStartTasks( 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.TaskNameOpen, - 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. + * This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists */ async stopTask( - taskName: operations.PathParamTaskNameOpen, + request: operations.StopTaskRequest, options?: RequestOptions, ): Promise { return unwrapAsync(butlerStopTask( this, - taskName, + request, + options, + )); + } + + /** + * Start a single Butler task + * + * @remarks + * This endpoint will attempt to start a specific Butler task by name. + */ + async startTask( + request: operations.StartTaskRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(butlerStartTask( + this, + request, options, )); } diff --git a/src/sdk/collections.ts b/src/sdk/collections.ts new file mode 100644 index 00000000..32beea8e --- /dev/null +++ b/src/sdk/collections.ts @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { collectionsCreateCollection } from "../funcs/collectionsCreateCollection.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class Collections extends ClientSDK { + /** + * Create collection + * + * @remarks + * Create a collection in the library + */ + async createCollection( + request: operations.CreateCollectionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(collectionsCreateCollection( + this, + request, + options, + )); + } +} diff --git a/src/sdk/content.ts b/src/sdk/content.ts new file mode 100644 index 00000000..63bc399c --- /dev/null +++ b/src/sdk/content.ts @@ -0,0 +1,243 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { contentGetAlbums } from "../funcs/contentGetAlbums.js"; +import { contentGetAllLeaves } from "../funcs/contentGetAllLeaves.js"; +import { contentGetArts } from "../funcs/contentGetArts.js"; +import { contentGetCategories } from "../funcs/contentGetCategories.js"; +import { contentGetCluster } from "../funcs/contentGetCluster.js"; +import { contentGetCollectionImage } from "../funcs/contentGetCollectionImage.js"; +import { contentGetCollectionItems } from "../funcs/contentGetCollectionItems.js"; +import { contentGetFolders } from "../funcs/contentGetFolders.js"; +import { contentGetMetadataItem } from "../funcs/contentGetMetadataItem.js"; +import { contentGetSonicallySimilar } from "../funcs/contentGetSonicallySimilar.js"; +import { contentGetSonicPath } from "../funcs/contentGetSonicPath.js"; +import { contentListContent } from "../funcs/contentListContent.js"; +import { contentListMoments } from "../funcs/contentListMoments.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class Content extends ClientSDK { + /** + * Get items in a collection + * + * @remarks + * Get items in a collection. Note if this collection contains more than 100 items, paging must be used. + */ + async getCollectionItems( + request: operations.GetCollectionItemsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(contentGetCollectionItems( + this, + request, + options, + )); + } + + /** + * Get a metadata item + * + * @remarks + * Get one or more metadata items. + */ + async getMetadataItem( + request: operations.GetMetadataItemRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(contentGetMetadataItem( + this, + request, + options, + )); + } + + /** + * Set section albums + * + * @remarks + * Get all albums in a music section + */ + async getAlbums( + request: operations.GetAlbumsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(contentGetAlbums( + this, + request, + options, + )); + } + + /** + * Get items in the section + * + * @remarks + * Get the items in a section, potentially filtering them + */ + async listContent( + request: operations.ListContentRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(contentListContent( + this, + request, + options, + )); + } + + /** + * Set section leaves + * + * @remarks + * Get all leaves in a section (such as episodes in a show section) + */ + async getAllLeaves( + request: operations.GetAllLeavesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(contentGetAllLeaves( + this, + request, + options, + )); + } + + /** + * Set section artwork + * + * @remarks + * Get artwork for a library section + */ + async getArts( + request: operations.GetArtsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(contentGetArts( + this, + request, + options, + )); + } + + /** + * Set section categories + * + * @remarks + * Get categories in a library section + */ + async getCategories( + request: operations.GetCategoriesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(contentGetCategories( + this, + request, + options, + )); + } + + /** + * Set section clusters + * + * @remarks + * Get clusters in a library section (typically for photos) + */ + async getCluster( + request: operations.GetClusterRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(contentGetCluster( + this, + request, + options, + )); + } + + /** + * Similar tracks to transition from one to another + * + * @remarks + * Get a list of audio tracks starting at one and ending at another which are similar across the path + */ + async getSonicPath( + request: operations.GetSonicPathRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(contentGetSonicPath( + this, + request, + options, + )); + } + + /** + * Get all folder locations + * + * @remarks + * Get all folder locations of the media in a section + */ + async getFolders( + request: operations.GetFoldersRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(contentGetFolders( + this, + request, + options, + )); + } + + /** + * Set section moments + * + * @remarks + * Get moments in a library section (typically for photos) + */ + async listMoments( + request: operations.ListMomentsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(contentListMoments( + this, + request, + options, + )); + } + + /** + * The nearest audio tracks + * + * @remarks + * Get the nearest audio tracks to a particular analysis + */ + async getSonicallySimilar( + request: operations.GetSonicallySimilarRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(contentGetSonicallySimilar( + this, + request, + options, + )); + } + + /** + * Get a collection's image + * + * @remarks + * Get an image for the collection based on the items within + */ + async getCollectionImage( + request: operations.GetCollectionImageRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(contentGetCollectionImage( + this, + request, + options, + )); + } +} diff --git a/src/sdk/devices.ts b/src/sdk/devices.ts new file mode 100644 index 00000000..fa7a2d14 --- /dev/null +++ b/src/sdk/devices.ts @@ -0,0 +1,239 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { devicesAddDevice } from "../funcs/devicesAddDevice.js"; +import { devicesDiscoverDevices } from "../funcs/devicesDiscoverDevices.js"; +import { devicesGetAvailableGrabbers } from "../funcs/devicesGetAvailableGrabbers.js"; +import { devicesGetDeviceDetails } from "../funcs/devicesGetDeviceDetails.js"; +import { devicesGetDevicesChannels } from "../funcs/devicesGetDevicesChannels.js"; +import { devicesGetThumb } from "../funcs/devicesGetThumb.js"; +import { devicesListDevices } from "../funcs/devicesListDevices.js"; +import { devicesModifyDevice } from "../funcs/devicesModifyDevice.js"; +import { devicesRemoveDevice } from "../funcs/devicesRemoveDevice.js"; +import { devicesScan } from "../funcs/devicesScan.js"; +import { devicesSetChannelmap } from "../funcs/devicesSetChannelmap.js"; +import { devicesSetDevicePreferences } from "../funcs/devicesSetDevicePreferences.js"; +import { devicesStopScan } from "../funcs/devicesStopScan.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class Devices extends ClientSDK { + /** + * Get available grabbers + * + * @remarks + * Get available grabbers visible to the server + */ + async getAvailableGrabbers( + request: operations.GetAvailableGrabbersRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(devicesGetAvailableGrabbers( + this, + request, + options, + )); + } + + /** + * Get all devices + * + * @remarks + * Get the list of all devices present + */ + async listDevices( + options?: RequestOptions, + ): Promise { + return unwrapAsync(devicesListDevices( + this, + options, + )); + } + + /** + * Add a device + * + * @remarks + * This endpoint adds a device to an existing grabber. The device is identified, and added to the correct grabber. + */ + async addDevice( + request: operations.AddDeviceRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(devicesAddDevice( + this, + request, + options, + )); + } + + /** + * Tell grabbers to discover devices + * + * @remarks + * Tell grabbers to discover devices + */ + async discoverDevices( + options?: RequestOptions, + ): Promise { + return unwrapAsync(devicesDiscoverDevices( + this, + options, + )); + } + + /** + * Remove a device + * + * @remarks + * Remove a devices by its id along with its channel mappings + */ + async removeDevice( + request: operations.RemoveDeviceRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(devicesRemoveDevice( + this, + request, + options, + )); + } + + /** + * Get device details + * + * @remarks + * Get a device's details by its id + */ + async getDeviceDetails( + request: operations.GetDeviceDetailsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(devicesGetDeviceDetails( + this, + request, + options, + )); + } + + /** + * Enable or disable a device + * + * @remarks + * Enable or disable a device by its id + */ + async modifyDevice( + request: operations.ModifyDeviceRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(devicesModifyDevice( + this, + request, + options, + )); + } + + /** + * Set a device's channel mapping + * + * @remarks + * Set a device's channel mapping + */ + async setChannelmap( + request: operations.SetChannelmapRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(devicesSetChannelmap( + this, + request, + options, + )); + } + + /** + * Get a device's channels + * + * @remarks + * Get a device's channels by its id + */ + async getDevicesChannels( + request: operations.GetDevicesChannelsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(devicesGetDevicesChannels( + this, + request, + options, + )); + } + + /** + * Set device preferences + * + * @remarks + * Set device preferences by its id + */ + async setDevicePreferences( + request: operations.SetDevicePreferencesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(devicesSetDevicePreferences( + this, + request, + options, + )); + } + + /** + * Tell a device to stop scanning for channels + * + * @remarks + * Tell a device to stop scanning for channels + */ + async stopScan( + request: operations.StopScanRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(devicesStopScan( + this, + request, + options, + )); + } + + /** + * Tell a device to scan for channels + * + * @remarks + * Tell a device to scan for channels + */ + async scan( + request: operations.ScanRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(devicesScan( + this, + request, + options, + )); + } + + /** + * Get device thumb + * + * @remarks + * Get a device's thumb for display to the user + */ + async getThumb( + request: operations.GetThumbRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(devicesGetThumb( + this, + request, + options, + )); + } +} diff --git a/src/sdk/downloadqueue.ts b/src/sdk/downloadqueue.ts new file mode 100644 index 00000000..3520731f --- /dev/null +++ b/src/sdk/downloadqueue.ts @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { downloadQueueAddDownloadQueueItems } from "../funcs/downloadQueueAddDownloadQueueItems.js"; +import { downloadQueueCreateDownloadQueue } from "../funcs/downloadQueueCreateDownloadQueue.js"; +import { downloadQueueGetDownloadQueue } from "../funcs/downloadQueueGetDownloadQueue.js"; +import { downloadQueueGetDownloadQueueItems } from "../funcs/downloadQueueGetDownloadQueueItems.js"; +import { downloadQueueGetDownloadQueueMedia } from "../funcs/downloadQueueGetDownloadQueueMedia.js"; +import { downloadQueueGetItemDecision } from "../funcs/downloadQueueGetItemDecision.js"; +import { downloadQueueListDownloadQueueItems } from "../funcs/downloadQueueListDownloadQueueItems.js"; +import { downloadQueueRemoveDownloadQueueItems } from "../funcs/downloadQueueRemoveDownloadQueueItems.js"; +import { downloadQueueRestartProcessingDownloadQueueItems } from "../funcs/downloadQueueRestartProcessingDownloadQueueItems.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class DownloadQueue extends ClientSDK { + /** + * Create download queue + * + * @remarks + * Available: 0.2.0 + * + * Creates a download queue for this client if one doesn't exist, or returns the existing queue for this client and user. + */ + async createDownloadQueue( + options?: RequestOptions, + ): Promise { + return unwrapAsync(downloadQueueCreateDownloadQueue( + this, + options, + )); + } + + /** + * Get a download queue + * + * @remarks + * Available: 0.2.0 + * + * Get a download queue by its id + */ + async getDownloadQueue( + request: operations.GetDownloadQueueRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(downloadQueueGetDownloadQueue( + this, + request, + options, + )); + } + + /** + * Add to download queue + * + * @remarks + * Available: 0.2.0 + * + * Add items to the download queue + */ + async addDownloadQueueItems( + request: operations.AddDownloadQueueItemsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(downloadQueueAddDownloadQueueItems( + this, + request, + options, + )); + } + + /** + * Get download queue items + * + * @remarks + * Available: 0.2.0 + * + * Get items from a download queue + */ + async listDownloadQueueItems( + request: operations.ListDownloadQueueItemsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(downloadQueueListDownloadQueueItems( + this, + request, + options, + )); + } + + /** + * Grab download queue item decision + * + * @remarks + * Available: 0.2.0 + * + * Grab the decision for a download queue item + */ + async getItemDecision( + request: operations.GetItemDecisionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(downloadQueueGetItemDecision( + this, + request, + options, + )); + } + + /** + * Grab download queue media + * + * @remarks + * Available: 0.2.0 + * + * Grab the media for a download queue item + */ + async getDownloadQueueMedia( + request: operations.GetDownloadQueueMediaRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(downloadQueueGetDownloadQueueMedia( + this, + request, + options, + )); + } + + /** + * Delete download queue items + * + * @remarks + * delete items from a download queue + */ + async removeDownloadQueueItems( + request: operations.RemoveDownloadQueueItemsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(downloadQueueRemoveDownloadQueueItems( + this, + request, + options, + )); + } + + /** + * Get download queue items + * + * @remarks + * Available: 0.2.0 + * + * Get items from a download queue + */ + async getDownloadQueueItems( + request: operations.GetDownloadQueueItemsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(downloadQueueGetDownloadQueueItems( + this, + request, + options, + )); + } + + /** + * Restart processing of items from the decision + * + * @remarks + * Available: 0.2.0 + * + * Reprocess download queue items with previous decision parameters + */ + async restartProcessingDownloadQueueItems( + request: operations.RestartProcessingDownloadQueueItemsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(downloadQueueRestartProcessingDownloadQueueItems( + this, + request, + options, + )); + } +} diff --git a/src/sdk/dvrs.ts b/src/sdk/dvrs.ts new file mode 100644 index 00000000..820d8c06 --- /dev/null +++ b/src/sdk/dvrs.ts @@ -0,0 +1,223 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { dvRsAddDeviceToDVR } from "../funcs/dvRsAddDeviceToDVR.js"; +import { dvRsAddLineup } from "../funcs/dvRsAddLineup.js"; +import { dvRsCreateDVR } from "../funcs/dvRsCreateDVR.js"; +import { dvRsDeleteDVR } from "../funcs/dvRsDeleteDVR.js"; +import { dvRsDeleteLineup } from "../funcs/dvRsDeleteLineup.js"; +import { dvRsGetDVR } from "../funcs/dvRsGetDVR.js"; +import { dvRsListDVRs } from "../funcs/dvRsListDVRs.js"; +import { dvRsReloadGuide } from "../funcs/dvRsReloadGuide.js"; +import { dvRsRemoveDeviceFromDVR } from "../funcs/dvRsRemoveDeviceFromDVR.js"; +import { dvRsSetDVRPreferences } from "../funcs/dvRsSetDVRPreferences.js"; +import { dvRsStopDVRReload } from "../funcs/dvRsStopDVRReload.js"; +import { dvRsTuneChannel } from "../funcs/dvRsTuneChannel.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class DVRs extends ClientSDK { + /** + * Get DVRs + * + * @remarks + * Get the list of all available DVRs + */ + async listDVRs( + options?: RequestOptions, + ): Promise { + return unwrapAsync(dvRsListDVRs( + this, + options, + )); + } + + /** + * Create a DVR + * + * @remarks + * Creation of a DVR, after creation of a devcie and a lineup is selected + */ + async createDVR( + request: operations.CreateDVRRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(dvRsCreateDVR( + this, + request, + options, + )); + } + + /** + * Delete a single DVR + * + * @remarks + * Delete a single DVR by its id (key) + */ + async deleteDVR( + request: operations.DeleteDVRRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(dvRsDeleteDVR( + this, + request, + options, + )); + } + + /** + * Get a single DVR + * + * @remarks + * Get a single DVR by its id (key) + */ + async getDVR( + request: operations.GetDVRRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(dvRsGetDVR( + this, + request, + options, + )); + } + + /** + * Delete a DVR Lineup + * + * @remarks + * Deletes a DVR device's lineup. + */ + async deleteLineup( + request: operations.DeleteLineupRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(dvRsDeleteLineup( + this, + request, + options, + )); + } + + /** + * Add a DVR Lineup + * + * @remarks + * Add a lineup to a DVR device's set of lineups. + */ + async addLineup( + request: operations.AddLineupRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(dvRsAddLineup( + this, + request, + options, + )); + } + + /** + * Set DVR preferences + * + * @remarks + * Set DVR preferences by name avd value + */ + async setDVRPreferences( + request: operations.SetDVRPreferencesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(dvRsSetDVRPreferences( + this, + request, + options, + )); + } + + /** + * Tell a DVR to stop reloading program guide + * + * @remarks + * Tell a DVR to stop reloading program guide + */ + async stopDVRReload( + request: operations.StopDVRReloadRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(dvRsStopDVRReload( + this, + request, + options, + )); + } + + /** + * Tell a DVR to reload program guide + * + * @remarks + * Tell a DVR to reload program guide + */ + async reloadGuide( + request: operations.ReloadGuideRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(dvRsReloadGuide( + this, + request, + options, + )); + } + + /** + * Tune a channel on a DVR + * + * @remarks + * Tune a channel on a DVR to the provided channel + */ + async tuneChannel( + request: operations.TuneChannelRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(dvRsTuneChannel( + this, + request, + options, + )); + } + + /** + * Remove a device from an existing DVR + * + * @remarks + * Remove a device from an existing DVR + */ + async removeDeviceFromDVR( + request: operations.RemoveDeviceFromDVRRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(dvRsRemoveDeviceFromDVR( + this, + request, + options, + )); + } + + /** + * Add a device to an existing DVR + * + * @remarks + * Add a device to an existing DVR + */ + async addDeviceToDVR( + request: operations.AddDeviceToDVRRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(dvRsAddDeviceToDVR( + this, + request, + options, + )); + } +} diff --git a/src/sdk/epg.ts b/src/sdk/epg.ts new file mode 100644 index 00000000..b7501fd3 --- /dev/null +++ b/src/sdk/epg.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { epgComputeChannelMap } from "../funcs/epgComputeChannelMap.js"; +import { epgGetAllLanguages } from "../funcs/epgGetAllLanguages.js"; +import { epgGetChannels } from "../funcs/epgGetChannels.js"; +import { epgGetCountries } from "../funcs/epgGetCountries.js"; +import { epgGetCountriesLineups } from "../funcs/epgGetCountriesLineups.js"; +import { epgGetCountryRegions } from "../funcs/epgGetCountryRegions.js"; +import { epgGetLineup } from "../funcs/epgGetLineup.js"; +import { epgGetLineupChannels } from "../funcs/epgGetLineupChannels.js"; +import { epgListLineups } from "../funcs/epgListLineups.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class Epg extends ClientSDK { + /** + * Compute the best channel map + * + * @remarks + * Compute the best channel map, given device and lineup + */ + async computeChannelMap( + request: operations.ComputeChannelMapRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(epgComputeChannelMap( + this, + request, + options, + )); + } + + /** + * Get channels for a lineup + * + * @remarks + * Get channels for a lineup within an EPG provider + */ + async getChannels( + request: operations.GetChannelsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(epgGetChannels( + this, + request, + options, + )); + } + + /** + * Get all countries + * + * @remarks + * This endpoint returns a list of countries which EPG data is available for. There are three flavors, as specfied by the `flavor` attribute + */ + async getCountries( + options?: RequestOptions, + ): Promise { + return unwrapAsync(epgGetCountries( + this, + options, + )); + } + + /** + * Get all languages + * + * @remarks + * Returns a list of all possible languages for EPG data. + */ + async getAllLanguages( + options?: RequestOptions, + ): Promise { + return unwrapAsync(epgGetAllLanguages( + this, + options, + )); + } + + /** + * Compute the best lineup + * + * @remarks + * Compute the best lineup, given lineup group and device + */ + async getLineup( + request: operations.GetLineupRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(epgGetLineup( + this, + request, + options, + )); + } + + /** + * Get the channels for mulitple lineups + * + * @remarks + * Get the channels across multiple lineups + */ + async getLineupChannels( + request: operations.GetLineupChannelsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(epgGetLineupChannels( + this, + request, + options, + )); + } + + /** + * Get lineups for a country via postal code + * + * @remarks + * Returns a list of lineups for a given country, EPG provider and postal code + */ + async getCountriesLineups( + request: operations.GetCountriesLineupsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(epgGetCountriesLineups( + this, + request, + options, + )); + } + + /** + * Get regions for a country + * + * @remarks + * Get regions for a country within an EPG provider + */ + async getCountryRegions( + request: operations.GetCountryRegionsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(epgGetCountryRegions( + this, + request, + options, + )); + } + + /** + * Get lineups for a region + * + * @remarks + * Get lineups for a region within an EPG provider + */ + async listLineups( + request: operations.ListLineupsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(epgListLineups( + this, + request, + options, + )); + } +} diff --git a/src/sdk/events.ts b/src/sdk/events.ts new file mode 100644 index 00000000..9df0d1ba --- /dev/null +++ b/src/sdk/events.ts @@ -0,0 +1,45 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { eventsConnectWebSocket } from "../funcs/eventsConnectWebSocket.js"; +import { eventsGetNotifications } from "../funcs/eventsGetNotifications.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class Events extends ClientSDK { + /** + * Connect to Eventsource + * + * @remarks + * Connect to the event source to get a stream of events + */ + async getNotifications( + request: operations.GetNotificationsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(eventsGetNotifications( + this, + request, + options, + )); + } + + /** + * Connect to WebSocket + * + * @remarks + * Connect to the web socket to get a stream of events + */ + async connectWebSocket( + request: operations.ConnectWebSocketRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(eventsConnectWebSocket( + this, + request, + options, + )); + } +} diff --git a/src/sdk/general.ts b/src/sdk/general.ts new file mode 100644 index 00000000..1eefa6dd --- /dev/null +++ b/src/sdk/general.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { generalGetIdentity } from "../funcs/generalGetIdentity.js"; +import { generalGetServerInfo } from "../funcs/generalGetServerInfo.js"; +import { generalGetSourceConnectionInformation } from "../funcs/generalGetSourceConnectionInformation.js"; +import { generalGetTransientToken } from "../funcs/generalGetTransientToken.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class General extends ClientSDK { + /** + * Get PMS info + * + * @remarks + * Information about this PMS setup and configuration + */ + async getServerInfo( + request: operations.GetServerInfoRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(generalGetServerInfo( + this, + request, + options, + )); + } + + /** + * Get PMS identity + * + * @remarks + * Get details about this PMS's identity + */ + async getIdentity( + options?: RequestOptions, + ): Promise { + return unwrapAsync(generalGetIdentity( + this, + 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. + */ + async getSourceConnectionInformation( + request: operations.GetSourceConnectionInformationRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(generalGetSourceConnectionInformation( + this, + request, + options, + )); + } + + /** + * Get Transient Tokens + * + * @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. + * Note: This endpoint responds to all HTTP verbs but POST in preferred + */ + async getTransientToken( + request: operations.GetTransientTokenRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(generalGetTransientToken( + this, + request, + options, + )); + } +} diff --git a/src/sdk/hubs.ts b/src/sdk/hubs.ts index daf04ef7..b9409cc8 100644 --- a/src/sdk/hubs.ts +++ b/src/sdk/hubs.ts @@ -2,44 +2,36 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { hubsGetGlobalHubs } from "../funcs/hubsGetGlobalHubs.js"; -import { hubsGetLibraryHubs } from "../funcs/hubsGetLibraryHubs.js"; -import { hubsGetRecentlyAdded } from "../funcs/hubsGetRecentlyAdded.js"; +import { hubsCreateCustomHub } from "../funcs/hubsCreateCustomHub.js"; +import { hubsDeleteCustomHub } from "../funcs/hubsDeleteCustomHub.js"; +import { hubsGetAllHubs } from "../funcs/hubsGetAllHubs.js"; +import { hubsGetContinueWatching } from "../funcs/hubsGetContinueWatching.js"; +import { hubsGetHubItems } from "../funcs/hubsGetHubItems.js"; +import { hubsGetMetadataHubs } from "../funcs/hubsGetMetadataHubs.js"; +import { hubsGetPostplayHubs } from "../funcs/hubsGetPostplayHubs.js"; +import { hubsGetPromotedHubs } from "../funcs/hubsGetPromotedHubs.js"; +import { hubsGetRelatedHubs } from "../funcs/hubsGetRelatedHubs.js"; +import { hubsGetSectionHubs } from "../funcs/hubsGetSectionHubs.js"; +import { hubsListHubs } from "../funcs/hubsListHubs.js"; +import { hubsMoveHub } from "../funcs/hubsMoveHub.js"; +import { hubsResetSectionDefaults } from "../funcs/hubsResetSectionDefaults.js"; +import { hubsUpdateHubVisibility } from "../funcs/hubsUpdateHubVisibility.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Hubs extends ClientSDK { /** - * Get Global Hubs + * Get global hubs * * @remarks - * Get Global Hubs filtered by the parameters provided. + * Get the global hubs in this PMS */ - async getGlobalHubs( - count?: number | undefined, - onlyTransient?: operations.OnlyTransient | undefined, + async getAllHubs( + request: operations.GetAllHubsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(hubsGetGlobalHubs( - this, - count, - onlyTransient, - options, - )); - } - - /** - * Get Recently Added - * - * @remarks - * This endpoint will return the recently added content. - */ - async getRecentlyAdded( - request: operations.GetRecentlyAddedRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(hubsGetRecentlyAdded( + ): Promise { + return unwrapAsync(hubsGetAllHubs( this, request, options, @@ -47,22 +39,222 @@ export class Hubs extends ClientSDK { } /** - * Get library specific hubs + * Get the continue watching hub * * @remarks - * This endpoint will return a list of library specific hubs + * Get the global continue watching hub */ - async getLibraryHubs( - sectionId: number, - count?: number | undefined, - onlyTransient?: operations.QueryParamOnlyTransient | undefined, + async getContinueWatching( + request: operations.GetContinueWatchingRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(hubsGetLibraryHubs( + ): Promise { + return unwrapAsync(hubsGetContinueWatching( this, - sectionId, - count, - onlyTransient, + request, + options, + )); + } + + /** + * Get a hub's items + * + * @remarks + * Get the items within a single hub specified by identifier + */ + async getHubItems( + request: operations.GetHubItemsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(hubsGetHubItems( + this, + request, + options, + )); + } + + /** + * Get the hubs which are promoted + * + * @remarks + * Get the global hubs which are promoted (should be displayed on the home screen) + */ + async getPromotedHubs( + request: operations.GetPromotedHubsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(hubsGetPromotedHubs( + this, + request, + options, + )); + } + + /** + * Get hubs for section by metadata item + * + * @remarks + * Get the hubs for a section by metadata item. Currently only for music sections + */ + async getMetadataHubs( + request: operations.GetMetadataHubsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(hubsGetMetadataHubs( + this, + request, + options, + )); + } + + /** + * Get postplay hubs + * + * @remarks + * Get the hubs for a metadata to be displayed in post play + */ + async getPostplayHubs( + request: operations.GetPostplayHubsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(hubsGetPostplayHubs( + this, + request, + options, + )); + } + + /** + * Get related hubs + * + * @remarks + * Get the hubs for a metadata related to the provided metadata item + */ + async getRelatedHubs( + request: operations.GetRelatedHubsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(hubsGetRelatedHubs( + this, + request, + options, + )); + } + + /** + * Get section hubs + * + * @remarks + * Get the hubs for a single section + */ + async getSectionHubs( + request: operations.GetSectionHubsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(hubsGetSectionHubs( + this, + request, + options, + )); + } + + /** + * Reset hubs to defaults + * + * @remarks + * Reset hubs for this section to defaults and delete custom hubs + */ + async resetSectionDefaults( + request: operations.ResetSectionDefaultsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(hubsResetSectionDefaults( + this, + request, + options, + )); + } + + /** + * Get hubs + * + * @remarks + * Get the list of hubs including both built-in and custom + */ + async listHubs( + request: operations.ListHubsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(hubsListHubs( + this, + request, + options, + )); + } + + /** + * Create a custom hub + * + * @remarks + * Create a custom hub based on a metadata item + */ + async createCustomHub( + request: operations.CreateCustomHubRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(hubsCreateCustomHub( + this, + request, + options, + )); + } + + /** + * Move Hub + * + * @remarks + * Changed the ordering of a hub among others hubs + */ + async moveHub( + request: operations.MoveHubRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(hubsMoveHub( + this, + request, + options, + )); + } + + /** + * Delete a custom hub + * + * @remarks + * Delete a custom hub from the server + */ + async deleteCustomHub( + request: operations.DeleteCustomHubRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(hubsDeleteCustomHub( + this, + request, + options, + )); + } + + /** + * Change hub visibility + * + * @remarks + * Changed the visibility of a hub for both the admin and shared users + */ + async updateHubVisibility( + request: operations.UpdateHubVisibilityRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(hubsUpdateHubVisibility( + this, + request, options, )); } diff --git a/src/sdk/library.ts b/src/sdk/library.ts index 67918953..15bb495a 100644 --- a/src/sdk/library.ts +++ b/src/sdk/library.ts @@ -2,186 +2,102 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { libraryDeleteLibrary } from "../funcs/libraryDeleteLibrary.js"; -import { libraryGetActorsLibrary } from "../funcs/libraryGetActorsLibrary.js"; -import { libraryGetAllLibraries } from "../funcs/libraryGetAllLibraries.js"; -import { libraryGetCountriesLibrary } from "../funcs/libraryGetCountriesLibrary.js"; -import { libraryGetFileHash } from "../funcs/libraryGetFileHash.js"; -import { libraryGetGenresLibrary } from "../funcs/libraryGetGenresLibrary.js"; +import { libraryAddExtras } from "../funcs/libraryAddExtras.js"; +import { libraryAddSection } from "../funcs/libraryAddSection.js"; +import { libraryAddSubtitles } from "../funcs/libraryAddSubtitles.js"; +import { libraryAnalyzeMetadata } from "../funcs/libraryAnalyzeMetadata.js"; +import { libraryAutocomplete } from "../funcs/libraryAutocomplete.js"; +import { libraryCancelRefresh } from "../funcs/libraryCancelRefresh.js"; +import { libraryCleanBundles } from "../funcs/libraryCleanBundles.js"; +import { libraryCreateMarker } from "../funcs/libraryCreateMarker.js"; +import { libraryDeleteCaches } from "../funcs/libraryDeleteCaches.js"; +import { libraryDeleteCollection } from "../funcs/libraryDeleteCollection.js"; +import { libraryDeleteIndexes } from "../funcs/libraryDeleteIndexes.js"; +import { libraryDeleteIntros } from "../funcs/libraryDeleteIntros.js"; +import { libraryDeleteLibrarySection } from "../funcs/libraryDeleteLibrarySection.js"; +import { libraryDeleteMarker } from "../funcs/libraryDeleteMarker.js"; +import { libraryDeleteMediaItem } from "../funcs/libraryDeleteMediaItem.js"; +import { libraryDeleteMetadataItem } from "../funcs/libraryDeleteMetadataItem.js"; +import { libraryDeleteStream } from "../funcs/libraryDeleteStream.js"; +import { libraryDetectAds } from "../funcs/libraryDetectAds.js"; +import { libraryDetectCredits } from "../funcs/libraryDetectCredits.js"; +import { libraryDetectIntros } from "../funcs/libraryDetectIntros.js"; +import { libraryDetectVoiceActivity } from "../funcs/libraryDetectVoiceActivity.js"; +import { libraryEditMarker } from "../funcs/libraryEditMarker.js"; +import { libraryEditMetadataItem } from "../funcs/libraryEditMetadataItem.js"; +import { libraryEditSection } from "../funcs/libraryEditSection.js"; +import { libraryEmptyTrash } from "../funcs/libraryEmptyTrash.js"; +import { libraryGenerateThumbs } from "../funcs/libraryGenerateThumbs.js"; +import { libraryGetAllItemLeaves } from "../funcs/libraryGetAllItemLeaves.js"; +import { libraryGetAugmentationStatus } from "../funcs/libraryGetAugmentationStatus.js"; +import { libraryGetAvailableSorts } from "../funcs/libraryGetAvailableSorts.js"; +import { libraryGetChapterImage } from "../funcs/libraryGetChapterImage.js"; +import { libraryGetCollections } from "../funcs/libraryGetCollections.js"; +import { libraryGetCommon } from "../funcs/libraryGetCommon.js"; +import { libraryGetExtras } from "../funcs/libraryGetExtras.js"; +import { GetFileAcceptEnum, libraryGetFile } from "../funcs/libraryGetFile.js"; +import { libraryGetFirstCharacters } from "../funcs/libraryGetFirstCharacters.js"; +import { libraryGetImageFromBif } from "../funcs/libraryGetImageFromBif.js"; +import { + GetItemArtworkAcceptEnum, + libraryGetItemArtwork, +} from "../funcs/libraryGetItemArtwork.js"; +import { libraryGetItemTree } from "../funcs/libraryGetItemTree.js"; import { libraryGetLibraryDetails } from "../funcs/libraryGetLibraryDetails.js"; import { libraryGetLibraryItems } from "../funcs/libraryGetLibraryItems.js"; -import { libraryGetLibrarySectionsAll } from "../funcs/libraryGetLibrarySectionsAll.js"; -import { libraryGetMediaArts } from "../funcs/libraryGetMediaArts.js"; -import { libraryGetMediaMetaData } from "../funcs/libraryGetMediaMetaData.js"; -import { libraryGetMediaPosters } from "../funcs/libraryGetMediaPosters.js"; -import { libraryGetMetadataChildren } from "../funcs/libraryGetMetadataChildren.js"; -import { libraryGetRecentlyAddedLibrary } from "../funcs/libraryGetRecentlyAddedLibrary.js"; -import { libraryGetRefreshLibraryMetadata } from "../funcs/libraryGetRefreshLibraryMetadata.js"; -import { libraryGetSearchAllLibraries } from "../funcs/libraryGetSearchAllLibraries.js"; -import { libraryGetSearchLibrary } from "../funcs/libraryGetSearchLibrary.js"; -import { libraryGetTopWatchedContent } from "../funcs/libraryGetTopWatchedContent.js"; -import { libraryPostMediaArts } from "../funcs/libraryPostMediaArts.js"; -import { libraryPostMediaPoster } from "../funcs/libraryPostMediaPoster.js"; +import { libraryGetLibraryMatches } from "../funcs/libraryGetLibraryMatches.js"; +import { libraryGetMediaPart } from "../funcs/libraryGetMediaPart.js"; +import { libraryGetPartIndex } from "../funcs/libraryGetPartIndex.js"; +import { libraryGetPerson } from "../funcs/libraryGetPerson.js"; +import { libraryGetRandomArtwork } from "../funcs/libraryGetRandomArtwork.js"; +import { libraryGetRelatedItems } from "../funcs/libraryGetRelatedItems.js"; +import { libraryGetSectionFilters } from "../funcs/libraryGetSectionFilters.js"; +import { libraryGetSectionImage } from "../funcs/libraryGetSectionImage.js"; +import { libraryGetSectionPreferences } from "../funcs/libraryGetSectionPreferences.js"; +import { libraryGetSections } from "../funcs/libraryGetSections.js"; +import { libraryGetSectionsPrefs } from "../funcs/libraryGetSectionsPrefs.js"; +import { libraryGetStream } from "../funcs/libraryGetStream.js"; +import { libraryGetStreamLevels } from "../funcs/libraryGetStreamLevels.js"; +import { libraryGetStreamLoudness } from "../funcs/libraryGetStreamLoudness.js"; +import { libraryGetTags } from "../funcs/libraryGetTags.js"; +import { libraryIngestTransientItem } from "../funcs/libraryIngestTransientItem.js"; +import { libraryListMatches } from "../funcs/libraryListMatches.js"; +import { libraryListPersonMedia } from "../funcs/libraryListPersonMedia.js"; +import { libraryListSimilar } from "../funcs/libraryListSimilar.js"; +import { libraryListSonicallySimilar } from "../funcs/libraryListSonicallySimilar.js"; +import { libraryListTopUsers } from "../funcs/libraryListTopUsers.js"; +import { libraryMatchItem } from "../funcs/libraryMatchItem.js"; +import { libraryMergeItems } from "../funcs/libraryMergeItems.js"; +import { libraryOptimizeDatabase } from "../funcs/libraryOptimizeDatabase.js"; +import { libraryRefreshItemsMetadata } from "../funcs/libraryRefreshItemsMetadata.js"; +import { libraryRefreshSection } from "../funcs/libraryRefreshSection.js"; +import { libraryRefreshSectionsMetadata } from "../funcs/libraryRefreshSectionsMetadata.js"; +import { librarySetItemArtwork } from "../funcs/librarySetItemArtwork.js"; +import { librarySetItemPreferences } from "../funcs/librarySetItemPreferences.js"; +import { librarySetSectionPreferences } from "../funcs/librarySetSectionPreferences.js"; +import { librarySetStreamOffset } from "../funcs/librarySetStreamOffset.js"; +import { librarySetStreamSelection } from "../funcs/librarySetStreamSelection.js"; +import { librarySplitItem } from "../funcs/librarySplitItem.js"; +import { libraryStartAnalysis } from "../funcs/libraryStartAnalysis.js"; +import { libraryStartBifGeneration } from "../funcs/libraryStartBifGeneration.js"; +import { libraryStopAllRefreshes } from "../funcs/libraryStopAllRefreshes.js"; +import { libraryUnmatch } from "../funcs/libraryUnmatch.js"; +import { libraryUpdateItemArtwork } from "../funcs/libraryUpdateItemArtwork.js"; +import { libraryUpdateItems } from "../funcs/libraryUpdateItems.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; +export { GetFileAcceptEnum } from "../funcs/libraryGetFile.js"; + +export { GetItemArtworkAcceptEnum } from "../funcs/libraryGetItemArtwork.js"; + export class Library extends ClientSDK { /** - * Get Hash Value + * Get all items in library * * @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 getRecentlyAddedLibrary( - request: operations.GetRecentlyAddedLibraryRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(libraryGetRecentlyAddedLibrary( - this, - request, - 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, - )); - } - - /** - * 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. - * - `albums`: Items categorized by album. + * Request all metadata items according to a query. */ async getLibraryItems( request: operations.GetLibraryItemsRequest, @@ -195,16 +111,47 @@ export class Library extends ClientSDK { } /** - * Get Library section media by tag ALL + * Delete library caches * * @remarks - * Retrieves a list of all general media data for this library. + * Delete the hub caches so they are recomputed on next request */ - async getLibrarySectionsAll( - request: operations.GetLibrarySectionsAllRequest, + async deleteCaches( options?: RequestOptions, - ): Promise { - return unwrapAsync(libraryGetLibrarySectionsAll( + ): Promise { + return unwrapAsync(libraryDeleteCaches( + this, + options, + )); + } + + /** + * Clean bundles + * + * @remarks + * Clean out any now unused bundles. Bundles can become unused when media is deleted + */ + async cleanBundles( + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryCleanBundles( + this, + options, + )); + } + + /** + * Ingest a transient item + * + * @remarks + * This endpoint takes a file path specified in the `url` parameter, matches it using the scanner's match mechanism, downloads rich metadata, and then ingests the item as a transient item (without a library section). In the case where the file represents an episode, the entire tree (show, season, and episode) is added as transient items. At this time, movies and episodes are the only supported types, which are gleaned automatically from the file path. + * Note that any of the parameters passed to the metadata details endpoint (e.g. `includeExtras=1`) work here. + */ + async ingestTransientItem( + request: operations.IngestTransientItemRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryIngestTransientItem( this, request, options, @@ -212,128 +159,20 @@ export class Library extends ClientSDK { } /** - * Refresh Metadata Of The Library + * Get library matches * * @remarks - * This endpoint Refreshes all the Metadata of the library. + * The matches endpoint is used to match content external to the library with content inside the library. This is done by passing a series of semantic "hints" about the content (its type, name, or release year). Each type (e.g. movie) has a canonical set of minimal required hints. + * This ability to match content is useful in a variety of scenarios. For example, in the DVR, the EPG uses the endpoint to match recording rules against airing content. And in the cloud, the UMP uses the endpoint to match up a piece of media with rich metadata. + * The endpoint response can including multiple matches, if there is ambiguity, each one containing a `score` from 0 to 100. For somewhat historical reasons, anything over 85 is considered a positive match (we prefer false negatives over false positives in general for matching). + * The `guid` hint is somewhat special, in that it generally represents a unique identity for a piece of media (e.g. the IMDB `ttXXX`) identifier, in contrast with other hints which can be much more ambiguous (e.g. a title of `Jane Eyre`, which could refer to the 1943 or the 2011 version). + * Episodes require either a season/episode pair, or an air date (or both). Either the path must be sent, or the show title */ - async getRefreshLibraryMetadata( - sectionKey: number, - force?: operations.Force | undefined, + async getLibraryMatches( + request: operations.GetLibraryMatchesRequest, 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.GetSearchLibraryQueryParamTypeOpen, - options?: RequestOptions, - ): Promise { - return unwrapAsync(libraryGetSearchLibrary( - this, - sectionKey, - type, - options, - )); - } - - /** - * Get Genres of library media - * - * @remarks - * Retrieves a list of all the genres that are found for the media in this library. - */ - async getGenresLibrary( - sectionKey: number, - type: operations.GetGenresLibraryQueryParamTypeOpen, - options?: RequestOptions, - ): Promise { - return unwrapAsync(libraryGetGenresLibrary( - this, - sectionKey, - type, - options, - )); - } - - /** - * Get Countries of library media - * - * @remarks - * Retrieves a list of all the countries that are found for the media in this library. - */ - async getCountriesLibrary( - sectionKey: number, - type: operations.GetCountriesLibraryQueryParamTypeOpen, - options?: RequestOptions, - ): Promise { - return unwrapAsync(libraryGetCountriesLibrary( - this, - sectionKey, - type, - options, - )); - } - - /** - * Get Actors of library media - * - * @remarks - * Retrieves a list of all the actors that are found for the media in this library. - */ - async getActorsLibrary( - sectionKey: number, - type: operations.GetActorsLibraryQueryParamTypeOpen, - options?: RequestOptions, - ): Promise { - return unwrapAsync(libraryGetActorsLibrary( - this, - sectionKey, - type, - options, - )); - } - - /** - * Search All Libraries - * - * @remarks - * Search the provided query across all library sections, or a single section, and return matches as hubs, split up by type. - */ - async getSearchAllLibraries( - request: operations.GetSearchAllLibrariesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(libraryGetSearchAllLibraries( + ): Promise { + return unwrapAsync(libraryGetLibraryMatches( this, request, options, @@ -341,17 +180,16 @@ export class Library extends ClientSDK { } /** - * Get Media Metadata + * Optimize the Database * * @remarks - * This endpoint will return all the (meta)data of one or more library items specified by the ratingKey. - * Multiple rating keys can be provided as a comma-separated list (e.g., "21119,21617"). + * Initiate optimize on the database. */ - async getMediaMetaData( - request: operations.GetMediaMetaDataRequest, + async optimizeDatabase( + request: operations.OptimizeDatabaseRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(libraryGetMediaMetaData( + ): Promise { + return unwrapAsync(libraryOptimizeDatabase( this, request, options, @@ -359,127 +197,1293 @@ export class Library extends ClientSDK { } /** - * Get Media Background Artwork + * Get random artwork * * @remarks - * Returns the background artwork for a library item. + * Get random artwork across sections. This is commonly used for a screensaver. + * + * This retrieves 100 random artwork paths in the specified sections and returns them. Restrictions are put in place to not return artwork for items the user is not allowed to access. Artwork will be for Movies, Shows, and Artists only. */ - async getMediaArts( - ratingKey: number, + async getRandomArtwork( + request: operations.GetRandomArtworkRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(libraryGetMediaArts( + ): Promise { + return unwrapAsync(libraryGetRandomArtwork( this, - ratingKey, + request, options, )); } /** - * Upload Media Background Artwork + * Get library sections (main Media Provider Only) * * @remarks - * Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL + * 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 postMediaArts( - ratingKey: number, - requestBody?: - | ReadableStream - | Blob - | ArrayBuffer - | Uint8Array - | undefined, - url?: string | undefined, + async getSections( options?: RequestOptions, - ): Promise { - return unwrapAsync(libraryPostMediaArts( + ): Promise { + return unwrapAsync(libraryGetSections( this, - ratingKey, - requestBody, - url, options, )); } /** - * Get Media Posters + * Add a library section * * @remarks - * Returns the available posters for a library item. + * Add a new library section to the server */ - async getMediaPosters( - ratingKey: number, + async addSection( + request: operations.AddSectionRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(libraryGetMediaPosters( + ): Promise { + return unwrapAsync(libraryAddSection( this, - ratingKey, + request, options, )); } /** - * Upload Media Poster + * Stop refresh * * @remarks - * Uploads a poster to a library item, either from a local file or a remote URL + * Stop all refreshes across all sections */ - async postMediaPoster( - ratingKey: number, - requestBody?: - | ReadableStream - | Blob - | ArrayBuffer - | Uint8Array - | undefined, - url?: string | undefined, + async stopAllRefreshes( options?: RequestOptions, - ): Promise { - return unwrapAsync(libraryPostMediaPoster( + ): Promise { + return unwrapAsync(libraryStopAllRefreshes( this, - ratingKey, - requestBody, - url, options, )); } /** - * Get Items Children + * Get section prefs * * @remarks - * This endpoint will return the children of of a library item specified with the ratingKey. + * Get a section's preferences for a metadata type */ - async getMetadataChildren( - ratingKey: number, - includeElements?: string | undefined, + async getSectionsPrefs( + request: operations.GetSectionsPrefsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(libraryGetMetadataChildren( + ): Promise { + return unwrapAsync(libraryGetSectionsPrefs( this, - ratingKey, - includeElements, + request, options, )); } /** - * Get Top Watched Content + * Refresh all sections * * @remarks - * This endpoint will return the top watched content from libraries of a certain type + * Tell PMS to refresh all section metadata */ - async getTopWatchedContent( - type: operations.GetTopWatchedContentQueryParamTypeOpen, - includeGuids?: - | operations.GetTopWatchedContentQueryParamIncludeGuids - | undefined, + async refreshSectionsMetadata( + request: operations.RefreshSectionsMetadataRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(libraryGetTopWatchedContent( + ): Promise { + return unwrapAsync(libraryRefreshSectionsMetadata( this, - type, - includeGuids, + request, + options, + )); + } + + /** + * Get all library tags of a type + * + * @remarks + * Get all library tags of a type + */ + async getTags( + request: operations.GetTagsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetTags( + this, + request, + options, + )); + } + + /** + * Delete a metadata item + * + * @remarks + * Delete a single metadata item from the library, deleting media as well + */ + async deleteMetadataItem( + request: operations.DeleteMetadataItemRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryDeleteMetadataItem( + this, + request, + options, + )); + } + + /** + * Edit a metadata item + * + * @remarks + * Edit metadata items setting fields + */ + async editMetadataItem( + request: operations.EditMetadataItemRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryEditMetadataItem( + this, + request, + options, + )); + } + + /** + * Ad-detect an item + * + * @remarks + * Start the detection of ads in a metadata item + */ + async detectAds( + request: operations.DetectAdsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryDetectAds( + this, + request, + options, + )); + } + + /** + * Get the leaves of an item + * + * @remarks + * Get the leaves for a metadata item such as the episodes in a show + */ + async getAllItemLeaves( + request: operations.GetAllItemLeavesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetAllItemLeaves( + this, + request, + options, + )); + } + + /** + * Analyze an item + * + * @remarks + * Start the analysis of a metadata item + */ + async analyzeMetadata( + request: operations.AnalyzeMetadataRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryAnalyzeMetadata( + this, + request, + options, + )); + } + + /** + * Generate thumbs of chapters for an item + * + * @remarks + * Start the chapter thumb generation for an item + */ + async generateThumbs( + request: operations.GenerateThumbsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGenerateThumbs( + this, + request, + options, + )); + } + + /** + * Credit detect a metadata item + * + * @remarks + * Start credit detection on a metadata item + */ + async detectCredits( + request: operations.DetectCreditsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryDetectCredits( + this, + request, + options, + )); + } + + /** + * Get an item's extras + * + * @remarks + * Get the extras for a metadata item + */ + async getExtras( + request: operations.GetExtrasRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetExtras( + this, + request, + options, + )); + } + + /** + * Add to an item's extras + * + * @remarks + * Add an extra to a metadata item + */ + async addExtras( + request: operations.AddExtrasRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryAddExtras( + this, + request, + options, + )); + } + + /** + * Get a file from a metadata or media bundle + * + * @remarks + * Get a bundle file for a metadata or media item. This is either an image or a mp3 (for a show's theme) + */ + async getFile( + request: operations.GetFileRequest, + options?: RequestOptions & { acceptHeaderOverride?: GetFileAcceptEnum }, + ): Promise { + return unwrapAsync(libraryGetFile( + this, + request, + options, + )); + } + + /** + * Start BIF generation of an item + * + * @remarks + * Start the indexing (BIF generation) of an item + */ + async startBifGeneration( + request: operations.StartBifGenerationRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryStartBifGeneration( + this, + request, + options, + )); + } + + /** + * Intro detect an item + * + * @remarks + * Start the detection of intros in a metadata item + */ + async detectIntros( + request: operations.DetectIntrosRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryDetectIntros( + this, + request, + options, + )); + } + + /** + * Create a marker + * + * @remarks + * Create a marker for this user on the metadata item + */ + async createMarker( + request: operations.CreateMarkerRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryCreateMarker( + this, + request, + options, + )); + } + + /** + * Match a metadata item + * + * @remarks + * Match a metadata item to a guid + */ + async matchItem( + request: operations.MatchItemRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryMatchItem( + this, + request, + options, + )); + } + + /** + * Get metadata matches for an item + * + * @remarks + * Get the list of metadata matches for a metadata item + */ + async listMatches( + request: operations.ListMatchesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryListMatches( + this, + request, + options, + )); + } + + /** + * Merge a metadata item + * + * @remarks + * Merge a metadata item with other items + */ + async mergeItems( + request: operations.MergeItemsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryMergeItems( + this, + request, + options, + )); + } + + /** + * Get nearest tracks to metadata item + * + * @remarks + * Get the nearest tracks, sonically, to the provided track + */ + async listSonicallySimilar( + request: operations.ListSonicallySimilarRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryListSonicallySimilar( + this, + request, + options, + )); + } + + /** + * Set metadata preferences + * + * @remarks + * Set the preferences on a metadata item + */ + async setItemPreferences( + request: operations.SetItemPreferencesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(librarySetItemPreferences( + this, + request, + options, + )); + } + + /** + * Refresh a metadata item + * + * @remarks + * Refresh a metadata item from the agent + */ + async refreshItemsMetadata( + request: operations.RefreshItemsMetadataRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryRefreshItemsMetadata( + this, + request, + options, + )); + } + + /** + * Get related items + * + * @remarks + * Get a hub of related items to a metadata item + */ + async getRelatedItems( + request: operations.GetRelatedItemsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetRelatedItems( + this, + request, + options, + )); + } + + /** + * Get similar items + * + * @remarks + * Get a list of similar items to a metadata item + */ + async listSimilar( + request: operations.ListSimilarRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryListSimilar( + this, + request, + options, + )); + } + + /** + * Split a metadata item + * + * @remarks + * Split a metadata item into multiple items + */ + async splitItem( + request: operations.SplitItemRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(librarySplitItem( + this, + request, + options, + )); + } + + /** + * Add subtitles + * + * @remarks + * Add a subtitle to a metadata item + */ + async addSubtitles( + request: operations.AddSubtitlesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryAddSubtitles( + this, + request, + options, + )); + } + + /** + * Get metadata items as a tree + * + * @remarks + * Get a tree of metadata items, such as the seasons/episodes of a show + */ + async getItemTree( + request: operations.GetItemTreeRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetItemTree( + this, + request, + options, + )); + } + + /** + * Unmatch a metadata item + * + * @remarks + * Unmatch a metadata item to info fetched from the agent + */ + async unmatch( + request: operations.UnmatchRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryUnmatch( + this, + request, + options, + )); + } + + /** + * Get metadata top users + * + * @remarks + * Get the list of users which have played this item starting with the most + */ + async listTopUsers( + request: operations.ListTopUsersRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryListTopUsers( + this, + request, + options, + )); + } + + /** + * Detect voice activity + * + * @remarks + * Start the detection of voice in a metadata item + */ + async detectVoiceActivity( + request: operations.DetectVoiceActivityRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryDetectVoiceActivity( + this, + request, + options, + )); + } + + /** + * Get augmentation status + * + * @remarks + * Get augmentation status and potentially wait for completion + */ + async getAugmentationStatus( + request: operations.GetAugmentationStatusRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetAugmentationStatus( + this, + request, + options, + )); + } + + /** + * Set stream selection + * + * @remarks + * Set which streams (audio/subtitle) are selected by this user + */ + async setStreamSelection( + request: operations.SetStreamSelectionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(librarySetStreamSelection( + this, + request, + options, + )); + } + + /** + * Get person details + * + * @remarks + * Get details for a single actor. + */ + async getPerson( + request: operations.GetPersonRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetPerson( + this, + request, + options, + )); + } + + /** + * Get media for a person + * + * @remarks + * Get all the media for a single actor. + */ + async listPersonMedia( + request: operations.ListPersonMediaRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryListPersonMedia( + this, + request, + options, + )); + } + + /** + * Delete a library section + * + * @remarks + * Delete a library section by id + */ + async deleteLibrarySection( + request: operations.DeleteLibrarySectionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryDeleteLibrarySection( + this, + request, + options, + )); + } + + /** + * Get a library section by id + * + * @remarks + * Returns details for the library. This can be thought of as an interstitial endpoint because it contains information about the library, rather than content itself. It often contains a list of `Directory` metadata objects: These used to be used by clients to build a menuing system. + */ + async getLibraryDetails( + request: operations.GetLibraryDetailsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetLibraryDetails( + this, + request, + options, + )); + } + + /** + * Edit a library section + * + * @remarks + * Edit a library section by id setting parameters + */ + async editSection( + request: operations.EditSectionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryEditSection( + this, + request, + options, + )); + } + + /** + * Set the fields of the filtered items + * + * @remarks + * This endpoint takes an large possible set of values. Here are some examples. + * - **Parameters, extra documentation** + * - artist.title.value + * - When used with track, both artist.title.value and album.title.value need to be specified + * - title.value usage + * - Summary + * - Tracks always rename and never merge + * - Albums and Artists + * - if single item and item without title does not exist, it is renamed. + * - if single item and item with title does exist they are merged. + * - if multiple they are always merged. + * - Tracks + * - Works as expected will update the track's title + * - Single track: `/library/sections/{id}/all?type=10&id=42&title.value=NewName` + * - Multiple tracks: `/library/sections/{id}/all?type=10&id=42,43,44&title.value=NewName` + * - All tracks: `/library/sections/{id}/all?type=10&title.value=NewName` + * - Albums + * - Functionality changes depending on the existence of an album with the same title + * - Album exists + * - Single album: `/library/sections/{id}/all?type=9&id=42&title.value=Album 2` + * - Album with id 42 is merged into album titled "Album 2" + * - Multiple/All albums: `/library/sections/{id}/all?type=9&title.value=Moo Album` + * - All albums are merged into the existing album titled "Moo Album" + * - Album does not exist + * - Single album: `/library/sections/{id}/all?type=9&id=42&title.value=NewAlbumTitle` + * - Album with id 42 has title modified to "NewAlbumTitle" + * - Multiple/All albums: `/library/sections/{id}/all?type=9&title.value=NewAlbumTitle` + * - All albums are merged into a new album with title="NewAlbumTitle" + * - Artists + * - Functionaly changes depending on the existence of an artist with the same title. + * - Artist exists + * - Single artist: `/library/sections/{id}/all?type=8&id=42&title.value=Artist 2` + * - Artist with id 42 is merged into existing artist titled "Artist 2" + * - Multiple/All artists: `/library/sections/{id}/all?type=8&title.value=Artist 3` + * - All artists are merged into the existing artist titled "Artist 3" + * - Artist does not exist + * - Single artist: `/library/sections/{id}/all?type=8&id=42&title.value=NewArtistTitle` + * - Artist with id 42 has title modified to "NewArtistTitle" + * - Multiple/All artists: `/library/sections/{id}/all?type=8&title.value=NewArtistTitle` + * - All artists are merged into a new artist with title="NewArtistTitle" + * + * - **Notes** + * - Technically square brackets are not allowed in an URI except the Internet Protocol Literal Address + * - RFC3513: A host identified by an Internet Protocol literal address, version 6 [RFC3513] or later, is distinguished by enclosing the IP literal within square brackets ("[" and "]"). This is the only place where square bracket characters are allowed in the URI syntax. + * - Escaped square brackets are allowed, but don't render well + */ + async updateItems( + request: operations.UpdateItemsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryUpdateItems( + this, + request, + options, + )); + } + + /** + * Analyze a section + * + * @remarks + * Start analysis of all items in a section. If BIF generation is enabled, this will also be started on this section + */ + async startAnalysis( + request: operations.StartAnalysisRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryStartAnalysis( + this, + request, + options, + )); + } + + /** + * Get autocompletions for search + * + * @remarks + * The field to autocomplete on is specified by the {field}.query parameter. For example `genre.query` or `title.query`. + * Returns a set of items from the filtered items whose {field} starts with {field}.query. In the results, a {field}.queryRange will be present to express the range of the match + */ + async autocomplete( + request: operations.AutocompleteRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryAutocomplete( + this, + request, + options, + )); + } + + /** + * Get collections in a section + * + * @remarks + * Get all collections in a section + */ + async getCollections( + request: operations.GetCollectionsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetCollections( + this, + request, + options, + )); + } + + /** + * Get common fields for items + * + * @remarks + * Represents a "Common" item. It contains only the common attributes of the items selected by the provided filter + * Fields which are not common will be expressed in the `mixedFields` field + */ + async getCommon( + request: operations.GetCommonRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetCommon( + this, + request, + options, + )); + } + + /** + * Empty section trash + * + * @remarks + * Empty trash in the section, permanently deleting media/metadata for missing media + */ + async emptyTrash( + request: operations.EmptyTrashRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryEmptyTrash( + this, + request, + options, + )); + } + + /** + * Get section filters + * + * @remarks + * Get common filters on a section + */ + async getSectionFilters( + request: operations.GetSectionFiltersRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetSectionFilters( + this, + request, + options, + )); + } + + /** + * Get list of first characters + * + * @remarks + * Get list of first characters in this section + */ + async getFirstCharacters( + request: operations.GetFirstCharactersRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetFirstCharacters( + this, + request, + options, + )); + } + + /** + * Delete section indexes + * + * @remarks + * Delete all the indexes in a section + */ + async deleteIndexes( + request: operations.DeleteIndexesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryDeleteIndexes( + this, + request, + options, + )); + } + + /** + * Delete section intro markers + * + * @remarks + * Delete all the intro markers in a section + */ + async deleteIntros( + request: operations.DeleteIntrosRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryDeleteIntros( + this, + request, + options, + )); + } + + /** + * Get section prefs + * + * @remarks + * Get the prefs for a section by id and potentially overriding the agent + */ + async getSectionPreferences( + request: operations.GetSectionPreferencesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetSectionPreferences( + this, + request, + options, + )); + } + + /** + * Set section prefs + * + * @remarks + * Set the prefs for a section by id + */ + async setSectionPreferences( + request: operations.SetSectionPreferencesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(librarySetSectionPreferences( + this, + request, + options, + )); + } + + /** + * Cancel section refresh + * + * @remarks + * Cancel the refresh of a section + */ + async cancelRefresh( + request: operations.CancelRefreshRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryCancelRefresh( + this, + request, + options, + )); + } + + /** + * Refresh section + * + * @remarks + * Start a refresh of this section + */ + async refreshSection( + request: operations.RefreshSectionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryRefreshSection( + this, + request, + options, + )); + } + + /** + * Get a section sorts + * + * @remarks + * Get the sort mechanisms available in a section + */ + async getAvailableSorts( + request: operations.GetAvailableSortsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetAvailableSorts( + this, + request, + options, + )); + } + + /** + * Get loudness about a stream in json + * + * @remarks + * The the loudness of a stream in db, one entry per 100ms + */ + async getStreamLevels( + request: operations.GetStreamLevelsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetStreamLevels( + this, + request, + options, + )); + } + + /** + * Get loudness about a stream + * + * @remarks + * The the loudness of a stream in db, one number per line, one entry per 100ms + */ + async getStreamLoudness( + request: operations.GetStreamLoudnessRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetStreamLoudness( + this, + request, + options, + )); + } + + /** + * Get a chapter image + * + * @remarks + * Get a single chapter image for a piece of media + */ + async getChapterImage( + request: operations.GetChapterImageRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetChapterImage( + this, + request, + options, + )); + } + + /** + * Set an item's artwork, theme, etc + * + * @remarks + * Set the artwork, thumb, element for a metadata item + * Generally only the admin can perform this action. The exception is if the metadata is a playlist created by the user + */ + async setItemArtwork( + request: operations.SetItemArtworkRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(librarySetItemArtwork( + this, + request, + options, + )); + } + + /** + * Set an item's artwork, theme, etc + * + * @remarks + * Set the artwork, thumb, element for a metadata item + * Generally only the admin can perform this action. The exception is if the metadata is a playlist created by the user + */ + async updateItemArtwork( + request: operations.UpdateItemArtworkRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryUpdateItemArtwork( + this, + request, + options, + )); + } + + /** + * Delete a marker + * + * @remarks + * Delete a marker for this user on the metadata item + */ + async deleteMarker( + request: operations.DeleteMarkerRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryDeleteMarker( + this, + request, + options, + )); + } + + /** + * Edit a marker + * + * @remarks + * Edit a marker for this user on the metadata item + */ + async editMarker( + request: operations.EditMarkerRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryEditMarker( + this, + request, + options, + )); + } + + /** + * Delete a media item + * + * @remarks + * Delete a single media from a metadata item in the library + */ + async deleteMediaItem( + request: operations.DeleteMediaItemRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryDeleteMediaItem( + this, + request, + options, + )); + } + + /** + * Get BIF index for a part + * + * @remarks + * Get BIF index for a part by index type + */ + async getPartIndex( + request: operations.GetPartIndexRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetPartIndex( + this, + request, + options, + )); + } + + /** + * Delete a collection + * + * @remarks + * Delete a library collection from the PMS + */ + async deleteCollection( + request: operations.DeleteCollectionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryDeleteCollection( + this, + request, + options, + )); + } + + /** + * Get a section composite image + * + * @remarks + * Get a composite image of images in this section + */ + async getSectionImage( + request: operations.GetSectionImageRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetSectionImage( + this, + request, + options, + )); + } + + /** + * Delete a stream + * + * @remarks + * Delete a stream. Only applies to downloaded subtitle streams or a sidecar subtitle when media deletion is enabled. + */ + async deleteStream( + request: operations.DeleteStreamRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryDeleteStream( + this, + request, + options, + )); + } + + /** + * Get a stream + * + * @remarks + * Get a stream (such as a sidecar subtitle stream) + */ + async getStream( + request: operations.GetStreamRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetStream( + this, + request, + options, + )); + } + + /** + * Set a stream offset + * + * @remarks + * Set a stream offset in ms. This may not be respected by all clients + */ + async setStreamOffset( + request: operations.SetStreamOffsetRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(librarySetStreamOffset( + this, + request, + options, + )); + } + + /** + * Get an item's artwork, theme, etc + * + * @remarks + * Get the artwork, thumb, element for a metadata item + */ + async getItemArtwork( + request: operations.GetItemArtworkRequest, + options?: RequestOptions & { + acceptHeaderOverride?: GetItemArtworkAcceptEnum; + }, + ): Promise { + return unwrapAsync(libraryGetItemArtwork( + this, + request, + options, + )); + } + + /** + * Get a media part + * + * @remarks + * Get a media part for streaming or download. + * - streaming: This is the default scenario. Bandwidth usage on this endpoint will be guaranteed (on the server's end) to be at least the bandwidth reservation given in the decision. If no decision exists, an ad-hoc decision will be created if sufficient bandwidth exists. Clients should not rely on ad-hoc decisions being made as this may be removed in the future. + * - download: Indicated if the query parameter indicates this is a download. Bandwidth will be prioritized behind playbacks and will get a fair share of what remains. + */ + async getMediaPart( + request: operations.GetMediaPartRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetMediaPart( + this, + request, + options, + )); + } + + /** + * Get an image from part BIF + * + * @remarks + * Extract an image from the BIF for a part at a particular offset + */ + async getImageFromBif( + request: operations.GetImageFromBifRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetImageFromBif( + this, + request, options, )); } diff --git a/src/sdk/librarycollections.ts b/src/sdk/librarycollections.ts new file mode 100644 index 00000000..140b73d0 --- /dev/null +++ b/src/sdk/librarycollections.ts @@ -0,0 +1,63 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { libraryCollectionsAddCollectionItems } from "../funcs/libraryCollectionsAddCollectionItems.js"; +import { libraryCollectionsDeleteCollectionItem } from "../funcs/libraryCollectionsDeleteCollectionItem.js"; +import { libraryCollectionsMoveCollectionItem } from "../funcs/libraryCollectionsMoveCollectionItem.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class LibraryCollections extends ClientSDK { + /** + * Add items to a collection + * + * @remarks + * Add items to a collection by uri + */ + async addCollectionItems( + request: operations.AddCollectionItemsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryCollectionsAddCollectionItems( + this, + request, + options, + )); + } + + /** + * Delete an item from a collection + * + * @remarks + * Delete an item from a collection + */ + async deleteCollectionItem( + request: operations.DeleteCollectionItemRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryCollectionsDeleteCollectionItem( + this, + request, + options, + )); + } + + /** + * Reorder an item in the collection + * + * @remarks + * Reorder items in a collection with one item after another + */ + async moveCollectionItem( + request: operations.MoveCollectionItemRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryCollectionsMoveCollectionItem( + this, + request, + options, + )); + } +} diff --git a/src/sdk/libraryplaylists.ts b/src/sdk/libraryplaylists.ts new file mode 100644 index 00000000..eb0a92fa --- /dev/null +++ b/src/sdk/libraryplaylists.ts @@ -0,0 +1,243 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { libraryPlaylistsAddPlaylistItems } from "../funcs/libraryPlaylistsAddPlaylistItems.js"; +import { libraryPlaylistsClearPlaylistItems } from "../funcs/libraryPlaylistsClearPlaylistItems.js"; +import { libraryPlaylistsCreatePlaylist } from "../funcs/libraryPlaylistsCreatePlaylist.js"; +import { libraryPlaylistsDeletePlaylist } from "../funcs/libraryPlaylistsDeletePlaylist.js"; +import { libraryPlaylistsDeletePlaylistItem } from "../funcs/libraryPlaylistsDeletePlaylistItem.js"; +import { libraryPlaylistsGetPlaylistGenerator } from "../funcs/libraryPlaylistsGetPlaylistGenerator.js"; +import { libraryPlaylistsGetPlaylistGeneratorItems } from "../funcs/libraryPlaylistsGetPlaylistGeneratorItems.js"; +import { libraryPlaylistsGetPlaylistGenerators } from "../funcs/libraryPlaylistsGetPlaylistGenerators.js"; +import { libraryPlaylistsModifyPlaylistGenerator } from "../funcs/libraryPlaylistsModifyPlaylistGenerator.js"; +import { libraryPlaylistsMovePlaylistItem } from "../funcs/libraryPlaylistsMovePlaylistItem.js"; +import { libraryPlaylistsRefreshPlaylist } from "../funcs/libraryPlaylistsRefreshPlaylist.js"; +import { libraryPlaylistsUpdatePlaylist } from "../funcs/libraryPlaylistsUpdatePlaylist.js"; +import { libraryPlaylistsUploadPlaylist } from "../funcs/libraryPlaylistsUploadPlaylist.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class LibraryPlaylists extends ClientSDK { + /** + * Create a Playlist + * + * @remarks + * Create a new playlist. By default the playlist is blank. + */ + async createPlaylist( + request: operations.CreatePlaylistRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryPlaylistsCreatePlaylist( + this, + request, + options, + )); + } + + /** + * Upload + * + * @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( + request: operations.UploadPlaylistRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryPlaylistsUploadPlaylist( + this, + request, + options, + )); + } + + /** + * Delete a Playlist + * + * @remarks + * Deletes a playlist by provided id + */ + async deletePlaylist( + request: operations.DeletePlaylistRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryPlaylistsDeletePlaylist( + this, + request, + options, + )); + } + + /** + * Editing a Playlist + * + * @remarks + * Edits a playlist in the same manner as [editing metadata](#tag/Provider/operation/metadataPutItem) + */ + async updatePlaylist( + request: operations.UpdatePlaylistRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryPlaylistsUpdatePlaylist( + this, + request, + options, + )); + } + + /** + * Get a playlist's generators + * + * @remarks + * Get all the generators in a playlist + */ + async getPlaylistGenerators( + request: operations.GetPlaylistGeneratorsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryPlaylistsGetPlaylistGenerators( + this, + request, + options, + )); + } + + /** + * Clearing a playlist + * + * @remarks + * Clears a playlist, only works with dumb playlists. Returns the playlist. + */ + async clearPlaylistItems( + request: operations.ClearPlaylistItemsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryPlaylistsClearPlaylistItems( + this, + request, + options, + )); + } + + /** + * Adding to a Playlist + * + * @remarks + * Adds a generator to a playlist, same parameters as the POST above. 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 addPlaylistItems( + request: operations.AddPlaylistItemsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryPlaylistsAddPlaylistItems( + this, + request, + options, + )); + } + + /** + * Delete a Generator + * + * @remarks + * Deletes an item from a playlist. Only works with dumb playlists. + */ + async deletePlaylistItem( + request: operations.DeletePlaylistItemRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryPlaylistsDeletePlaylistItem( + this, + request, + options, + )); + } + + /** + * Get a playlist generator + * + * @remarks + * Get a playlist's generator. Only used for optimized versions + */ + async getPlaylistGenerator( + request: operations.GetPlaylistGeneratorRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryPlaylistsGetPlaylistGenerator( + this, + request, + options, + )); + } + + /** + * Modify a Generator + * + * @remarks + * Modify a playlist generator. Only used for optimizer + */ + async modifyPlaylistGenerator( + request: operations.ModifyPlaylistGeneratorRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryPlaylistsModifyPlaylistGenerator( + this, + request, + options, + )); + } + + /** + * Get a playlist generator's items + * + * @remarks + * Get a playlist generator's items + */ + async getPlaylistGeneratorItems( + request: operations.GetPlaylistGeneratorItemsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryPlaylistsGetPlaylistGeneratorItems( + this, + request, + options, + )); + } + + /** + * Moving items in a playlist + * + * @remarks + * Moves an item in a playlist. Only works with dumb playlists. + */ + async movePlaylistItem( + request: operations.MovePlaylistItemRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryPlaylistsMovePlaylistItem( + this, + request, + options, + )); + } + + /** + * Reprocess a generator + * + * @remarks + * Make a generator reprocess (refresh) + */ + async refreshPlaylist( + request: operations.RefreshPlaylistRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryPlaylistsRefreshPlaylist( + this, + request, + options, + )); + } +} diff --git a/src/sdk/livetv.ts b/src/sdk/livetv.ts new file mode 100644 index 00000000..728cfddc --- /dev/null +++ b/src/sdk/livetv.ts @@ -0,0 +1,79 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { liveTVGetLiveTVSession } from "../funcs/liveTVGetLiveTVSession.js"; +import { liveTVGetSessionPlaylistIndex } from "../funcs/liveTVGetSessionPlaylistIndex.js"; +import { liveTVGetSessions } from "../funcs/liveTVGetSessions.js"; +import { liveTVGetSessionSegment } from "../funcs/liveTVGetSessionSegment.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class LiveTV extends ClientSDK { + /** + * Get all sessions + * + * @remarks + * Get all livetv sessions and metadata + */ + async getSessions( + options?: RequestOptions, + ): Promise { + return unwrapAsync(liveTVGetSessions( + this, + options, + )); + } + + /** + * Get a single session + * + * @remarks + * Get a single livetv session and metadata + */ + async getLiveTVSession( + request: operations.GetLiveTVSessionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(liveTVGetLiveTVSession( + this, + request, + options, + )); + } + + /** + * Get a session playlist index + * + * @remarks + * Get a playlist index for playing this session + */ + async getSessionPlaylistIndex( + request: operations.GetSessionPlaylistIndexRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(liveTVGetSessionPlaylistIndex( + this, + request, + options, + )); + } + + /** + * Get a single session segment + * + * @remarks + * Get a single LiveTV session segment + */ + async getSessionSegment( + request: operations.GetSessionSegmentRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(liveTVGetSessionSegment( + this, + request, + options, + )); + } +} diff --git a/src/sdk/log.ts b/src/sdk/log.ts index 60153d66..e53f4b99 100644 --- a/src/sdk/log.ts +++ b/src/sdk/log.ts @@ -2,66 +2,44 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { logEnablePaperTrail } from "../funcs/logEnablePaperTrail.js"; -import { logLogLine } from "../funcs/logLogLine.js"; -import { logLogMultiLine } from "../funcs/logLogMultiLine.js"; +import { logEnablePapertrail } from "../funcs/logEnablePapertrail.js"; +import { logWriteLog } from "../funcs/logWriteLog.js"; +import { logWriteMessage } from "../funcs/logWriteMessage.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Log extends ClientSDK { /** - * Logging a single line message. + * Logging a multi-line message to the Plex Media Server log * * @remarks - * This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. + * This endpoint will write multiple lines to the main Plex Media Server log in a single request. It takes a set of query strings as would normally sent to the above PUT endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above. */ - async logLine( - level: operations.LevelOpen, - message: string, - source: string, + async writeLog( + request: ReadableStream | Blob | ArrayBuffer | Uint8Array, options?: RequestOptions, - ): Promise { - return unwrapAsync(logLogLine( + ): Promise { + return unwrapAsync(logWriteLog( this, - level, - message, - source, + request, options, )); } /** - * Logging a multi-line message + * Logging a single-line message to the Plex Media Server log * * @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'. + * This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. * - * 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. + * Note: This endpoint responds to all HTTP verbs **except POST** but PUT is preferred */ - async logMultiLine( - request: string, + async writeMessage( + request: operations.WriteMessageRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(logLogMultiLine( + ): Promise { + return unwrapAsync(logWriteMessage( this, request, options, @@ -72,13 +50,17 @@ export class Log extends ClientSDK { * 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. + * This endpoint will enable all Plex Media Server logs to be sent to the Papertrail networked logging site for a period of time + * + * Note: This endpoint responds to all HTTP verbs but POST is preferred */ - async enablePaperTrail( + async enablePapertrail( + request: operations.EnablePapertrailRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(logEnablePaperTrail( + ): Promise { + return unwrapAsync(logEnablePapertrail( this, + request, options, )); } diff --git a/src/sdk/media.ts b/src/sdk/media.ts deleted file mode 100644 index 6b957d67..00000000 --- a/src/sdk/media.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { mediaGetBannerImage } from "../funcs/mediaGetBannerImage.js"; -import { mediaGetThumbImage } from "../funcs/mediaGetThumbImage.js"; -import { mediaMarkPlayed } from "../funcs/mediaMarkPlayed.js"; -import { mediaMarkUnplayed } from "../funcs/mediaMarkUnplayed.js"; -import { mediaUpdatePlayProgress } from "../funcs/mediaUpdatePlayProgress.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -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 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, - )); - } - - /** - * 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, - )); - } -} diff --git a/src/sdk/models/errors/addplaylistcontents.ts b/src/sdk/models/errors/addplaylistcontents.ts deleted file mode 100644 index 9a85bc96..00000000 --- a/src/sdk/models/errors/addplaylistcontents.ts +++ /dev/null @@ -1,348 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type AddPlaylistContentsPlaylistsErrors = { - 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 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 AddPlaylistContentsUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: AddPlaylistContentsUnauthorizedData; - - constructor( - err: AddPlaylistContentsUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "AddPlaylistContentsUnauthorized"; - } -} - -export type AddPlaylistContentsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 AddPlaylistContentsBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: AddPlaylistContentsBadRequestData; - - constructor( - err: AddPlaylistContentsBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "AddPlaylistContentsBadRequest"; - } -} - -/** @internal */ -export const AddPlaylistContentsPlaylistsErrors$inboundSchema: z.ZodType< - AddPlaylistContentsPlaylistsErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const AddPlaylistContentsPlaylistsErrors$outboundSchema: z.ZodType< - AddPlaylistContentsPlaylistsErrors$Outbound, - z.ZodTypeDef, - AddPlaylistContentsPlaylistsErrors -> = 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 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; -} - -export function addPlaylistContentsPlaylistsErrorsToJSON( - addPlaylistContentsPlaylistsErrors: AddPlaylistContentsPlaylistsErrors, -): string { - return JSON.stringify( - AddPlaylistContentsPlaylistsErrors$outboundSchema.parse( - addPlaylistContentsPlaylistsErrors, - ), - ); -} - -export function addPlaylistContentsPlaylistsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - AddPlaylistContentsPlaylistsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AddPlaylistContentsPlaylistsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new AddPlaylistContentsUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type AddPlaylistContentsUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const AddPlaylistContentsErrors$outboundSchema: z.ZodType< - AddPlaylistContentsErrors$Outbound, - z.ZodTypeDef, - AddPlaylistContentsErrors -> = 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 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; -} - -export function addPlaylistContentsErrorsToJSON( - addPlaylistContentsErrors: AddPlaylistContentsErrors, -): string { - return JSON.stringify( - AddPlaylistContentsErrors$outboundSchema.parse(addPlaylistContentsErrors), - ); -} - -export function addPlaylistContentsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AddPlaylistContentsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AddPlaylistContentsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new AddPlaylistContentsBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type AddPlaylistContentsBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index d7025320..00000000 --- a/src/sdk/models/errors/applyupdates.ts +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type ApplyUpdatesUpdaterErrors = { - 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 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 ApplyUpdatesUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: ApplyUpdatesUnauthorizedData; - - constructor( - err: ApplyUpdatesUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "ApplyUpdatesUnauthorized"; - } -} - -export type ApplyUpdatesErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 ApplyUpdatesBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: ApplyUpdatesBadRequestData; - - constructor( - err: ApplyUpdatesBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "ApplyUpdatesBadRequest"; - } -} - -/** @internal */ -export const ApplyUpdatesUpdaterErrors$inboundSchema: z.ZodType< - ApplyUpdatesUpdaterErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const ApplyUpdatesUpdaterErrors$outboundSchema: z.ZodType< - ApplyUpdatesUpdaterErrors$Outbound, - z.ZodTypeDef, - ApplyUpdatesUpdaterErrors -> = 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 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; -} - -export function applyUpdatesUpdaterErrorsToJSON( - applyUpdatesUpdaterErrors: ApplyUpdatesUpdaterErrors, -): string { - return JSON.stringify( - ApplyUpdatesUpdaterErrors$outboundSchema.parse(applyUpdatesUpdaterErrors), - ); -} - -export function applyUpdatesUpdaterErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ApplyUpdatesUpdaterErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ApplyUpdatesUpdaterErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new ApplyUpdatesUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type ApplyUpdatesUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const ApplyUpdatesErrors$outboundSchema: z.ZodType< - ApplyUpdatesErrors$Outbound, - z.ZodTypeDef, - ApplyUpdatesErrors -> = 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 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; -} - -export function applyUpdatesErrorsToJSON( - applyUpdatesErrors: ApplyUpdatesErrors, -): string { - return JSON.stringify( - ApplyUpdatesErrors$outboundSchema.parse(applyUpdatesErrors), - ); -} - -export function applyUpdatesErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ApplyUpdatesErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ApplyUpdatesErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new ApplyUpdatesBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type ApplyUpdatesBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 48761ee4..00000000 --- a/src/sdk/models/errors/cancelserveractivities.ts +++ /dev/null @@ -1,353 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type CancelServerActivitiesActivitiesErrors = { - 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 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 CancelServerActivitiesUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: CancelServerActivitiesUnauthorizedData; - - constructor( - err: CancelServerActivitiesUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "CancelServerActivitiesUnauthorized"; - } -} - -export type CancelServerActivitiesErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 CancelServerActivitiesBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: CancelServerActivitiesBadRequestData; - - constructor( - err: CancelServerActivitiesBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "CancelServerActivitiesBadRequest"; - } -} - -/** @internal */ -export const CancelServerActivitiesActivitiesErrors$inboundSchema: z.ZodType< - CancelServerActivitiesActivitiesErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const CancelServerActivitiesActivitiesErrors$outboundSchema: z.ZodType< - CancelServerActivitiesActivitiesErrors$Outbound, - z.ZodTypeDef, - CancelServerActivitiesActivitiesErrors -> = 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 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; -} - -export function cancelServerActivitiesActivitiesErrorsToJSON( - cancelServerActivitiesActivitiesErrors: - CancelServerActivitiesActivitiesErrors, -): string { - return JSON.stringify( - CancelServerActivitiesActivitiesErrors$outboundSchema.parse( - cancelServerActivitiesActivitiesErrors, - ), - ); -} - -export function cancelServerActivitiesActivitiesErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - CancelServerActivitiesActivitiesErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CancelServerActivitiesActivitiesErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new CancelServerActivitiesUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type CancelServerActivitiesUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const CancelServerActivitiesErrors$outboundSchema: z.ZodType< - CancelServerActivitiesErrors$Outbound, - z.ZodTypeDef, - CancelServerActivitiesErrors -> = 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 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; -} - -export function cancelServerActivitiesErrorsToJSON( - cancelServerActivitiesErrors: CancelServerActivitiesErrors, -): string { - return JSON.stringify( - CancelServerActivitiesErrors$outboundSchema.parse( - cancelServerActivitiesErrors, - ), - ); -} - -export function cancelServerActivitiesErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CancelServerActivitiesErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CancelServerActivitiesErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new CancelServerActivitiesBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type CancelServerActivitiesBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 2e8b3737..00000000 --- a/src/sdk/models/errors/checkforupdates.ts +++ /dev/null @@ -1,343 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type CheckForUpdatesUpdaterErrors = { - 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 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 CheckForUpdatesUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: CheckForUpdatesUnauthorizedData; - - constructor( - err: CheckForUpdatesUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "CheckForUpdatesUnauthorized"; - } -} - -export type CheckForUpdatesErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 CheckForUpdatesBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: CheckForUpdatesBadRequestData; - - constructor( - err: CheckForUpdatesBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "CheckForUpdatesBadRequest"; - } -} - -/** @internal */ -export const CheckForUpdatesUpdaterErrors$inboundSchema: z.ZodType< - CheckForUpdatesUpdaterErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const CheckForUpdatesUpdaterErrors$outboundSchema: z.ZodType< - CheckForUpdatesUpdaterErrors$Outbound, - z.ZodTypeDef, - CheckForUpdatesUpdaterErrors -> = 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 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; -} - -export function checkForUpdatesUpdaterErrorsToJSON( - checkForUpdatesUpdaterErrors: CheckForUpdatesUpdaterErrors, -): string { - return JSON.stringify( - CheckForUpdatesUpdaterErrors$outboundSchema.parse( - checkForUpdatesUpdaterErrors, - ), - ); -} - -export function checkForUpdatesUpdaterErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CheckForUpdatesUpdaterErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CheckForUpdatesUpdaterErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new CheckForUpdatesUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type CheckForUpdatesUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const CheckForUpdatesErrors$outboundSchema: z.ZodType< - CheckForUpdatesErrors$Outbound, - z.ZodTypeDef, - CheckForUpdatesErrors -> = 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 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; -} - -export function checkForUpdatesErrorsToJSON( - checkForUpdatesErrors: CheckForUpdatesErrors, -): string { - return JSON.stringify( - CheckForUpdatesErrors$outboundSchema.parse(checkForUpdatesErrors), - ); -} - -export function checkForUpdatesErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CheckForUpdatesErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CheckForUpdatesErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new CheckForUpdatesBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type CheckForUpdatesBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 7c72052f..00000000 --- a/src/sdk/models/errors/clearplaylistcontents.ts +++ /dev/null @@ -1,352 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type ClearPlaylistContentsPlaylistsErrors = { - 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 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 ClearPlaylistContentsUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: ClearPlaylistContentsUnauthorizedData; - - constructor( - err: ClearPlaylistContentsUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "ClearPlaylistContentsUnauthorized"; - } -} - -export type ClearPlaylistContentsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 ClearPlaylistContentsBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: ClearPlaylistContentsBadRequestData; - - constructor( - err: ClearPlaylistContentsBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "ClearPlaylistContentsBadRequest"; - } -} - -/** @internal */ -export const ClearPlaylistContentsPlaylistsErrors$inboundSchema: z.ZodType< - ClearPlaylistContentsPlaylistsErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const ClearPlaylistContentsPlaylistsErrors$outboundSchema: z.ZodType< - ClearPlaylistContentsPlaylistsErrors$Outbound, - z.ZodTypeDef, - ClearPlaylistContentsPlaylistsErrors -> = 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 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; -} - -export function clearPlaylistContentsPlaylistsErrorsToJSON( - clearPlaylistContentsPlaylistsErrors: ClearPlaylistContentsPlaylistsErrors, -): string { - return JSON.stringify( - ClearPlaylistContentsPlaylistsErrors$outboundSchema.parse( - clearPlaylistContentsPlaylistsErrors, - ), - ); -} - -export function clearPlaylistContentsPlaylistsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - ClearPlaylistContentsPlaylistsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ClearPlaylistContentsPlaylistsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new ClearPlaylistContentsUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type ClearPlaylistContentsUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const ClearPlaylistContentsErrors$outboundSchema: z.ZodType< - ClearPlaylistContentsErrors$Outbound, - z.ZodTypeDef, - ClearPlaylistContentsErrors -> = 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 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; -} - -export function clearPlaylistContentsErrorsToJSON( - clearPlaylistContentsErrors: ClearPlaylistContentsErrors, -): string { - return JSON.stringify( - ClearPlaylistContentsErrors$outboundSchema.parse( - clearPlaylistContentsErrors, - ), - ); -} - -export function clearPlaylistContentsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ClearPlaylistContentsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ClearPlaylistContentsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new ClearPlaylistContentsBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type ClearPlaylistContentsBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 2d476941..00000000 --- a/src/sdk/models/errors/createplaylist.ts +++ /dev/null @@ -1,344 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type CreatePlaylistPlaylistsErrors = { - 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 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 CreatePlaylistUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: CreatePlaylistUnauthorizedData; - - constructor( - err: CreatePlaylistUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "CreatePlaylistUnauthorized"; - } -} - -export type CreatePlaylistErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 CreatePlaylistBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: CreatePlaylistBadRequestData; - - constructor( - err: CreatePlaylistBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "CreatePlaylistBadRequest"; - } -} - -/** @internal */ -export const CreatePlaylistPlaylistsErrors$inboundSchema: z.ZodType< - CreatePlaylistPlaylistsErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const CreatePlaylistPlaylistsErrors$outboundSchema: z.ZodType< - CreatePlaylistPlaylistsErrors$Outbound, - z.ZodTypeDef, - CreatePlaylistPlaylistsErrors -> = 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 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; -} - -export function createPlaylistPlaylistsErrorsToJSON( - createPlaylistPlaylistsErrors: CreatePlaylistPlaylistsErrors, -): string { - return JSON.stringify( - CreatePlaylistPlaylistsErrors$outboundSchema.parse( - createPlaylistPlaylistsErrors, - ), - ); -} - -export function createPlaylistPlaylistsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreatePlaylistPlaylistsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreatePlaylistPlaylistsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new CreatePlaylistUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type CreatePlaylistUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const CreatePlaylistErrors$outboundSchema: z.ZodType< - CreatePlaylistErrors$Outbound, - z.ZodTypeDef, - CreatePlaylistErrors -> = 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 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; -} - -export function createPlaylistErrorsToJSON( - createPlaylistErrors: CreatePlaylistErrors, -): string { - return JSON.stringify( - CreatePlaylistErrors$outboundSchema.parse(createPlaylistErrors), - ); -} - -export function createPlaylistErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreatePlaylistErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreatePlaylistErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new CreatePlaylistBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type CreatePlaylistBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 01f6be1e..00000000 --- a/src/sdk/models/errors/deletelibrary.ts +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type DeleteLibraryLibraryErrors = { - 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 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 DeleteLibraryUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: DeleteLibraryUnauthorizedData; - - constructor( - err: DeleteLibraryUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "DeleteLibraryUnauthorized"; - } -} - -export type DeleteLibraryErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 DeleteLibraryBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: DeleteLibraryBadRequestData; - - constructor( - err: DeleteLibraryBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "DeleteLibraryBadRequest"; - } -} - -/** @internal */ -export const DeleteLibraryLibraryErrors$inboundSchema: z.ZodType< - DeleteLibraryLibraryErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const DeleteLibraryLibraryErrors$outboundSchema: z.ZodType< - DeleteLibraryLibraryErrors$Outbound, - z.ZodTypeDef, - DeleteLibraryLibraryErrors -> = 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 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; -} - -export function deleteLibraryLibraryErrorsToJSON( - deleteLibraryLibraryErrors: DeleteLibraryLibraryErrors, -): string { - return JSON.stringify( - DeleteLibraryLibraryErrors$outboundSchema.parse(deleteLibraryLibraryErrors), - ); -} - -export function deleteLibraryLibraryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DeleteLibraryLibraryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeleteLibraryLibraryErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new DeleteLibraryUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type DeleteLibraryUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const DeleteLibraryErrors$outboundSchema: z.ZodType< - DeleteLibraryErrors$Outbound, - z.ZodTypeDef, - DeleteLibraryErrors -> = 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 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; -} - -export function deleteLibraryErrorsToJSON( - deleteLibraryErrors: DeleteLibraryErrors, -): string { - return JSON.stringify( - DeleteLibraryErrors$outboundSchema.parse(deleteLibraryErrors), - ); -} - -export function deleteLibraryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DeleteLibraryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeleteLibraryErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new DeleteLibraryBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type DeleteLibraryBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 1dc55b44..00000000 --- a/src/sdk/models/errors/deleteplaylist.ts +++ /dev/null @@ -1,344 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type DeletePlaylistPlaylistsErrors = { - 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 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 DeletePlaylistUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: DeletePlaylistUnauthorizedData; - - constructor( - err: DeletePlaylistUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "DeletePlaylistUnauthorized"; - } -} - -export type DeletePlaylistErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 DeletePlaylistBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: DeletePlaylistBadRequestData; - - constructor( - err: DeletePlaylistBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "DeletePlaylistBadRequest"; - } -} - -/** @internal */ -export const DeletePlaylistPlaylistsErrors$inboundSchema: z.ZodType< - DeletePlaylistPlaylistsErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const DeletePlaylistPlaylistsErrors$outboundSchema: z.ZodType< - DeletePlaylistPlaylistsErrors$Outbound, - z.ZodTypeDef, - DeletePlaylistPlaylistsErrors -> = 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 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; -} - -export function deletePlaylistPlaylistsErrorsToJSON( - deletePlaylistPlaylistsErrors: DeletePlaylistPlaylistsErrors, -): string { - return JSON.stringify( - DeletePlaylistPlaylistsErrors$outboundSchema.parse( - deletePlaylistPlaylistsErrors, - ), - ); -} - -export function deletePlaylistPlaylistsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DeletePlaylistPlaylistsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeletePlaylistPlaylistsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new DeletePlaylistUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type DeletePlaylistUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const DeletePlaylistErrors$outboundSchema: z.ZodType< - DeletePlaylistErrors$Outbound, - z.ZodTypeDef, - DeletePlaylistErrors -> = 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 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; -} - -export function deletePlaylistErrorsToJSON( - deletePlaylistErrors: DeletePlaylistErrors, -): string { - return JSON.stringify( - DeletePlaylistErrors$outboundSchema.parse(deletePlaylistErrors), - ); -} - -export function deletePlaylistErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DeletePlaylistErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeletePlaylistErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new DeletePlaylistBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type DeletePlaylistBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 7557e18d..00000000 --- a/src/sdk/models/errors/enablepapertrail.ts +++ /dev/null @@ -1,342 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type EnablePaperTrailLogErrors = { - 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 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 EnablePaperTrailUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: EnablePaperTrailUnauthorizedData; - - constructor( - err: EnablePaperTrailUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "EnablePaperTrailUnauthorized"; - } -} - -export type EnablePaperTrailErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 EnablePaperTrailBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: EnablePaperTrailBadRequestData; - - constructor( - err: EnablePaperTrailBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "EnablePaperTrailBadRequest"; - } -} - -/** @internal */ -export const EnablePaperTrailLogErrors$inboundSchema: z.ZodType< - EnablePaperTrailLogErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const EnablePaperTrailLogErrors$outboundSchema: z.ZodType< - EnablePaperTrailLogErrors$Outbound, - z.ZodTypeDef, - EnablePaperTrailLogErrors -> = 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 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; -} - -export function enablePaperTrailLogErrorsToJSON( - enablePaperTrailLogErrors: EnablePaperTrailLogErrors, -): string { - return JSON.stringify( - EnablePaperTrailLogErrors$outboundSchema.parse(enablePaperTrailLogErrors), - ); -} - -export function enablePaperTrailLogErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => EnablePaperTrailLogErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'EnablePaperTrailLogErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new EnablePaperTrailUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type EnablePaperTrailUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const EnablePaperTrailErrors$outboundSchema: z.ZodType< - EnablePaperTrailErrors$Outbound, - z.ZodTypeDef, - EnablePaperTrailErrors -> = 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 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; -} - -export function enablePaperTrailErrorsToJSON( - enablePaperTrailErrors: EnablePaperTrailErrors, -): string { - return JSON.stringify( - EnablePaperTrailErrors$outboundSchema.parse(enablePaperTrailErrors), - ); -} - -export function enablePaperTrailErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => EnablePaperTrailErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'EnablePaperTrailErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new EnablePaperTrailBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type EnablePaperTrailBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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/getactorslibrary.ts b/src/sdk/models/errors/getactorslibrary.ts deleted file mode 100644 index 99ffbf05..00000000 --- a/src/sdk/models/errors/getactorslibrary.ts +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetActorsLibraryLibraryErrors = { - 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 GetActorsLibraryUnauthorizedData = { - 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 GetActorsLibraryUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetActorsLibraryUnauthorizedData; - - constructor( - err: GetActorsLibraryUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetActorsLibraryUnauthorized"; - } -} - -export type GetActorsLibraryErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -export type GetActorsLibraryBadRequestData = { - 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 GetActorsLibraryBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetActorsLibraryBadRequestData; - - constructor( - err: GetActorsLibraryBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetActorsLibraryBadRequest"; - } -} - -/** @internal */ -export const GetActorsLibraryLibraryErrors$inboundSchema: z.ZodType< - GetActorsLibraryLibraryErrors, - z.ZodTypeDef, - unknown -> = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), -}); - -/** @internal */ -export type GetActorsLibraryLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** @internal */ -export const GetActorsLibraryLibraryErrors$outboundSchema: z.ZodType< - GetActorsLibraryLibraryErrors$Outbound, - z.ZodTypeDef, - GetActorsLibraryLibraryErrors -> = 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 GetActorsLibraryLibraryErrors$ { - /** @deprecated use `GetActorsLibraryLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = GetActorsLibraryLibraryErrors$inboundSchema; - /** @deprecated use `GetActorsLibraryLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = GetActorsLibraryLibraryErrors$outboundSchema; - /** @deprecated use `GetActorsLibraryLibraryErrors$Outbound` instead. */ - export type Outbound = GetActorsLibraryLibraryErrors$Outbound; -} - -export function getActorsLibraryLibraryErrorsToJSON( - getActorsLibraryLibraryErrors: GetActorsLibraryLibraryErrors, -): string { - return JSON.stringify( - GetActorsLibraryLibraryErrors$outboundSchema.parse( - getActorsLibraryLibraryErrors, - ), - ); -} - -export function getActorsLibraryLibraryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetActorsLibraryLibraryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetActorsLibraryLibraryErrors' from JSON`, - ); -} - -/** @internal */ -export const GetActorsLibraryUnauthorized$inboundSchema: z.ZodType< - GetActorsLibraryUnauthorized, - z.ZodTypeDef, - unknown -> = z.object({ - errors: z.array(z.lazy(() => GetActorsLibraryLibraryErrors$inboundSchema)) - .optional(), - RawResponse: z.instanceof(Response).optional(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetActorsLibraryUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetActorsLibraryUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -export const GetActorsLibraryUnauthorized$outboundSchema: z.ZodType< - GetActorsLibraryUnauthorized$Outbound, - z.ZodTypeDef, - GetActorsLibraryUnauthorized -> = z.instanceof(GetActorsLibraryUnauthorized) - .transform(v => v.data$) - .pipe( - z.object({ - errors: z.array( - z.lazy(() => GetActorsLibraryLibraryErrors$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 GetActorsLibraryUnauthorized$ { - /** @deprecated use `GetActorsLibraryUnauthorized$inboundSchema` instead. */ - export const inboundSchema = GetActorsLibraryUnauthorized$inboundSchema; - /** @deprecated use `GetActorsLibraryUnauthorized$outboundSchema` instead. */ - export const outboundSchema = GetActorsLibraryUnauthorized$outboundSchema; - /** @deprecated use `GetActorsLibraryUnauthorized$Outbound` instead. */ - export type Outbound = GetActorsLibraryUnauthorized$Outbound; -} - -/** @internal */ -export const GetActorsLibraryErrors$inboundSchema: z.ZodType< - GetActorsLibraryErrors, - z.ZodTypeDef, - unknown -> = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), -}); - -/** @internal */ -export type GetActorsLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** @internal */ -export const GetActorsLibraryErrors$outboundSchema: z.ZodType< - GetActorsLibraryErrors$Outbound, - z.ZodTypeDef, - GetActorsLibraryErrors -> = 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 GetActorsLibraryErrors$ { - /** @deprecated use `GetActorsLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = GetActorsLibraryErrors$inboundSchema; - /** @deprecated use `GetActorsLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = GetActorsLibraryErrors$outboundSchema; - /** @deprecated use `GetActorsLibraryErrors$Outbound` instead. */ - export type Outbound = GetActorsLibraryErrors$Outbound; -} - -export function getActorsLibraryErrorsToJSON( - getActorsLibraryErrors: GetActorsLibraryErrors, -): string { - return JSON.stringify( - GetActorsLibraryErrors$outboundSchema.parse(getActorsLibraryErrors), - ); -} - -export function getActorsLibraryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetActorsLibraryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetActorsLibraryErrors' from JSON`, - ); -} - -/** @internal */ -export const GetActorsLibraryBadRequest$inboundSchema: z.ZodType< - GetActorsLibraryBadRequest, - z.ZodTypeDef, - unknown -> = z.object({ - errors: z.array(z.lazy(() => GetActorsLibraryErrors$inboundSchema)) - .optional(), - RawResponse: z.instanceof(Response).optional(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetActorsLibraryBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetActorsLibraryBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -export const GetActorsLibraryBadRequest$outboundSchema: z.ZodType< - GetActorsLibraryBadRequest$Outbound, - z.ZodTypeDef, - GetActorsLibraryBadRequest -> = z.instanceof(GetActorsLibraryBadRequest) - .transform(v => v.data$) - .pipe( - z.object({ - errors: z.array(z.lazy(() => GetActorsLibraryErrors$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 GetActorsLibraryBadRequest$ { - /** @deprecated use `GetActorsLibraryBadRequest$inboundSchema` instead. */ - export const inboundSchema = GetActorsLibraryBadRequest$inboundSchema; - /** @deprecated use `GetActorsLibraryBadRequest$outboundSchema` instead. */ - export const outboundSchema = GetActorsLibraryBadRequest$outboundSchema; - /** @deprecated use `GetActorsLibraryBadRequest$Outbound` instead. */ - export type Outbound = GetActorsLibraryBadRequest$Outbound; -} diff --git a/src/sdk/models/errors/getalllibraries.ts b/src/sdk/models/errors/getalllibraries.ts deleted file mode 100644 index 309a0c42..00000000 --- a/src/sdk/models/errors/getalllibraries.ts +++ /dev/null @@ -1,343 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetAllLibrariesLibraryErrors = { - 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 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 GetAllLibrariesUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetAllLibrariesUnauthorizedData; - - constructor( - err: GetAllLibrariesUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetAllLibrariesUnauthorized"; - } -} - -export type GetAllLibrariesErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetAllLibrariesBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetAllLibrariesBadRequestData; - - constructor( - err: GetAllLibrariesBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetAllLibrariesBadRequest"; - } -} - -/** @internal */ -export const GetAllLibrariesLibraryErrors$inboundSchema: z.ZodType< - GetAllLibrariesLibraryErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetAllLibrariesLibraryErrors$outboundSchema: z.ZodType< - GetAllLibrariesLibraryErrors$Outbound, - z.ZodTypeDef, - GetAllLibrariesLibraryErrors -> = 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 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; -} - -export function getAllLibrariesLibraryErrorsToJSON( - getAllLibrariesLibraryErrors: GetAllLibrariesLibraryErrors, -): string { - return JSON.stringify( - GetAllLibrariesLibraryErrors$outboundSchema.parse( - getAllLibrariesLibraryErrors, - ), - ); -} - -export function getAllLibrariesLibraryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetAllLibrariesLibraryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetAllLibrariesLibraryErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetAllLibrariesUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetAllLibrariesUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetAllLibrariesErrors$outboundSchema: z.ZodType< - GetAllLibrariesErrors$Outbound, - z.ZodTypeDef, - GetAllLibrariesErrors -> = 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 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; -} - -export function getAllLibrariesErrorsToJSON( - getAllLibrariesErrors: GetAllLibrariesErrors, -): string { - return JSON.stringify( - GetAllLibrariesErrors$outboundSchema.parse(getAllLibrariesErrors), - ); -} - -export function getAllLibrariesErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetAllLibrariesErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetAllLibrariesErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetAllLibrariesBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetAllLibrariesBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 4be30c70..00000000 --- a/src/sdk/models/errors/getavailableclients.ts +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetAvailableClientsServerErrors = { - 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 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 GetAvailableClientsUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetAvailableClientsUnauthorizedData; - - constructor( - err: GetAvailableClientsUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetAvailableClientsUnauthorized"; - } -} - -export type GetAvailableClientsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetAvailableClientsBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetAvailableClientsBadRequestData; - - constructor( - err: GetAvailableClientsBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetAvailableClientsBadRequest"; - } -} - -/** @internal */ -export const GetAvailableClientsServerErrors$inboundSchema: z.ZodType< - GetAvailableClientsServerErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetAvailableClientsServerErrors$outboundSchema: z.ZodType< - GetAvailableClientsServerErrors$Outbound, - z.ZodTypeDef, - GetAvailableClientsServerErrors -> = 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 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; -} - -export function getAvailableClientsServerErrorsToJSON( - getAvailableClientsServerErrors: GetAvailableClientsServerErrors, -): string { - return JSON.stringify( - GetAvailableClientsServerErrors$outboundSchema.parse( - getAvailableClientsServerErrors, - ), - ); -} - -export function getAvailableClientsServerErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetAvailableClientsServerErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetAvailableClientsServerErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetAvailableClientsUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetAvailableClientsUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetAvailableClientsErrors$outboundSchema: z.ZodType< - GetAvailableClientsErrors$Outbound, - z.ZodTypeDef, - GetAvailableClientsErrors -> = 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 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; -} - -export function getAvailableClientsErrorsToJSON( - getAvailableClientsErrors: GetAvailableClientsErrors, -): string { - return JSON.stringify( - GetAvailableClientsErrors$outboundSchema.parse(getAvailableClientsErrors), - ); -} - -export function getAvailableClientsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetAvailableClientsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetAvailableClientsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetAvailableClientsBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetAvailableClientsBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index ac493c3a..00000000 --- a/src/sdk/models/errors/getbandwidthstatistics.ts +++ /dev/null @@ -1,353 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetBandwidthStatisticsStatisticsErrors = { - 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 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 GetBandwidthStatisticsUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetBandwidthStatisticsUnauthorizedData; - - constructor( - err: GetBandwidthStatisticsUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetBandwidthStatisticsUnauthorized"; - } -} - -export type GetBandwidthStatisticsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetBandwidthStatisticsBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetBandwidthStatisticsBadRequestData; - - constructor( - err: GetBandwidthStatisticsBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetBandwidthStatisticsBadRequest"; - } -} - -/** @internal */ -export const GetBandwidthStatisticsStatisticsErrors$inboundSchema: z.ZodType< - GetBandwidthStatisticsStatisticsErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetBandwidthStatisticsStatisticsErrors$outboundSchema: z.ZodType< - GetBandwidthStatisticsStatisticsErrors$Outbound, - z.ZodTypeDef, - GetBandwidthStatisticsStatisticsErrors -> = 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 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; -} - -export function getBandwidthStatisticsStatisticsErrorsToJSON( - getBandwidthStatisticsStatisticsErrors: - GetBandwidthStatisticsStatisticsErrors, -): string { - return JSON.stringify( - GetBandwidthStatisticsStatisticsErrors$outboundSchema.parse( - getBandwidthStatisticsStatisticsErrors, - ), - ); -} - -export function getBandwidthStatisticsStatisticsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - GetBandwidthStatisticsStatisticsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetBandwidthStatisticsStatisticsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetBandwidthStatisticsUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetBandwidthStatisticsUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetBandwidthStatisticsErrors$outboundSchema: z.ZodType< - GetBandwidthStatisticsErrors$Outbound, - z.ZodTypeDef, - GetBandwidthStatisticsErrors -> = 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 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; -} - -export function getBandwidthStatisticsErrorsToJSON( - getBandwidthStatisticsErrors: GetBandwidthStatisticsErrors, -): string { - return JSON.stringify( - GetBandwidthStatisticsErrors$outboundSchema.parse( - getBandwidthStatisticsErrors, - ), - ); -} - -export function getBandwidthStatisticsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetBandwidthStatisticsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetBandwidthStatisticsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetBandwidthStatisticsBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetBandwidthStatisticsBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 102f0e44..00000000 --- a/src/sdk/models/errors/getbannerimage.ts +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetBannerImageMediaErrors = { - 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 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 GetBannerImageUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetBannerImageUnauthorizedData; - - constructor( - err: GetBannerImageUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetBannerImageUnauthorized"; - } -} - -export type GetBannerImageErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetBannerImageBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetBannerImageBadRequestData; - - constructor( - err: GetBannerImageBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetBannerImageBadRequest"; - } -} - -/** @internal */ -export const GetBannerImageMediaErrors$inboundSchema: z.ZodType< - GetBannerImageMediaErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetBannerImageMediaErrors$outboundSchema: z.ZodType< - GetBannerImageMediaErrors$Outbound, - z.ZodTypeDef, - GetBannerImageMediaErrors -> = 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 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; -} - -export function getBannerImageMediaErrorsToJSON( - getBannerImageMediaErrors: GetBannerImageMediaErrors, -): string { - return JSON.stringify( - GetBannerImageMediaErrors$outboundSchema.parse(getBannerImageMediaErrors), - ); -} - -export function getBannerImageMediaErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetBannerImageMediaErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetBannerImageMediaErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetBannerImageUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetBannerImageUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetBannerImageErrors$outboundSchema: z.ZodType< - GetBannerImageErrors$Outbound, - z.ZodTypeDef, - GetBannerImageErrors -> = 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 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; -} - -export function getBannerImageErrorsToJSON( - getBannerImageErrors: GetBannerImageErrors, -): string { - return JSON.stringify( - GetBannerImageErrors$outboundSchema.parse(getBannerImageErrors), - ); -} - -export function getBannerImageErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetBannerImageErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetBannerImageErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetBannerImageBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetBannerImageBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 0e1bbea8..00000000 --- a/src/sdk/models/errors/getbutlertasks.ts +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetButlerTasksButlerErrors = { - 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 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 GetButlerTasksUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetButlerTasksUnauthorizedData; - - constructor( - err: GetButlerTasksUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetButlerTasksUnauthorized"; - } -} - -export type GetButlerTasksErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetButlerTasksBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetButlerTasksBadRequestData; - - constructor( - err: GetButlerTasksBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetButlerTasksBadRequest"; - } -} - -/** @internal */ -export const GetButlerTasksButlerErrors$inboundSchema: z.ZodType< - GetButlerTasksButlerErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetButlerTasksButlerErrors$outboundSchema: z.ZodType< - GetButlerTasksButlerErrors$Outbound, - z.ZodTypeDef, - GetButlerTasksButlerErrors -> = 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 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; -} - -export function getButlerTasksButlerErrorsToJSON( - getButlerTasksButlerErrors: GetButlerTasksButlerErrors, -): string { - return JSON.stringify( - GetButlerTasksButlerErrors$outboundSchema.parse(getButlerTasksButlerErrors), - ); -} - -export function getButlerTasksButlerErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetButlerTasksButlerErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetButlerTasksButlerErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetButlerTasksUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetButlerTasksUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetButlerTasksErrors$outboundSchema: z.ZodType< - GetButlerTasksErrors$Outbound, - z.ZodTypeDef, - GetButlerTasksErrors -> = 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 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; -} - -export function getButlerTasksErrorsToJSON( - getButlerTasksErrors: GetButlerTasksErrors, -): string { - return JSON.stringify( - GetButlerTasksErrors$outboundSchema.parse(getButlerTasksErrors), - ); -} - -export function getButlerTasksErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetButlerTasksErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetButlerTasksErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetButlerTasksBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetButlerTasksBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 84f6517f..00000000 --- a/src/sdk/models/errors/getcompanionsdata.ts +++ /dev/null @@ -1,344 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetCompanionsDataPlexErrors = { - 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 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 GetCompanionsDataUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetCompanionsDataUnauthorizedData; - - constructor( - err: GetCompanionsDataUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetCompanionsDataUnauthorized"; - } -} - -export type GetCompanionsDataErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetCompanionsDataBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetCompanionsDataBadRequestData; - - constructor( - err: GetCompanionsDataBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetCompanionsDataBadRequest"; - } -} - -/** @internal */ -export const GetCompanionsDataPlexErrors$inboundSchema: z.ZodType< - GetCompanionsDataPlexErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetCompanionsDataPlexErrors$outboundSchema: z.ZodType< - GetCompanionsDataPlexErrors$Outbound, - z.ZodTypeDef, - GetCompanionsDataPlexErrors -> = 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 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; -} - -export function getCompanionsDataPlexErrorsToJSON( - getCompanionsDataPlexErrors: GetCompanionsDataPlexErrors, -): string { - return JSON.stringify( - GetCompanionsDataPlexErrors$outboundSchema.parse( - getCompanionsDataPlexErrors, - ), - ); -} - -export function getCompanionsDataPlexErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetCompanionsDataPlexErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetCompanionsDataPlexErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetCompanionsDataUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetCompanionsDataUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetCompanionsDataErrors$outboundSchema: z.ZodType< - GetCompanionsDataErrors$Outbound, - z.ZodTypeDef, - GetCompanionsDataErrors -> = 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 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; -} - -export function getCompanionsDataErrorsToJSON( - getCompanionsDataErrors: GetCompanionsDataErrors, -): string { - return JSON.stringify( - GetCompanionsDataErrors$outboundSchema.parse(getCompanionsDataErrors), - ); -} - -export function getCompanionsDataErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetCompanionsDataErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetCompanionsDataErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetCompanionsDataBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetCompanionsDataBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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/getcountrieslibrary.ts b/src/sdk/models/errors/getcountrieslibrary.ts deleted file mode 100644 index df0f9ca2..00000000 --- a/src/sdk/models/errors/getcountrieslibrary.ts +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetCountriesLibraryLibraryErrors = { - 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 GetCountriesLibraryUnauthorizedData = { - 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 GetCountriesLibraryUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetCountriesLibraryUnauthorizedData; - - constructor( - err: GetCountriesLibraryUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetCountriesLibraryUnauthorized"; - } -} - -export type GetCountriesLibraryErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -export type GetCountriesLibraryBadRequestData = { - 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 GetCountriesLibraryBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetCountriesLibraryBadRequestData; - - constructor( - err: GetCountriesLibraryBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetCountriesLibraryBadRequest"; - } -} - -/** @internal */ -export const GetCountriesLibraryLibraryErrors$inboundSchema: z.ZodType< - GetCountriesLibraryLibraryErrors, - z.ZodTypeDef, - unknown -> = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), -}); - -/** @internal */ -export type GetCountriesLibraryLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** @internal */ -export const GetCountriesLibraryLibraryErrors$outboundSchema: z.ZodType< - GetCountriesLibraryLibraryErrors$Outbound, - z.ZodTypeDef, - GetCountriesLibraryLibraryErrors -> = 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 GetCountriesLibraryLibraryErrors$ { - /** @deprecated use `GetCountriesLibraryLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = GetCountriesLibraryLibraryErrors$inboundSchema; - /** @deprecated use `GetCountriesLibraryLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = GetCountriesLibraryLibraryErrors$outboundSchema; - /** @deprecated use `GetCountriesLibraryLibraryErrors$Outbound` instead. */ - export type Outbound = GetCountriesLibraryLibraryErrors$Outbound; -} - -export function getCountriesLibraryLibraryErrorsToJSON( - getCountriesLibraryLibraryErrors: GetCountriesLibraryLibraryErrors, -): string { - return JSON.stringify( - GetCountriesLibraryLibraryErrors$outboundSchema.parse( - getCountriesLibraryLibraryErrors, - ), - ); -} - -export function getCountriesLibraryLibraryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetCountriesLibraryLibraryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetCountriesLibraryLibraryErrors' from JSON`, - ); -} - -/** @internal */ -export const GetCountriesLibraryUnauthorized$inboundSchema: z.ZodType< - GetCountriesLibraryUnauthorized, - z.ZodTypeDef, - unknown -> = z.object({ - errors: z.array(z.lazy(() => GetCountriesLibraryLibraryErrors$inboundSchema)) - .optional(), - RawResponse: z.instanceof(Response).optional(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetCountriesLibraryUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetCountriesLibraryUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -export const GetCountriesLibraryUnauthorized$outboundSchema: z.ZodType< - GetCountriesLibraryUnauthorized$Outbound, - z.ZodTypeDef, - GetCountriesLibraryUnauthorized -> = z.instanceof(GetCountriesLibraryUnauthorized) - .transform(v => v.data$) - .pipe( - z.object({ - errors: z.array( - z.lazy(() => GetCountriesLibraryLibraryErrors$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 GetCountriesLibraryUnauthorized$ { - /** @deprecated use `GetCountriesLibraryUnauthorized$inboundSchema` instead. */ - export const inboundSchema = GetCountriesLibraryUnauthorized$inboundSchema; - /** @deprecated use `GetCountriesLibraryUnauthorized$outboundSchema` instead. */ - export const outboundSchema = GetCountriesLibraryUnauthorized$outboundSchema; - /** @deprecated use `GetCountriesLibraryUnauthorized$Outbound` instead. */ - export type Outbound = GetCountriesLibraryUnauthorized$Outbound; -} - -/** @internal */ -export const GetCountriesLibraryErrors$inboundSchema: z.ZodType< - GetCountriesLibraryErrors, - z.ZodTypeDef, - unknown -> = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), -}); - -/** @internal */ -export type GetCountriesLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** @internal */ -export const GetCountriesLibraryErrors$outboundSchema: z.ZodType< - GetCountriesLibraryErrors$Outbound, - z.ZodTypeDef, - GetCountriesLibraryErrors -> = 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 GetCountriesLibraryErrors$ { - /** @deprecated use `GetCountriesLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = GetCountriesLibraryErrors$inboundSchema; - /** @deprecated use `GetCountriesLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = GetCountriesLibraryErrors$outboundSchema; - /** @deprecated use `GetCountriesLibraryErrors$Outbound` instead. */ - export type Outbound = GetCountriesLibraryErrors$Outbound; -} - -export function getCountriesLibraryErrorsToJSON( - getCountriesLibraryErrors: GetCountriesLibraryErrors, -): string { - return JSON.stringify( - GetCountriesLibraryErrors$outboundSchema.parse(getCountriesLibraryErrors), - ); -} - -export function getCountriesLibraryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetCountriesLibraryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetCountriesLibraryErrors' from JSON`, - ); -} - -/** @internal */ -export const GetCountriesLibraryBadRequest$inboundSchema: z.ZodType< - GetCountriesLibraryBadRequest, - z.ZodTypeDef, - unknown -> = z.object({ - errors: z.array(z.lazy(() => GetCountriesLibraryErrors$inboundSchema)) - .optional(), - RawResponse: z.instanceof(Response).optional(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetCountriesLibraryBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetCountriesLibraryBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -export const GetCountriesLibraryBadRequest$outboundSchema: z.ZodType< - GetCountriesLibraryBadRequest$Outbound, - z.ZodTypeDef, - GetCountriesLibraryBadRequest -> = z.instanceof(GetCountriesLibraryBadRequest) - .transform(v => v.data$) - .pipe( - z.object({ - errors: z.array(z.lazy(() => GetCountriesLibraryErrors$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 GetCountriesLibraryBadRequest$ { - /** @deprecated use `GetCountriesLibraryBadRequest$inboundSchema` instead. */ - export const inboundSchema = GetCountriesLibraryBadRequest$inboundSchema; - /** @deprecated use `GetCountriesLibraryBadRequest$outboundSchema` instead. */ - export const outboundSchema = GetCountriesLibraryBadRequest$outboundSchema; - /** @deprecated use `GetCountriesLibraryBadRequest$Outbound` instead. */ - export type Outbound = GetCountriesLibraryBadRequest$Outbound; -} diff --git a/src/sdk/models/errors/getdevices.ts b/src/sdk/models/errors/getdevices.ts deleted file mode 100644 index 966100f6..00000000 --- a/src/sdk/models/errors/getdevices.ts +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetDevicesServerErrors = { - 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 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 GetDevicesUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetDevicesUnauthorizedData; - - constructor( - err: GetDevicesUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetDevicesUnauthorized"; - } -} - -export type GetDevicesErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetDevicesBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetDevicesBadRequestData; - - constructor( - err: GetDevicesBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetDevicesBadRequest"; - } -} - -/** @internal */ -export const GetDevicesServerErrors$inboundSchema: z.ZodType< - GetDevicesServerErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetDevicesServerErrors$outboundSchema: z.ZodType< - GetDevicesServerErrors$Outbound, - z.ZodTypeDef, - GetDevicesServerErrors -> = 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 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; -} - -export function getDevicesServerErrorsToJSON( - getDevicesServerErrors: GetDevicesServerErrors, -): string { - return JSON.stringify( - GetDevicesServerErrors$outboundSchema.parse(getDevicesServerErrors), - ); -} - -export function getDevicesServerErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetDevicesServerErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetDevicesServerErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetDevicesUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetDevicesUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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< - 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; -}; - -/** @internal */ -export const GetDevicesErrors$outboundSchema: z.ZodType< - GetDevicesErrors$Outbound, - z.ZodTypeDef, - GetDevicesErrors -> = 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 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; -} - -export function getDevicesErrorsToJSON( - getDevicesErrors: GetDevicesErrors, -): string { - return JSON.stringify( - GetDevicesErrors$outboundSchema.parse(getDevicesErrors), - ); -} - -export function getDevicesErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetDevicesErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetDevicesErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetDevicesBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetDevicesBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 9360bfdb..00000000 --- a/src/sdk/models/errors/getfilehash.ts +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetFileHashLibraryErrors = { - 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 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 GetFileHashUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetFileHashUnauthorizedData; - - constructor( - err: GetFileHashUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetFileHashUnauthorized"; - } -} - -export type GetFileHashErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetFileHashBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetFileHashBadRequestData; - - constructor( - err: GetFileHashBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetFileHashBadRequest"; - } -} - -/** @internal */ -export const GetFileHashLibraryErrors$inboundSchema: z.ZodType< - GetFileHashLibraryErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetFileHashLibraryErrors$outboundSchema: z.ZodType< - GetFileHashLibraryErrors$Outbound, - z.ZodTypeDef, - GetFileHashLibraryErrors -> = 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 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; -} - -export function getFileHashLibraryErrorsToJSON( - getFileHashLibraryErrors: GetFileHashLibraryErrors, -): string { - return JSON.stringify( - GetFileHashLibraryErrors$outboundSchema.parse(getFileHashLibraryErrors), - ); -} - -export function getFileHashLibraryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetFileHashLibraryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetFileHashLibraryErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetFileHashUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetFileHashUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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< - 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; -}; - -/** @internal */ -export const GetFileHashErrors$outboundSchema: z.ZodType< - GetFileHashErrors$Outbound, - z.ZodTypeDef, - GetFileHashErrors -> = 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 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; -} - -export function getFileHashErrorsToJSON( - getFileHashErrors: GetFileHashErrors, -): string { - return JSON.stringify( - GetFileHashErrors$outboundSchema.parse(getFileHashErrors), - ); -} - -export function getFileHashErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetFileHashErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetFileHashErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetFileHashBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetFileHashBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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/getgenreslibrary.ts b/src/sdk/models/errors/getgenreslibrary.ts deleted file mode 100644 index 088f7f09..00000000 --- a/src/sdk/models/errors/getgenreslibrary.ts +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetGenresLibraryLibraryErrors = { - 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 GetGenresLibraryUnauthorizedData = { - 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 GetGenresLibraryUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetGenresLibraryUnauthorizedData; - - constructor( - err: GetGenresLibraryUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetGenresLibraryUnauthorized"; - } -} - -export type GetGenresLibraryErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -export type GetGenresLibraryBadRequestData = { - 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 GetGenresLibraryBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetGenresLibraryBadRequestData; - - constructor( - err: GetGenresLibraryBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetGenresLibraryBadRequest"; - } -} - -/** @internal */ -export const GetGenresLibraryLibraryErrors$inboundSchema: z.ZodType< - GetGenresLibraryLibraryErrors, - z.ZodTypeDef, - unknown -> = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), -}); - -/** @internal */ -export type GetGenresLibraryLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** @internal */ -export const GetGenresLibraryLibraryErrors$outboundSchema: z.ZodType< - GetGenresLibraryLibraryErrors$Outbound, - z.ZodTypeDef, - GetGenresLibraryLibraryErrors -> = 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 GetGenresLibraryLibraryErrors$ { - /** @deprecated use `GetGenresLibraryLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = GetGenresLibraryLibraryErrors$inboundSchema; - /** @deprecated use `GetGenresLibraryLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = GetGenresLibraryLibraryErrors$outboundSchema; - /** @deprecated use `GetGenresLibraryLibraryErrors$Outbound` instead. */ - export type Outbound = GetGenresLibraryLibraryErrors$Outbound; -} - -export function getGenresLibraryLibraryErrorsToJSON( - getGenresLibraryLibraryErrors: GetGenresLibraryLibraryErrors, -): string { - return JSON.stringify( - GetGenresLibraryLibraryErrors$outboundSchema.parse( - getGenresLibraryLibraryErrors, - ), - ); -} - -export function getGenresLibraryLibraryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetGenresLibraryLibraryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetGenresLibraryLibraryErrors' from JSON`, - ); -} - -/** @internal */ -export const GetGenresLibraryUnauthorized$inboundSchema: z.ZodType< - GetGenresLibraryUnauthorized, - z.ZodTypeDef, - unknown -> = z.object({ - errors: z.array(z.lazy(() => GetGenresLibraryLibraryErrors$inboundSchema)) - .optional(), - RawResponse: z.instanceof(Response).optional(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetGenresLibraryUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetGenresLibraryUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -export const GetGenresLibraryUnauthorized$outboundSchema: z.ZodType< - GetGenresLibraryUnauthorized$Outbound, - z.ZodTypeDef, - GetGenresLibraryUnauthorized -> = z.instanceof(GetGenresLibraryUnauthorized) - .transform(v => v.data$) - .pipe( - z.object({ - errors: z.array( - z.lazy(() => GetGenresLibraryLibraryErrors$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 GetGenresLibraryUnauthorized$ { - /** @deprecated use `GetGenresLibraryUnauthorized$inboundSchema` instead. */ - export const inboundSchema = GetGenresLibraryUnauthorized$inboundSchema; - /** @deprecated use `GetGenresLibraryUnauthorized$outboundSchema` instead. */ - export const outboundSchema = GetGenresLibraryUnauthorized$outboundSchema; - /** @deprecated use `GetGenresLibraryUnauthorized$Outbound` instead. */ - export type Outbound = GetGenresLibraryUnauthorized$Outbound; -} - -/** @internal */ -export const GetGenresLibraryErrors$inboundSchema: z.ZodType< - GetGenresLibraryErrors, - z.ZodTypeDef, - unknown -> = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), -}); - -/** @internal */ -export type GetGenresLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** @internal */ -export const GetGenresLibraryErrors$outboundSchema: z.ZodType< - GetGenresLibraryErrors$Outbound, - z.ZodTypeDef, - GetGenresLibraryErrors -> = 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 GetGenresLibraryErrors$ { - /** @deprecated use `GetGenresLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = GetGenresLibraryErrors$inboundSchema; - /** @deprecated use `GetGenresLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = GetGenresLibraryErrors$outboundSchema; - /** @deprecated use `GetGenresLibraryErrors$Outbound` instead. */ - export type Outbound = GetGenresLibraryErrors$Outbound; -} - -export function getGenresLibraryErrorsToJSON( - getGenresLibraryErrors: GetGenresLibraryErrors, -): string { - return JSON.stringify( - GetGenresLibraryErrors$outboundSchema.parse(getGenresLibraryErrors), - ); -} - -export function getGenresLibraryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetGenresLibraryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetGenresLibraryErrors' from JSON`, - ); -} - -/** @internal */ -export const GetGenresLibraryBadRequest$inboundSchema: z.ZodType< - GetGenresLibraryBadRequest, - z.ZodTypeDef, - unknown -> = z.object({ - errors: z.array(z.lazy(() => GetGenresLibraryErrors$inboundSchema)) - .optional(), - RawResponse: z.instanceof(Response).optional(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetGenresLibraryBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetGenresLibraryBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -export const GetGenresLibraryBadRequest$outboundSchema: z.ZodType< - GetGenresLibraryBadRequest$Outbound, - z.ZodTypeDef, - GetGenresLibraryBadRequest -> = z.instanceof(GetGenresLibraryBadRequest) - .transform(v => v.data$) - .pipe( - z.object({ - errors: z.array(z.lazy(() => GetGenresLibraryErrors$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 GetGenresLibraryBadRequest$ { - /** @deprecated use `GetGenresLibraryBadRequest$inboundSchema` instead. */ - export const inboundSchema = GetGenresLibraryBadRequest$inboundSchema; - /** @deprecated use `GetGenresLibraryBadRequest$outboundSchema` instead. */ - export const outboundSchema = GetGenresLibraryBadRequest$outboundSchema; - /** @deprecated use `GetGenresLibraryBadRequest$Outbound` instead. */ - export type Outbound = GetGenresLibraryBadRequest$Outbound; -} diff --git a/src/sdk/models/errors/getgeodata.ts b/src/sdk/models/errors/getgeodata.ts deleted file mode 100644 index c6234616..00000000 --- a/src/sdk/models/errors/getgeodata.ts +++ /dev/null @@ -1,339 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetGeoDataPlexErrors = { - 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 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 GetGeoDataUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetGeoDataUnauthorizedData; - - constructor( - err: GetGeoDataUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetGeoDataUnauthorized"; - } -} - -export type GetGeoDataErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetGeoDataBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetGeoDataBadRequestData; - - constructor( - err: GetGeoDataBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetGeoDataBadRequest"; - } -} - -/** @internal */ -export const GetGeoDataPlexErrors$inboundSchema: z.ZodType< - GetGeoDataPlexErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetGeoDataPlexErrors$outboundSchema: z.ZodType< - GetGeoDataPlexErrors$Outbound, - z.ZodTypeDef, - GetGeoDataPlexErrors -> = 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 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; -} - -export function getGeoDataPlexErrorsToJSON( - getGeoDataPlexErrors: GetGeoDataPlexErrors, -): string { - return JSON.stringify( - GetGeoDataPlexErrors$outboundSchema.parse(getGeoDataPlexErrors), - ); -} - -export function getGeoDataPlexErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetGeoDataPlexErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetGeoDataPlexErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetGeoDataUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetGeoDataUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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< - 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; -}; - -/** @internal */ -export const GetGeoDataErrors$outboundSchema: z.ZodType< - GetGeoDataErrors$Outbound, - z.ZodTypeDef, - GetGeoDataErrors -> = 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 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; -} - -export function getGeoDataErrorsToJSON( - getGeoDataErrors: GetGeoDataErrors, -): string { - return JSON.stringify( - GetGeoDataErrors$outboundSchema.parse(getGeoDataErrors), - ); -} - -export function getGeoDataErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetGeoDataErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetGeoDataErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetGeoDataBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetGeoDataBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 0e1b14c1..00000000 --- a/src/sdk/models/errors/getglobalhubs.ts +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetGlobalHubsHubsErrors = { - 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 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 GetGlobalHubsUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetGlobalHubsUnauthorizedData; - - constructor( - err: GetGlobalHubsUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetGlobalHubsUnauthorized"; - } -} - -export type GetGlobalHubsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetGlobalHubsBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetGlobalHubsBadRequestData; - - constructor( - err: GetGlobalHubsBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetGlobalHubsBadRequest"; - } -} - -/** @internal */ -export const GetGlobalHubsHubsErrors$inboundSchema: z.ZodType< - GetGlobalHubsHubsErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetGlobalHubsHubsErrors$outboundSchema: z.ZodType< - GetGlobalHubsHubsErrors$Outbound, - z.ZodTypeDef, - GetGlobalHubsHubsErrors -> = 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 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; -} - -export function getGlobalHubsHubsErrorsToJSON( - getGlobalHubsHubsErrors: GetGlobalHubsHubsErrors, -): string { - return JSON.stringify( - GetGlobalHubsHubsErrors$outboundSchema.parse(getGlobalHubsHubsErrors), - ); -} - -export function getGlobalHubsHubsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetGlobalHubsHubsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetGlobalHubsHubsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetGlobalHubsUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetGlobalHubsUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetGlobalHubsErrors$outboundSchema: z.ZodType< - GetGlobalHubsErrors$Outbound, - z.ZodTypeDef, - GetGlobalHubsErrors -> = 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 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; -} - -export function getGlobalHubsErrorsToJSON( - getGlobalHubsErrors: GetGlobalHubsErrors, -): string { - return JSON.stringify( - GetGlobalHubsErrors$outboundSchema.parse(getGlobalHubsErrors), - ); -} - -export function getGlobalHubsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetGlobalHubsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetGlobalHubsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetGlobalHubsBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetGlobalHubsBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 8709ca00..00000000 --- a/src/sdk/models/errors/gethomedata.ts +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetHomeDataPlexErrors = { - 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 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 GetHomeDataUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetHomeDataUnauthorizedData; - - constructor( - err: GetHomeDataUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetHomeDataUnauthorized"; - } -} - -export type GetHomeDataErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetHomeDataBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetHomeDataBadRequestData; - - constructor( - err: GetHomeDataBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetHomeDataBadRequest"; - } -} - -/** @internal */ -export const GetHomeDataPlexErrors$inboundSchema: z.ZodType< - GetHomeDataPlexErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetHomeDataPlexErrors$outboundSchema: z.ZodType< - GetHomeDataPlexErrors$Outbound, - z.ZodTypeDef, - GetHomeDataPlexErrors -> = 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 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; -} - -export function getHomeDataPlexErrorsToJSON( - getHomeDataPlexErrors: GetHomeDataPlexErrors, -): string { - return JSON.stringify( - GetHomeDataPlexErrors$outboundSchema.parse(getHomeDataPlexErrors), - ); -} - -export function getHomeDataPlexErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetHomeDataPlexErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetHomeDataPlexErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetHomeDataUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetHomeDataUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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< - 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; -}; - -/** @internal */ -export const GetHomeDataErrors$outboundSchema: z.ZodType< - GetHomeDataErrors$Outbound, - z.ZodTypeDef, - GetHomeDataErrors -> = 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 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; -} - -export function getHomeDataErrorsToJSON( - getHomeDataErrors: GetHomeDataErrors, -): string { - return JSON.stringify( - GetHomeDataErrors$outboundSchema.parse(getHomeDataErrors), - ); -} - -export function getHomeDataErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetHomeDataErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetHomeDataErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetHomeDataBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetHomeDataBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 31210573..00000000 --- a/src/sdk/models/errors/getlibrarydetails.ts +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetLibraryDetailsLibraryErrors = { - 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 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 GetLibraryDetailsUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetLibraryDetailsUnauthorizedData; - - constructor( - err: GetLibraryDetailsUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetLibraryDetailsUnauthorized"; - } -} - -export type GetLibraryDetailsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetLibraryDetailsBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetLibraryDetailsBadRequestData; - - constructor( - err: GetLibraryDetailsBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetLibraryDetailsBadRequest"; - } -} - -/** @internal */ -export const GetLibraryDetailsLibraryErrors$inboundSchema: z.ZodType< - GetLibraryDetailsLibraryErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetLibraryDetailsLibraryErrors$outboundSchema: z.ZodType< - GetLibraryDetailsLibraryErrors$Outbound, - z.ZodTypeDef, - GetLibraryDetailsLibraryErrors -> = 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 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; -} - -export function getLibraryDetailsLibraryErrorsToJSON( - getLibraryDetailsLibraryErrors: GetLibraryDetailsLibraryErrors, -): string { - return JSON.stringify( - GetLibraryDetailsLibraryErrors$outboundSchema.parse( - getLibraryDetailsLibraryErrors, - ), - ); -} - -export function getLibraryDetailsLibraryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetLibraryDetailsLibraryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetLibraryDetailsLibraryErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetLibraryDetailsUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetLibraryDetailsUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetLibraryDetailsErrors$outboundSchema: z.ZodType< - GetLibraryDetailsErrors$Outbound, - z.ZodTypeDef, - GetLibraryDetailsErrors -> = 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 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; -} - -export function getLibraryDetailsErrorsToJSON( - getLibraryDetailsErrors: GetLibraryDetailsErrors, -): string { - return JSON.stringify( - GetLibraryDetailsErrors$outboundSchema.parse(getLibraryDetailsErrors), - ); -} - -export function getLibraryDetailsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetLibraryDetailsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetLibraryDetailsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetLibraryDetailsBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetLibraryDetailsBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index a28910b7..00000000 --- a/src/sdk/models/errors/getlibraryhubs.ts +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetLibraryHubsHubsErrors = { - 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 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 GetLibraryHubsUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetLibraryHubsUnauthorizedData; - - constructor( - err: GetLibraryHubsUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetLibraryHubsUnauthorized"; - } -} - -export type GetLibraryHubsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetLibraryHubsBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetLibraryHubsBadRequestData; - - constructor( - err: GetLibraryHubsBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetLibraryHubsBadRequest"; - } -} - -/** @internal */ -export const GetLibraryHubsHubsErrors$inboundSchema: z.ZodType< - GetLibraryHubsHubsErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetLibraryHubsHubsErrors$outboundSchema: z.ZodType< - GetLibraryHubsHubsErrors$Outbound, - z.ZodTypeDef, - GetLibraryHubsHubsErrors -> = 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 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; -} - -export function getLibraryHubsHubsErrorsToJSON( - getLibraryHubsHubsErrors: GetLibraryHubsHubsErrors, -): string { - return JSON.stringify( - GetLibraryHubsHubsErrors$outboundSchema.parse(getLibraryHubsHubsErrors), - ); -} - -export function getLibraryHubsHubsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetLibraryHubsHubsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetLibraryHubsHubsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetLibraryHubsUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetLibraryHubsUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetLibraryHubsErrors$outboundSchema: z.ZodType< - GetLibraryHubsErrors$Outbound, - z.ZodTypeDef, - GetLibraryHubsErrors -> = 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 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; -} - -export function getLibraryHubsErrorsToJSON( - getLibraryHubsErrors: GetLibraryHubsErrors, -): string { - return JSON.stringify( - GetLibraryHubsErrors$outboundSchema.parse(getLibraryHubsErrors), - ); -} - -export function getLibraryHubsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetLibraryHubsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetLibraryHubsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetLibraryHubsBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetLibraryHubsBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 7dd7ded5..00000000 --- a/src/sdk/models/errors/getlibraryitems.ts +++ /dev/null @@ -1,343 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetLibraryItemsLibraryErrors = { - 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 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 GetLibraryItemsUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetLibraryItemsUnauthorizedData; - - constructor( - err: GetLibraryItemsUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetLibraryItemsUnauthorized"; - } -} - -export type GetLibraryItemsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetLibraryItemsBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetLibraryItemsBadRequestData; - - constructor( - err: GetLibraryItemsBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetLibraryItemsBadRequest"; - } -} - -/** @internal */ -export const GetLibraryItemsLibraryErrors$inboundSchema: z.ZodType< - GetLibraryItemsLibraryErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetLibraryItemsLibraryErrors$outboundSchema: z.ZodType< - GetLibraryItemsLibraryErrors$Outbound, - z.ZodTypeDef, - GetLibraryItemsLibraryErrors -> = 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 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; -} - -export function getLibraryItemsLibraryErrorsToJSON( - getLibraryItemsLibraryErrors: GetLibraryItemsLibraryErrors, -): string { - return JSON.stringify( - GetLibraryItemsLibraryErrors$outboundSchema.parse( - getLibraryItemsLibraryErrors, - ), - ); -} - -export function getLibraryItemsLibraryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetLibraryItemsLibraryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetLibraryItemsLibraryErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetLibraryItemsUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetLibraryItemsUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetLibraryItemsErrors$outboundSchema: z.ZodType< - GetLibraryItemsErrors$Outbound, - z.ZodTypeDef, - GetLibraryItemsErrors -> = 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 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; -} - -export function getLibraryItemsErrorsToJSON( - getLibraryItemsErrors: GetLibraryItemsErrors, -): string { - return JSON.stringify( - GetLibraryItemsErrors$outboundSchema.parse(getLibraryItemsErrors), - ); -} - -export function getLibraryItemsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetLibraryItemsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetLibraryItemsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetLibraryItemsBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetLibraryItemsBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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/getlibrarysectionsall.ts b/src/sdk/models/errors/getlibrarysectionsall.ts deleted file mode 100644 index a54873ba..00000000 --- a/src/sdk/models/errors/getlibrarysectionsall.ts +++ /dev/null @@ -1,351 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetLibrarySectionsAllLibraryErrors = { - 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 GetLibrarySectionsAllUnauthorizedData = { - 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 GetLibrarySectionsAllUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetLibrarySectionsAllUnauthorizedData; - - constructor( - err: GetLibrarySectionsAllUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetLibrarySectionsAllUnauthorized"; - } -} - -export type GetLibrarySectionsAllErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -export type GetLibrarySectionsAllBadRequestData = { - 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 GetLibrarySectionsAllBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetLibrarySectionsAllBadRequestData; - - constructor( - err: GetLibrarySectionsAllBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetLibrarySectionsAllBadRequest"; - } -} - -/** @internal */ -export const GetLibrarySectionsAllLibraryErrors$inboundSchema: z.ZodType< - GetLibrarySectionsAllLibraryErrors, - z.ZodTypeDef, - unknown -> = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), -}); - -/** @internal */ -export type GetLibrarySectionsAllLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** @internal */ -export const GetLibrarySectionsAllLibraryErrors$outboundSchema: z.ZodType< - GetLibrarySectionsAllLibraryErrors$Outbound, - z.ZodTypeDef, - GetLibrarySectionsAllLibraryErrors -> = 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 GetLibrarySectionsAllLibraryErrors$ { - /** @deprecated use `GetLibrarySectionsAllLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = GetLibrarySectionsAllLibraryErrors$inboundSchema; - /** @deprecated use `GetLibrarySectionsAllLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = - GetLibrarySectionsAllLibraryErrors$outboundSchema; - /** @deprecated use `GetLibrarySectionsAllLibraryErrors$Outbound` instead. */ - export type Outbound = GetLibrarySectionsAllLibraryErrors$Outbound; -} - -export function getLibrarySectionsAllLibraryErrorsToJSON( - getLibrarySectionsAllLibraryErrors: GetLibrarySectionsAllLibraryErrors, -): string { - return JSON.stringify( - GetLibrarySectionsAllLibraryErrors$outboundSchema.parse( - getLibrarySectionsAllLibraryErrors, - ), - ); -} - -export function getLibrarySectionsAllLibraryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - GetLibrarySectionsAllLibraryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetLibrarySectionsAllLibraryErrors' from JSON`, - ); -} - -/** @internal */ -export const GetLibrarySectionsAllUnauthorized$inboundSchema: z.ZodType< - GetLibrarySectionsAllUnauthorized, - z.ZodTypeDef, - unknown -> = z.object({ - errors: z.array( - z.lazy(() => GetLibrarySectionsAllLibraryErrors$inboundSchema), - ).optional(), - RawResponse: z.instanceof(Response).optional(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetLibrarySectionsAllUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetLibrarySectionsAllUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -export const GetLibrarySectionsAllUnauthorized$outboundSchema: z.ZodType< - GetLibrarySectionsAllUnauthorized$Outbound, - z.ZodTypeDef, - GetLibrarySectionsAllUnauthorized -> = z.instanceof(GetLibrarySectionsAllUnauthorized) - .transform(v => v.data$) - .pipe( - z.object({ - errors: z.array( - z.lazy(() => GetLibrarySectionsAllLibraryErrors$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 GetLibrarySectionsAllUnauthorized$ { - /** @deprecated use `GetLibrarySectionsAllUnauthorized$inboundSchema` instead. */ - export const inboundSchema = GetLibrarySectionsAllUnauthorized$inboundSchema; - /** @deprecated use `GetLibrarySectionsAllUnauthorized$outboundSchema` instead. */ - export const outboundSchema = - GetLibrarySectionsAllUnauthorized$outboundSchema; - /** @deprecated use `GetLibrarySectionsAllUnauthorized$Outbound` instead. */ - export type Outbound = GetLibrarySectionsAllUnauthorized$Outbound; -} - -/** @internal */ -export const GetLibrarySectionsAllErrors$inboundSchema: z.ZodType< - GetLibrarySectionsAllErrors, - z.ZodTypeDef, - unknown -> = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), -}); - -/** @internal */ -export type GetLibrarySectionsAllErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** @internal */ -export const GetLibrarySectionsAllErrors$outboundSchema: z.ZodType< - GetLibrarySectionsAllErrors$Outbound, - z.ZodTypeDef, - GetLibrarySectionsAllErrors -> = 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 GetLibrarySectionsAllErrors$ { - /** @deprecated use `GetLibrarySectionsAllErrors$inboundSchema` instead. */ - export const inboundSchema = GetLibrarySectionsAllErrors$inboundSchema; - /** @deprecated use `GetLibrarySectionsAllErrors$outboundSchema` instead. */ - export const outboundSchema = GetLibrarySectionsAllErrors$outboundSchema; - /** @deprecated use `GetLibrarySectionsAllErrors$Outbound` instead. */ - export type Outbound = GetLibrarySectionsAllErrors$Outbound; -} - -export function getLibrarySectionsAllErrorsToJSON( - getLibrarySectionsAllErrors: GetLibrarySectionsAllErrors, -): string { - return JSON.stringify( - GetLibrarySectionsAllErrors$outboundSchema.parse( - getLibrarySectionsAllErrors, - ), - ); -} - -export function getLibrarySectionsAllErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetLibrarySectionsAllErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetLibrarySectionsAllErrors' from JSON`, - ); -} - -/** @internal */ -export const GetLibrarySectionsAllBadRequest$inboundSchema: z.ZodType< - GetLibrarySectionsAllBadRequest, - z.ZodTypeDef, - unknown -> = z.object({ - errors: z.array(z.lazy(() => GetLibrarySectionsAllErrors$inboundSchema)) - .optional(), - RawResponse: z.instanceof(Response).optional(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetLibrarySectionsAllBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetLibrarySectionsAllBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -export const GetLibrarySectionsAllBadRequest$outboundSchema: z.ZodType< - GetLibrarySectionsAllBadRequest$Outbound, - z.ZodTypeDef, - GetLibrarySectionsAllBadRequest -> = z.instanceof(GetLibrarySectionsAllBadRequest) - .transform(v => v.data$) - .pipe( - z.object({ - errors: z.array(z.lazy(() => GetLibrarySectionsAllErrors$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 GetLibrarySectionsAllBadRequest$ { - /** @deprecated use `GetLibrarySectionsAllBadRequest$inboundSchema` instead. */ - export const inboundSchema = GetLibrarySectionsAllBadRequest$inboundSchema; - /** @deprecated use `GetLibrarySectionsAllBadRequest$outboundSchema` instead. */ - export const outboundSchema = GetLibrarySectionsAllBadRequest$outboundSchema; - /** @deprecated use `GetLibrarySectionsAllBadRequest$Outbound` instead. */ - export type Outbound = GetLibrarySectionsAllBadRequest$Outbound; -} diff --git a/src/sdk/models/errors/getmediametadata.ts b/src/sdk/models/errors/getmediametadata.ts deleted file mode 100644 index e63639a2..00000000 --- a/src/sdk/models/errors/getmediametadata.ts +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetMediaMetaDataLibraryErrors = { - 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 GetMediaMetaDataUnauthorizedData = { - 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 GetMediaMetaDataUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetMediaMetaDataUnauthorizedData; - - constructor( - err: GetMediaMetaDataUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetMediaMetaDataUnauthorized"; - } -} - -export type GetMediaMetaDataErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -export type GetMediaMetaDataBadRequestData = { - 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 GetMediaMetaDataBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetMediaMetaDataBadRequestData; - - constructor( - err: GetMediaMetaDataBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetMediaMetaDataBadRequest"; - } -} - -/** @internal */ -export const GetMediaMetaDataLibraryErrors$inboundSchema: z.ZodType< - GetMediaMetaDataLibraryErrors, - z.ZodTypeDef, - unknown -> = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), -}); - -/** @internal */ -export type GetMediaMetaDataLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** @internal */ -export const GetMediaMetaDataLibraryErrors$outboundSchema: z.ZodType< - GetMediaMetaDataLibraryErrors$Outbound, - z.ZodTypeDef, - GetMediaMetaDataLibraryErrors -> = 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 GetMediaMetaDataLibraryErrors$ { - /** @deprecated use `GetMediaMetaDataLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = GetMediaMetaDataLibraryErrors$inboundSchema; - /** @deprecated use `GetMediaMetaDataLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = GetMediaMetaDataLibraryErrors$outboundSchema; - /** @deprecated use `GetMediaMetaDataLibraryErrors$Outbound` instead. */ - export type Outbound = GetMediaMetaDataLibraryErrors$Outbound; -} - -export function getMediaMetaDataLibraryErrorsToJSON( - getMediaMetaDataLibraryErrors: GetMediaMetaDataLibraryErrors, -): string { - return JSON.stringify( - GetMediaMetaDataLibraryErrors$outboundSchema.parse( - getMediaMetaDataLibraryErrors, - ), - ); -} - -export function getMediaMetaDataLibraryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetMediaMetaDataLibraryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetMediaMetaDataLibraryErrors' from JSON`, - ); -} - -/** @internal */ -export const GetMediaMetaDataUnauthorized$inboundSchema: z.ZodType< - GetMediaMetaDataUnauthorized, - z.ZodTypeDef, - unknown -> = z.object({ - errors: z.array(z.lazy(() => GetMediaMetaDataLibraryErrors$inboundSchema)) - .optional(), - RawResponse: z.instanceof(Response).optional(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetMediaMetaDataUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetMediaMetaDataUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -export const GetMediaMetaDataUnauthorized$outboundSchema: z.ZodType< - GetMediaMetaDataUnauthorized$Outbound, - z.ZodTypeDef, - GetMediaMetaDataUnauthorized -> = z.instanceof(GetMediaMetaDataUnauthorized) - .transform(v => v.data$) - .pipe( - z.object({ - errors: z.array( - z.lazy(() => GetMediaMetaDataLibraryErrors$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 GetMediaMetaDataUnauthorized$ { - /** @deprecated use `GetMediaMetaDataUnauthorized$inboundSchema` instead. */ - export const inboundSchema = GetMediaMetaDataUnauthorized$inboundSchema; - /** @deprecated use `GetMediaMetaDataUnauthorized$outboundSchema` instead. */ - export const outboundSchema = GetMediaMetaDataUnauthorized$outboundSchema; - /** @deprecated use `GetMediaMetaDataUnauthorized$Outbound` instead. */ - export type Outbound = GetMediaMetaDataUnauthorized$Outbound; -} - -/** @internal */ -export const GetMediaMetaDataErrors$inboundSchema: z.ZodType< - GetMediaMetaDataErrors, - z.ZodTypeDef, - unknown -> = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), -}); - -/** @internal */ -export type GetMediaMetaDataErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** @internal */ -export const GetMediaMetaDataErrors$outboundSchema: z.ZodType< - GetMediaMetaDataErrors$Outbound, - z.ZodTypeDef, - GetMediaMetaDataErrors -> = 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 GetMediaMetaDataErrors$ { - /** @deprecated use `GetMediaMetaDataErrors$inboundSchema` instead. */ - export const inboundSchema = GetMediaMetaDataErrors$inboundSchema; - /** @deprecated use `GetMediaMetaDataErrors$outboundSchema` instead. */ - export const outboundSchema = GetMediaMetaDataErrors$outboundSchema; - /** @deprecated use `GetMediaMetaDataErrors$Outbound` instead. */ - export type Outbound = GetMediaMetaDataErrors$Outbound; -} - -export function getMediaMetaDataErrorsToJSON( - getMediaMetaDataErrors: GetMediaMetaDataErrors, -): string { - return JSON.stringify( - GetMediaMetaDataErrors$outboundSchema.parse(getMediaMetaDataErrors), - ); -} - -export function getMediaMetaDataErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetMediaMetaDataErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetMediaMetaDataErrors' from JSON`, - ); -} - -/** @internal */ -export const GetMediaMetaDataBadRequest$inboundSchema: z.ZodType< - GetMediaMetaDataBadRequest, - z.ZodTypeDef, - unknown -> = z.object({ - errors: z.array(z.lazy(() => GetMediaMetaDataErrors$inboundSchema)) - .optional(), - RawResponse: z.instanceof(Response).optional(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetMediaMetaDataBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetMediaMetaDataBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -export const GetMediaMetaDataBadRequest$outboundSchema: z.ZodType< - GetMediaMetaDataBadRequest$Outbound, - z.ZodTypeDef, - GetMediaMetaDataBadRequest -> = z.instanceof(GetMediaMetaDataBadRequest) - .transform(v => v.data$) - .pipe( - z.object({ - errors: z.array(z.lazy(() => GetMediaMetaDataErrors$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 GetMediaMetaDataBadRequest$ { - /** @deprecated use `GetMediaMetaDataBadRequest$inboundSchema` instead. */ - export const inboundSchema = GetMediaMetaDataBadRequest$inboundSchema; - /** @deprecated use `GetMediaMetaDataBadRequest$outboundSchema` instead. */ - export const outboundSchema = GetMediaMetaDataBadRequest$outboundSchema; - /** @deprecated use `GetMediaMetaDataBadRequest$Outbound` instead. */ - export type Outbound = GetMediaMetaDataBadRequest$Outbound; -} diff --git a/src/sdk/models/errors/getmediaproviders.ts b/src/sdk/models/errors/getmediaproviders.ts deleted file mode 100644 index a1ca9d24..00000000 --- a/src/sdk/models/errors/getmediaproviders.ts +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetMediaProvidersServerErrors = { - 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 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 GetMediaProvidersUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetMediaProvidersUnauthorizedData; - - constructor( - err: GetMediaProvidersUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetMediaProvidersUnauthorized"; - } -} - -export type GetMediaProvidersErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetMediaProvidersBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetMediaProvidersBadRequestData; - - constructor( - err: GetMediaProvidersBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetMediaProvidersBadRequest"; - } -} - -/** @internal */ -export const GetMediaProvidersServerErrors$inboundSchema: z.ZodType< - GetMediaProvidersServerErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetMediaProvidersServerErrors$outboundSchema: z.ZodType< - GetMediaProvidersServerErrors$Outbound, - z.ZodTypeDef, - GetMediaProvidersServerErrors -> = 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 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; -} - -export function getMediaProvidersServerErrorsToJSON( - getMediaProvidersServerErrors: GetMediaProvidersServerErrors, -): string { - return JSON.stringify( - GetMediaProvidersServerErrors$outboundSchema.parse( - getMediaProvidersServerErrors, - ), - ); -} - -export function getMediaProvidersServerErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetMediaProvidersServerErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetMediaProvidersServerErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetMediaProvidersUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetMediaProvidersUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetMediaProvidersErrors$outboundSchema: z.ZodType< - GetMediaProvidersErrors$Outbound, - z.ZodTypeDef, - GetMediaProvidersErrors -> = 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 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; -} - -export function getMediaProvidersErrorsToJSON( - getMediaProvidersErrors: GetMediaProvidersErrors, -): string { - return JSON.stringify( - GetMediaProvidersErrors$outboundSchema.parse(getMediaProvidersErrors), - ); -} - -export function getMediaProvidersErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetMediaProvidersErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetMediaProvidersErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetMediaProvidersBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetMediaProvidersBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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/getmetadatachildren.ts b/src/sdk/models/errors/getmetadatachildren.ts deleted file mode 100644 index fb43bac8..00000000 --- a/src/sdk/models/errors/getmetadatachildren.ts +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetMetadataChildrenLibraryErrors = { - 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 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 GetMetadataChildrenUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetMetadataChildrenUnauthorizedData; - - constructor( - err: GetMetadataChildrenUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetMetadataChildrenUnauthorized"; - } -} - -export type GetMetadataChildrenErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetMetadataChildrenBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetMetadataChildrenBadRequestData; - - constructor( - err: GetMetadataChildrenBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetMetadataChildrenBadRequest"; - } -} - -/** @internal */ -export const GetMetadataChildrenLibraryErrors$inboundSchema: z.ZodType< - GetMetadataChildrenLibraryErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetMetadataChildrenLibraryErrors$outboundSchema: z.ZodType< - GetMetadataChildrenLibraryErrors$Outbound, - z.ZodTypeDef, - GetMetadataChildrenLibraryErrors -> = 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 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; -} - -export function getMetadataChildrenLibraryErrorsToJSON( - getMetadataChildrenLibraryErrors: GetMetadataChildrenLibraryErrors, -): string { - return JSON.stringify( - GetMetadataChildrenLibraryErrors$outboundSchema.parse( - getMetadataChildrenLibraryErrors, - ), - ); -} - -export function getMetadataChildrenLibraryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetMetadataChildrenLibraryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetMetadataChildrenLibraryErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetMetadataChildrenUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetMetadataChildrenUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetMetadataChildrenErrors$outboundSchema: z.ZodType< - GetMetadataChildrenErrors$Outbound, - z.ZodTypeDef, - GetMetadataChildrenErrors -> = 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 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; -} - -export function getMetadataChildrenErrorsToJSON( - getMetadataChildrenErrors: GetMetadataChildrenErrors, -): string { - return JSON.stringify( - GetMetadataChildrenErrors$outboundSchema.parse(getMetadataChildrenErrors), - ); -} - -export function getMetadataChildrenErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetMetadataChildrenErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetMetadataChildrenErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetMetadataChildrenBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetMetadataChildrenBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 6ba5d44f..00000000 --- a/src/sdk/models/errors/getmyplexaccount.ts +++ /dev/null @@ -1,344 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetMyPlexAccountServerErrors = { - 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 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 GetMyPlexAccountUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetMyPlexAccountUnauthorizedData; - - constructor( - err: GetMyPlexAccountUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetMyPlexAccountUnauthorized"; - } -} - -export type GetMyPlexAccountErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetMyPlexAccountBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetMyPlexAccountBadRequestData; - - constructor( - err: GetMyPlexAccountBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetMyPlexAccountBadRequest"; - } -} - -/** @internal */ -export const GetMyPlexAccountServerErrors$inboundSchema: z.ZodType< - GetMyPlexAccountServerErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetMyPlexAccountServerErrors$outboundSchema: z.ZodType< - GetMyPlexAccountServerErrors$Outbound, - z.ZodTypeDef, - GetMyPlexAccountServerErrors -> = 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 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; -} - -export function getMyPlexAccountServerErrorsToJSON( - getMyPlexAccountServerErrors: GetMyPlexAccountServerErrors, -): string { - return JSON.stringify( - GetMyPlexAccountServerErrors$outboundSchema.parse( - getMyPlexAccountServerErrors, - ), - ); -} - -export function getMyPlexAccountServerErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetMyPlexAccountServerErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetMyPlexAccountServerErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetMyPlexAccountUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetMyPlexAccountUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetMyPlexAccountErrors$outboundSchema: z.ZodType< - GetMyPlexAccountErrors$Outbound, - z.ZodTypeDef, - GetMyPlexAccountErrors -> = 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 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; -} - -export function getMyPlexAccountErrorsToJSON( - getMyPlexAccountErrors: GetMyPlexAccountErrors, -): string { - return JSON.stringify( - GetMyPlexAccountErrors$outboundSchema.parse(getMyPlexAccountErrors), - ); -} - -export function getMyPlexAccountErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetMyPlexAccountErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetMyPlexAccountErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetMyPlexAccountBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetMyPlexAccountBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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/getpin.ts b/src/sdk/models/errors/getpin.ts deleted file mode 100644 index 50a9a746..00000000 --- a/src/sdk/models/errors/getpin.ts +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetPinErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -export type GetPinBadRequestData = { - 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 GetPinBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetPinBadRequestData; - - constructor( - err: GetPinBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetPinBadRequest"; - } -} - -/** @internal */ -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; -}; - -/** @internal */ -export const GetPinErrors$outboundSchema: z.ZodType< - GetPinErrors$Outbound, - z.ZodTypeDef, - GetPinErrors -> = 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 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; -} - -export function getPinErrorsToJSON(getPinErrors: GetPinErrors): string { - return JSON.stringify(GetPinErrors$outboundSchema.parse(getPinErrors)); -} - -export function getPinErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetPinErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetPinErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetPinBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetPinBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 0331e16c..00000000 --- a/src/sdk/models/errors/getplaylist.ts +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetPlaylistPlaylistsErrors = { - 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 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 GetPlaylistUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetPlaylistUnauthorizedData; - - constructor( - err: GetPlaylistUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetPlaylistUnauthorized"; - } -} - -export type GetPlaylistErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetPlaylistBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetPlaylistBadRequestData; - - constructor( - err: GetPlaylistBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetPlaylistBadRequest"; - } -} - -/** @internal */ -export const GetPlaylistPlaylistsErrors$inboundSchema: z.ZodType< - GetPlaylistPlaylistsErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetPlaylistPlaylistsErrors$outboundSchema: z.ZodType< - GetPlaylistPlaylistsErrors$Outbound, - z.ZodTypeDef, - GetPlaylistPlaylistsErrors -> = 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 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; -} - -export function getPlaylistPlaylistsErrorsToJSON( - getPlaylistPlaylistsErrors: GetPlaylistPlaylistsErrors, -): string { - return JSON.stringify( - GetPlaylistPlaylistsErrors$outboundSchema.parse(getPlaylistPlaylistsErrors), - ); -} - -export function getPlaylistPlaylistsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetPlaylistPlaylistsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetPlaylistPlaylistsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetPlaylistUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetPlaylistUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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< - 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; -}; - -/** @internal */ -export const GetPlaylistErrors$outboundSchema: z.ZodType< - GetPlaylistErrors$Outbound, - z.ZodTypeDef, - GetPlaylistErrors -> = 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 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; -} - -export function getPlaylistErrorsToJSON( - getPlaylistErrors: GetPlaylistErrors, -): string { - return JSON.stringify( - GetPlaylistErrors$outboundSchema.parse(getPlaylistErrors), - ); -} - -export function getPlaylistErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetPlaylistErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetPlaylistErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetPlaylistBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetPlaylistBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 3fdde0f0..00000000 --- a/src/sdk/models/errors/getplaylistcontents.ts +++ /dev/null @@ -1,348 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetPlaylistContentsPlaylistsErrors = { - 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 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 GetPlaylistContentsUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetPlaylistContentsUnauthorizedData; - - constructor( - err: GetPlaylistContentsUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetPlaylistContentsUnauthorized"; - } -} - -export type GetPlaylistContentsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetPlaylistContentsBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetPlaylistContentsBadRequestData; - - constructor( - err: GetPlaylistContentsBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetPlaylistContentsBadRequest"; - } -} - -/** @internal */ -export const GetPlaylistContentsPlaylistsErrors$inboundSchema: z.ZodType< - GetPlaylistContentsPlaylistsErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetPlaylistContentsPlaylistsErrors$outboundSchema: z.ZodType< - GetPlaylistContentsPlaylistsErrors$Outbound, - z.ZodTypeDef, - GetPlaylistContentsPlaylistsErrors -> = 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 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; -} - -export function getPlaylistContentsPlaylistsErrorsToJSON( - getPlaylistContentsPlaylistsErrors: GetPlaylistContentsPlaylistsErrors, -): string { - return JSON.stringify( - GetPlaylistContentsPlaylistsErrors$outboundSchema.parse( - getPlaylistContentsPlaylistsErrors, - ), - ); -} - -export function getPlaylistContentsPlaylistsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - GetPlaylistContentsPlaylistsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetPlaylistContentsPlaylistsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetPlaylistContentsUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetPlaylistContentsUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetPlaylistContentsErrors$outboundSchema: z.ZodType< - GetPlaylistContentsErrors$Outbound, - z.ZodTypeDef, - GetPlaylistContentsErrors -> = 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 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; -} - -export function getPlaylistContentsErrorsToJSON( - getPlaylistContentsErrors: GetPlaylistContentsErrors, -): string { - return JSON.stringify( - GetPlaylistContentsErrors$outboundSchema.parse(getPlaylistContentsErrors), - ); -} - -export function getPlaylistContentsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetPlaylistContentsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetPlaylistContentsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetPlaylistContentsBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetPlaylistContentsBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index b48ad64c..00000000 --- a/src/sdk/models/errors/getplaylists.ts +++ /dev/null @@ -1,343 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetPlaylistsPlaylistsErrors = { - 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 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 GetPlaylistsUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetPlaylistsUnauthorizedData; - - constructor( - err: GetPlaylistsUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetPlaylistsUnauthorized"; - } -} - -export type GetPlaylistsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetPlaylistsBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetPlaylistsBadRequestData; - - constructor( - err: GetPlaylistsBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetPlaylistsBadRequest"; - } -} - -/** @internal */ -export const GetPlaylistsPlaylistsErrors$inboundSchema: z.ZodType< - GetPlaylistsPlaylistsErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetPlaylistsPlaylistsErrors$outboundSchema: z.ZodType< - GetPlaylistsPlaylistsErrors$Outbound, - z.ZodTypeDef, - GetPlaylistsPlaylistsErrors -> = 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 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; -} - -export function getPlaylistsPlaylistsErrorsToJSON( - getPlaylistsPlaylistsErrors: GetPlaylistsPlaylistsErrors, -): string { - return JSON.stringify( - GetPlaylistsPlaylistsErrors$outboundSchema.parse( - getPlaylistsPlaylistsErrors, - ), - ); -} - -export function getPlaylistsPlaylistsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetPlaylistsPlaylistsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetPlaylistsPlaylistsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetPlaylistsUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetPlaylistsUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetPlaylistsErrors$outboundSchema: z.ZodType< - GetPlaylistsErrors$Outbound, - z.ZodTypeDef, - GetPlaylistsErrors -> = 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 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; -} - -export function getPlaylistsErrorsToJSON( - getPlaylistsErrors: GetPlaylistsErrors, -): string { - return JSON.stringify( - GetPlaylistsErrors$outboundSchema.parse(getPlaylistsErrors), - ); -} - -export function getPlaylistsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetPlaylistsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetPlaylistsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetPlaylistsBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetPlaylistsBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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/getrecentlyaddedlibrary.ts b/src/sdk/models/errors/getrecentlyaddedlibrary.ts deleted file mode 100644 index 321f5fbb..00000000 --- a/src/sdk/models/errors/getrecentlyaddedlibrary.ts +++ /dev/null @@ -1,355 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetRecentlyAddedLibraryLibraryErrors = { - 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 GetRecentlyAddedLibraryUnauthorizedData = { - 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 GetRecentlyAddedLibraryUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetRecentlyAddedLibraryUnauthorizedData; - - constructor( - err: GetRecentlyAddedLibraryUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetRecentlyAddedLibraryUnauthorized"; - } -} - -export type GetRecentlyAddedLibraryErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -export type GetRecentlyAddedLibraryBadRequestData = { - 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 GetRecentlyAddedLibraryBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetRecentlyAddedLibraryBadRequestData; - - constructor( - err: GetRecentlyAddedLibraryBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetRecentlyAddedLibraryBadRequest"; - } -} - -/** @internal */ -export const GetRecentlyAddedLibraryLibraryErrors$inboundSchema: z.ZodType< - GetRecentlyAddedLibraryLibraryErrors, - z.ZodTypeDef, - unknown -> = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), -}); - -/** @internal */ -export type GetRecentlyAddedLibraryLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** @internal */ -export const GetRecentlyAddedLibraryLibraryErrors$outboundSchema: z.ZodType< - GetRecentlyAddedLibraryLibraryErrors$Outbound, - z.ZodTypeDef, - GetRecentlyAddedLibraryLibraryErrors -> = 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 GetRecentlyAddedLibraryLibraryErrors$ { - /** @deprecated use `GetRecentlyAddedLibraryLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = - GetRecentlyAddedLibraryLibraryErrors$inboundSchema; - /** @deprecated use `GetRecentlyAddedLibraryLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = - GetRecentlyAddedLibraryLibraryErrors$outboundSchema; - /** @deprecated use `GetRecentlyAddedLibraryLibraryErrors$Outbound` instead. */ - export type Outbound = GetRecentlyAddedLibraryLibraryErrors$Outbound; -} - -export function getRecentlyAddedLibraryLibraryErrorsToJSON( - getRecentlyAddedLibraryLibraryErrors: GetRecentlyAddedLibraryLibraryErrors, -): string { - return JSON.stringify( - GetRecentlyAddedLibraryLibraryErrors$outboundSchema.parse( - getRecentlyAddedLibraryLibraryErrors, - ), - ); -} - -export function getRecentlyAddedLibraryLibraryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - GetRecentlyAddedLibraryLibraryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetRecentlyAddedLibraryLibraryErrors' from JSON`, - ); -} - -/** @internal */ -export const GetRecentlyAddedLibraryUnauthorized$inboundSchema: z.ZodType< - GetRecentlyAddedLibraryUnauthorized, - z.ZodTypeDef, - unknown -> = z.object({ - errors: z.array( - z.lazy(() => GetRecentlyAddedLibraryLibraryErrors$inboundSchema), - ).optional(), - RawResponse: z.instanceof(Response).optional(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetRecentlyAddedLibraryUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetRecentlyAddedLibraryUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -export const GetRecentlyAddedLibraryUnauthorized$outboundSchema: z.ZodType< - GetRecentlyAddedLibraryUnauthorized$Outbound, - z.ZodTypeDef, - GetRecentlyAddedLibraryUnauthorized -> = z.instanceof(GetRecentlyAddedLibraryUnauthorized) - .transform(v => v.data$) - .pipe( - z.object({ - errors: z.array( - z.lazy(() => GetRecentlyAddedLibraryLibraryErrors$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 GetRecentlyAddedLibraryUnauthorized$ { - /** @deprecated use `GetRecentlyAddedLibraryUnauthorized$inboundSchema` instead. */ - export const inboundSchema = - GetRecentlyAddedLibraryUnauthorized$inboundSchema; - /** @deprecated use `GetRecentlyAddedLibraryUnauthorized$outboundSchema` instead. */ - export const outboundSchema = - GetRecentlyAddedLibraryUnauthorized$outboundSchema; - /** @deprecated use `GetRecentlyAddedLibraryUnauthorized$Outbound` instead. */ - export type Outbound = GetRecentlyAddedLibraryUnauthorized$Outbound; -} - -/** @internal */ -export const GetRecentlyAddedLibraryErrors$inboundSchema: z.ZodType< - GetRecentlyAddedLibraryErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetRecentlyAddedLibraryErrors$outboundSchema: z.ZodType< - GetRecentlyAddedLibraryErrors$Outbound, - z.ZodTypeDef, - GetRecentlyAddedLibraryErrors -> = 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 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; -} - -export function getRecentlyAddedLibraryErrorsToJSON( - getRecentlyAddedLibraryErrors: GetRecentlyAddedLibraryErrors, -): string { - return JSON.stringify( - GetRecentlyAddedLibraryErrors$outboundSchema.parse( - getRecentlyAddedLibraryErrors, - ), - ); -} - -export function getRecentlyAddedLibraryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetRecentlyAddedLibraryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetRecentlyAddedLibraryErrors' from JSON`, - ); -} - -/** @internal */ -export const GetRecentlyAddedLibraryBadRequest$inboundSchema: z.ZodType< - GetRecentlyAddedLibraryBadRequest, - z.ZodTypeDef, - unknown -> = z.object({ - errors: z.array(z.lazy(() => GetRecentlyAddedLibraryErrors$inboundSchema)) - .optional(), - RawResponse: z.instanceof(Response).optional(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetRecentlyAddedLibraryBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetRecentlyAddedLibraryBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -export const GetRecentlyAddedLibraryBadRequest$outboundSchema: z.ZodType< - GetRecentlyAddedLibraryBadRequest$Outbound, - z.ZodTypeDef, - GetRecentlyAddedLibraryBadRequest -> = z.instanceof(GetRecentlyAddedLibraryBadRequest) - .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 GetRecentlyAddedLibraryBadRequest$ { - /** @deprecated use `GetRecentlyAddedLibraryBadRequest$inboundSchema` instead. */ - export const inboundSchema = GetRecentlyAddedLibraryBadRequest$inboundSchema; - /** @deprecated use `GetRecentlyAddedLibraryBadRequest$outboundSchema` instead. */ - export const outboundSchema = - GetRecentlyAddedLibraryBadRequest$outboundSchema; - /** @deprecated use `GetRecentlyAddedLibraryBadRequest$Outbound` instead. */ - export type Outbound = GetRecentlyAddedLibraryBadRequest$Outbound; -} diff --git a/src/sdk/models/errors/getrefreshlibrarymetadata.ts b/src/sdk/models/errors/getrefreshlibrarymetadata.ts deleted file mode 100644 index 34fb1f8d..00000000 --- a/src/sdk/models/errors/getrefreshlibrarymetadata.ts +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetRefreshLibraryMetadataLibraryErrors = { - 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 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 GetRefreshLibraryMetadataUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetRefreshLibraryMetadataUnauthorizedData; - - constructor( - err: GetRefreshLibraryMetadataUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetRefreshLibraryMetadataUnauthorized"; - } -} - -export type GetRefreshLibraryMetadataErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetRefreshLibraryMetadataBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetRefreshLibraryMetadataBadRequestData; - - constructor( - err: GetRefreshLibraryMetadataBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetRefreshLibraryMetadataBadRequest"; - } -} - -/** @internal */ -export const GetRefreshLibraryMetadataLibraryErrors$inboundSchema: z.ZodType< - GetRefreshLibraryMetadataLibraryErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetRefreshLibraryMetadataLibraryErrors$outboundSchema: z.ZodType< - GetRefreshLibraryMetadataLibraryErrors$Outbound, - z.ZodTypeDef, - GetRefreshLibraryMetadataLibraryErrors -> = 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 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; -} - -export function getRefreshLibraryMetadataLibraryErrorsToJSON( - getRefreshLibraryMetadataLibraryErrors: - GetRefreshLibraryMetadataLibraryErrors, -): string { - return JSON.stringify( - GetRefreshLibraryMetadataLibraryErrors$outboundSchema.parse( - getRefreshLibraryMetadataLibraryErrors, - ), - ); -} - -export function getRefreshLibraryMetadataLibraryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - GetRefreshLibraryMetadataLibraryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetRefreshLibraryMetadataLibraryErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetRefreshLibraryMetadataUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetRefreshLibraryMetadataUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetRefreshLibraryMetadataErrors$outboundSchema: z.ZodType< - GetRefreshLibraryMetadataErrors$Outbound, - z.ZodTypeDef, - GetRefreshLibraryMetadataErrors -> = 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 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; -} - -export function getRefreshLibraryMetadataErrorsToJSON( - getRefreshLibraryMetadataErrors: GetRefreshLibraryMetadataErrors, -): string { - return JSON.stringify( - GetRefreshLibraryMetadataErrors$outboundSchema.parse( - getRefreshLibraryMetadataErrors, - ), - ); -} - -export function getRefreshLibraryMetadataErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetRefreshLibraryMetadataErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetRefreshLibraryMetadataErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetRefreshLibraryMetadataBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetRefreshLibraryMetadataBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index d14d89d8..00000000 --- a/src/sdk/models/errors/getresizedphoto.ts +++ /dev/null @@ -1,343 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetResizedPhotoServerErrors = { - 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 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 GetResizedPhotoUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetResizedPhotoUnauthorizedData; - - constructor( - err: GetResizedPhotoUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetResizedPhotoUnauthorized"; - } -} - -export type GetResizedPhotoErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetResizedPhotoBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetResizedPhotoBadRequestData; - - constructor( - err: GetResizedPhotoBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetResizedPhotoBadRequest"; - } -} - -/** @internal */ -export const GetResizedPhotoServerErrors$inboundSchema: z.ZodType< - GetResizedPhotoServerErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetResizedPhotoServerErrors$outboundSchema: z.ZodType< - GetResizedPhotoServerErrors$Outbound, - z.ZodTypeDef, - GetResizedPhotoServerErrors -> = 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 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; -} - -export function getResizedPhotoServerErrorsToJSON( - getResizedPhotoServerErrors: GetResizedPhotoServerErrors, -): string { - return JSON.stringify( - GetResizedPhotoServerErrors$outboundSchema.parse( - getResizedPhotoServerErrors, - ), - ); -} - -export function getResizedPhotoServerErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetResizedPhotoServerErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetResizedPhotoServerErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetResizedPhotoUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetResizedPhotoUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetResizedPhotoErrors$outboundSchema: z.ZodType< - GetResizedPhotoErrors$Outbound, - z.ZodTypeDef, - GetResizedPhotoErrors -> = 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 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; -} - -export function getResizedPhotoErrorsToJSON( - getResizedPhotoErrors: GetResizedPhotoErrors, -): string { - return JSON.stringify( - GetResizedPhotoErrors$outboundSchema.parse(getResizedPhotoErrors), - ); -} - -export function getResizedPhotoErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetResizedPhotoErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetResizedPhotoErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetResizedPhotoBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetResizedPhotoBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 3ac4c900..00000000 --- a/src/sdk/models/errors/getresourcesstatistics.ts +++ /dev/null @@ -1,353 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetResourcesStatisticsStatisticsErrors = { - 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 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 GetResourcesStatisticsUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetResourcesStatisticsUnauthorizedData; - - constructor( - err: GetResourcesStatisticsUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetResourcesStatisticsUnauthorized"; - } -} - -export type GetResourcesStatisticsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetResourcesStatisticsBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetResourcesStatisticsBadRequestData; - - constructor( - err: GetResourcesStatisticsBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetResourcesStatisticsBadRequest"; - } -} - -/** @internal */ -export const GetResourcesStatisticsStatisticsErrors$inboundSchema: z.ZodType< - GetResourcesStatisticsStatisticsErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetResourcesStatisticsStatisticsErrors$outboundSchema: z.ZodType< - GetResourcesStatisticsStatisticsErrors$Outbound, - z.ZodTypeDef, - GetResourcesStatisticsStatisticsErrors -> = 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 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; -} - -export function getResourcesStatisticsStatisticsErrorsToJSON( - getResourcesStatisticsStatisticsErrors: - GetResourcesStatisticsStatisticsErrors, -): string { - return JSON.stringify( - GetResourcesStatisticsStatisticsErrors$outboundSchema.parse( - getResourcesStatisticsStatisticsErrors, - ), - ); -} - -export function getResourcesStatisticsStatisticsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - GetResourcesStatisticsStatisticsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetResourcesStatisticsStatisticsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetResourcesStatisticsUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetResourcesStatisticsUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetResourcesStatisticsErrors$outboundSchema: z.ZodType< - GetResourcesStatisticsErrors$Outbound, - z.ZodTypeDef, - GetResourcesStatisticsErrors -> = 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 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; -} - -export function getResourcesStatisticsErrorsToJSON( - getResourcesStatisticsErrors: GetResourcesStatisticsErrors, -): string { - return JSON.stringify( - GetResourcesStatisticsErrors$outboundSchema.parse( - getResourcesStatisticsErrors, - ), - ); -} - -export function getResourcesStatisticsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetResourcesStatisticsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetResourcesStatisticsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetResourcesStatisticsBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetResourcesStatisticsBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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/getsearchalllibraries.ts b/src/sdk/models/errors/getsearchalllibraries.ts deleted file mode 100644 index 076a20f8..00000000 --- a/src/sdk/models/errors/getsearchalllibraries.ts +++ /dev/null @@ -1,351 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetSearchAllLibrariesLibraryErrors = { - 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 GetSearchAllLibrariesUnauthorizedData = { - 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 GetSearchAllLibrariesUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetSearchAllLibrariesUnauthorizedData; - - constructor( - err: GetSearchAllLibrariesUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetSearchAllLibrariesUnauthorized"; - } -} - -export type GetSearchAllLibrariesErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -export type GetSearchAllLibrariesBadRequestData = { - 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 GetSearchAllLibrariesBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetSearchAllLibrariesBadRequestData; - - constructor( - err: GetSearchAllLibrariesBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetSearchAllLibrariesBadRequest"; - } -} - -/** @internal */ -export const GetSearchAllLibrariesLibraryErrors$inboundSchema: z.ZodType< - GetSearchAllLibrariesLibraryErrors, - z.ZodTypeDef, - unknown -> = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), -}); - -/** @internal */ -export type GetSearchAllLibrariesLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** @internal */ -export const GetSearchAllLibrariesLibraryErrors$outboundSchema: z.ZodType< - GetSearchAllLibrariesLibraryErrors$Outbound, - z.ZodTypeDef, - GetSearchAllLibrariesLibraryErrors -> = 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 GetSearchAllLibrariesLibraryErrors$ { - /** @deprecated use `GetSearchAllLibrariesLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = GetSearchAllLibrariesLibraryErrors$inboundSchema; - /** @deprecated use `GetSearchAllLibrariesLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = - GetSearchAllLibrariesLibraryErrors$outboundSchema; - /** @deprecated use `GetSearchAllLibrariesLibraryErrors$Outbound` instead. */ - export type Outbound = GetSearchAllLibrariesLibraryErrors$Outbound; -} - -export function getSearchAllLibrariesLibraryErrorsToJSON( - getSearchAllLibrariesLibraryErrors: GetSearchAllLibrariesLibraryErrors, -): string { - return JSON.stringify( - GetSearchAllLibrariesLibraryErrors$outboundSchema.parse( - getSearchAllLibrariesLibraryErrors, - ), - ); -} - -export function getSearchAllLibrariesLibraryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - GetSearchAllLibrariesLibraryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetSearchAllLibrariesLibraryErrors' from JSON`, - ); -} - -/** @internal */ -export const GetSearchAllLibrariesUnauthorized$inboundSchema: z.ZodType< - GetSearchAllLibrariesUnauthorized, - z.ZodTypeDef, - unknown -> = z.object({ - errors: z.array( - z.lazy(() => GetSearchAllLibrariesLibraryErrors$inboundSchema), - ).optional(), - RawResponse: z.instanceof(Response).optional(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetSearchAllLibrariesUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetSearchAllLibrariesUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -export const GetSearchAllLibrariesUnauthorized$outboundSchema: z.ZodType< - GetSearchAllLibrariesUnauthorized$Outbound, - z.ZodTypeDef, - GetSearchAllLibrariesUnauthorized -> = z.instanceof(GetSearchAllLibrariesUnauthorized) - .transform(v => v.data$) - .pipe( - z.object({ - errors: z.array( - z.lazy(() => GetSearchAllLibrariesLibraryErrors$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 GetSearchAllLibrariesUnauthorized$ { - /** @deprecated use `GetSearchAllLibrariesUnauthorized$inboundSchema` instead. */ - export const inboundSchema = GetSearchAllLibrariesUnauthorized$inboundSchema; - /** @deprecated use `GetSearchAllLibrariesUnauthorized$outboundSchema` instead. */ - export const outboundSchema = - GetSearchAllLibrariesUnauthorized$outboundSchema; - /** @deprecated use `GetSearchAllLibrariesUnauthorized$Outbound` instead. */ - export type Outbound = GetSearchAllLibrariesUnauthorized$Outbound; -} - -/** @internal */ -export const GetSearchAllLibrariesErrors$inboundSchema: z.ZodType< - GetSearchAllLibrariesErrors, - z.ZodTypeDef, - unknown -> = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), -}); - -/** @internal */ -export type GetSearchAllLibrariesErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** @internal */ -export const GetSearchAllLibrariesErrors$outboundSchema: z.ZodType< - GetSearchAllLibrariesErrors$Outbound, - z.ZodTypeDef, - GetSearchAllLibrariesErrors -> = 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 GetSearchAllLibrariesErrors$ { - /** @deprecated use `GetSearchAllLibrariesErrors$inboundSchema` instead. */ - export const inboundSchema = GetSearchAllLibrariesErrors$inboundSchema; - /** @deprecated use `GetSearchAllLibrariesErrors$outboundSchema` instead. */ - export const outboundSchema = GetSearchAllLibrariesErrors$outboundSchema; - /** @deprecated use `GetSearchAllLibrariesErrors$Outbound` instead. */ - export type Outbound = GetSearchAllLibrariesErrors$Outbound; -} - -export function getSearchAllLibrariesErrorsToJSON( - getSearchAllLibrariesErrors: GetSearchAllLibrariesErrors, -): string { - return JSON.stringify( - GetSearchAllLibrariesErrors$outboundSchema.parse( - getSearchAllLibrariesErrors, - ), - ); -} - -export function getSearchAllLibrariesErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetSearchAllLibrariesErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetSearchAllLibrariesErrors' from JSON`, - ); -} - -/** @internal */ -export const GetSearchAllLibrariesBadRequest$inboundSchema: z.ZodType< - GetSearchAllLibrariesBadRequest, - z.ZodTypeDef, - unknown -> = z.object({ - errors: z.array(z.lazy(() => GetSearchAllLibrariesErrors$inboundSchema)) - .optional(), - RawResponse: z.instanceof(Response).optional(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetSearchAllLibrariesBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetSearchAllLibrariesBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -export const GetSearchAllLibrariesBadRequest$outboundSchema: z.ZodType< - GetSearchAllLibrariesBadRequest$Outbound, - z.ZodTypeDef, - GetSearchAllLibrariesBadRequest -> = z.instanceof(GetSearchAllLibrariesBadRequest) - .transform(v => v.data$) - .pipe( - z.object({ - errors: z.array(z.lazy(() => GetSearchAllLibrariesErrors$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 GetSearchAllLibrariesBadRequest$ { - /** @deprecated use `GetSearchAllLibrariesBadRequest$inboundSchema` instead. */ - export const inboundSchema = GetSearchAllLibrariesBadRequest$inboundSchema; - /** @deprecated use `GetSearchAllLibrariesBadRequest$outboundSchema` instead. */ - export const outboundSchema = GetSearchAllLibrariesBadRequest$outboundSchema; - /** @deprecated use `GetSearchAllLibrariesBadRequest$Outbound` instead. */ - export type Outbound = GetSearchAllLibrariesBadRequest$Outbound; -} diff --git a/src/sdk/models/errors/getsearchlibrary.ts b/src/sdk/models/errors/getsearchlibrary.ts deleted file mode 100644 index 8f508a15..00000000 --- a/src/sdk/models/errors/getsearchlibrary.ts +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetSearchLibraryLibraryErrors = { - 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 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 GetSearchLibraryUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetSearchLibraryUnauthorizedData; - - constructor( - err: GetSearchLibraryUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetSearchLibraryUnauthorized"; - } -} - -export type GetSearchLibraryErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetSearchLibraryBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetSearchLibraryBadRequestData; - - constructor( - err: GetSearchLibraryBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetSearchLibraryBadRequest"; - } -} - -/** @internal */ -export const GetSearchLibraryLibraryErrors$inboundSchema: z.ZodType< - GetSearchLibraryLibraryErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetSearchLibraryLibraryErrors$outboundSchema: z.ZodType< - GetSearchLibraryLibraryErrors$Outbound, - z.ZodTypeDef, - GetSearchLibraryLibraryErrors -> = 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 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; -} - -export function getSearchLibraryLibraryErrorsToJSON( - getSearchLibraryLibraryErrors: GetSearchLibraryLibraryErrors, -): string { - return JSON.stringify( - GetSearchLibraryLibraryErrors$outboundSchema.parse( - getSearchLibraryLibraryErrors, - ), - ); -} - -export function getSearchLibraryLibraryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetSearchLibraryLibraryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetSearchLibraryLibraryErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetSearchLibraryUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetSearchLibraryUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetSearchLibraryErrors$outboundSchema: z.ZodType< - GetSearchLibraryErrors$Outbound, - z.ZodTypeDef, - GetSearchLibraryErrors -> = 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 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; -} - -export function getSearchLibraryErrorsToJSON( - getSearchLibraryErrors: GetSearchLibraryErrors, -): string { - return JSON.stringify( - GetSearchLibraryErrors$outboundSchema.parse(getSearchLibraryErrors), - ); -} - -export function getSearchLibraryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetSearchLibraryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetSearchLibraryErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetSearchLibraryBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetSearchLibraryBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 75f07210..00000000 --- a/src/sdk/models/errors/getsearchresults.ts +++ /dev/null @@ -1,344 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetSearchResultsSearchErrors = { - 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 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 GetSearchResultsUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetSearchResultsUnauthorizedData; - - constructor( - err: GetSearchResultsUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetSearchResultsUnauthorized"; - } -} - -export type GetSearchResultsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetSearchResultsBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetSearchResultsBadRequestData; - - constructor( - err: GetSearchResultsBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetSearchResultsBadRequest"; - } -} - -/** @internal */ -export const GetSearchResultsSearchErrors$inboundSchema: z.ZodType< - GetSearchResultsSearchErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetSearchResultsSearchErrors$outboundSchema: z.ZodType< - GetSearchResultsSearchErrors$Outbound, - z.ZodTypeDef, - GetSearchResultsSearchErrors -> = 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 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; -} - -export function getSearchResultsSearchErrorsToJSON( - getSearchResultsSearchErrors: GetSearchResultsSearchErrors, -): string { - return JSON.stringify( - GetSearchResultsSearchErrors$outboundSchema.parse( - getSearchResultsSearchErrors, - ), - ); -} - -export function getSearchResultsSearchErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetSearchResultsSearchErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetSearchResultsSearchErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetSearchResultsUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetSearchResultsUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetSearchResultsErrors$outboundSchema: z.ZodType< - GetSearchResultsErrors$Outbound, - z.ZodTypeDef, - GetSearchResultsErrors -> = 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 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; -} - -export function getSearchResultsErrorsToJSON( - getSearchResultsErrors: GetSearchResultsErrors, -): string { - return JSON.stringify( - GetSearchResultsErrors$outboundSchema.parse(getSearchResultsErrors), - ); -} - -export function getSearchResultsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetSearchResultsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetSearchResultsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetSearchResultsBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetSearchResultsBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 4fc103b2..00000000 --- a/src/sdk/models/errors/getserveractivities.ts +++ /dev/null @@ -1,349 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetServerActivitiesActivitiesErrors = { - 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 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 GetServerActivitiesUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetServerActivitiesUnauthorizedData; - - constructor( - err: GetServerActivitiesUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetServerActivitiesUnauthorized"; - } -} - -export type GetServerActivitiesErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetServerActivitiesBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetServerActivitiesBadRequestData; - - constructor( - err: GetServerActivitiesBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetServerActivitiesBadRequest"; - } -} - -/** @internal */ -export const GetServerActivitiesActivitiesErrors$inboundSchema: z.ZodType< - GetServerActivitiesActivitiesErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetServerActivitiesActivitiesErrors$outboundSchema: z.ZodType< - GetServerActivitiesActivitiesErrors$Outbound, - z.ZodTypeDef, - GetServerActivitiesActivitiesErrors -> = 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 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; -} - -export function getServerActivitiesActivitiesErrorsToJSON( - getServerActivitiesActivitiesErrors: GetServerActivitiesActivitiesErrors, -): string { - return JSON.stringify( - GetServerActivitiesActivitiesErrors$outboundSchema.parse( - getServerActivitiesActivitiesErrors, - ), - ); -} - -export function getServerActivitiesActivitiesErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - GetServerActivitiesActivitiesErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetServerActivitiesActivitiesErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetServerActivitiesUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetServerActivitiesUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetServerActivitiesErrors$outboundSchema: z.ZodType< - GetServerActivitiesErrors$Outbound, - z.ZodTypeDef, - GetServerActivitiesErrors -> = 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 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; -} - -export function getServerActivitiesErrorsToJSON( - getServerActivitiesErrors: GetServerActivitiesErrors, -): string { - return JSON.stringify( - GetServerActivitiesErrors$outboundSchema.parse(getServerActivitiesErrors), - ); -} - -export function getServerActivitiesErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetServerActivitiesErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetServerActivitiesErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetServerActivitiesBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetServerActivitiesBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 149d1032..00000000 --- a/src/sdk/models/errors/getservercapabilities.ts +++ /dev/null @@ -1,336 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetServerCapabilitiesErrors = { - 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 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 GetServerCapabilitiesUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetServerCapabilitiesUnauthorizedData; - - constructor( - err: GetServerCapabilitiesUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetServerCapabilitiesUnauthorized"; - } -} - -export type Errors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetServerCapabilitiesBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetServerCapabilitiesBadRequestData; - - constructor( - err: GetServerCapabilitiesBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetServerCapabilitiesBadRequest"; - } -} - -/** @internal */ -export const GetServerCapabilitiesErrors$inboundSchema: z.ZodType< - GetServerCapabilitiesErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetServerCapabilitiesErrors$outboundSchema: z.ZodType< - GetServerCapabilitiesErrors$Outbound, - z.ZodTypeDef, - GetServerCapabilitiesErrors -> = 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 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; -} - -export function getServerCapabilitiesErrorsToJSON( - getServerCapabilitiesErrors: GetServerCapabilitiesErrors, -): string { - return JSON.stringify( - GetServerCapabilitiesErrors$outboundSchema.parse( - getServerCapabilitiesErrors, - ), - ); -} - -export function getServerCapabilitiesErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetServerCapabilitiesErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetServerCapabilitiesErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetServerCapabilitiesUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetServerCapabilitiesUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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({ - 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; -}; - -/** @internal */ -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(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Errors$ { - /** @deprecated use `Errors$inboundSchema` instead. */ - export const inboundSchema = Errors$inboundSchema; - /** @deprecated use `Errors$outboundSchema` instead. */ - export const outboundSchema = Errors$outboundSchema; - /** @deprecated use `Errors$Outbound` instead. */ - export type Outbound = Errors$Outbound; -} - -export function errorsToJSON(errors: Errors): string { - return JSON.stringify(Errors$outboundSchema.parse(errors)); -} - -export function errorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Errors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Errors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetServerCapabilitiesBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetServerCapabilitiesBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 76dfac74..00000000 --- a/src/sdk/models/errors/getserveridentity.ts +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { PlexAPIError } from "./plexapierror.js"; - -/** - * Request Timeout - */ -export type GetServerIdentityRequestTimeoutData = { - code?: number | undefined; - message?: string | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; -}; - -/** - * Request Timeout - */ -export class GetServerIdentityRequestTimeout extends PlexAPIError { - code?: number | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetServerIdentityRequestTimeoutData; - - constructor( - err: GetServerIdentityRequestTimeoutData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = err.message || `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.code != null) this.code = err.code; - - this.name = "GetServerIdentityRequestTimeout"; - } -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetServerIdentityRequestTimeout(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetServerIdentityRequestTimeout$Outbound = { - code?: number | undefined; - message?: string | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index ac7e03e6..00000000 --- a/src/sdk/models/errors/getserverlist.ts +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetServerListServerErrors = { - 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 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 GetServerListUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetServerListUnauthorizedData; - - constructor( - err: GetServerListUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetServerListUnauthorized"; - } -} - -export type GetServerListErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetServerListBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetServerListBadRequestData; - - constructor( - err: GetServerListBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetServerListBadRequest"; - } -} - -/** @internal */ -export const GetServerListServerErrors$inboundSchema: z.ZodType< - GetServerListServerErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetServerListServerErrors$outboundSchema: z.ZodType< - GetServerListServerErrors$Outbound, - z.ZodTypeDef, - GetServerListServerErrors -> = 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 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; -} - -export function getServerListServerErrorsToJSON( - getServerListServerErrors: GetServerListServerErrors, -): string { - return JSON.stringify( - GetServerListServerErrors$outboundSchema.parse(getServerListServerErrors), - ); -} - -export function getServerListServerErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetServerListServerErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetServerListServerErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetServerListUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetServerListUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetServerListErrors$outboundSchema: z.ZodType< - GetServerListErrors$Outbound, - z.ZodTypeDef, - GetServerListErrors -> = 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 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; -} - -export function getServerListErrorsToJSON( - getServerListErrors: GetServerListErrors, -): string { - return JSON.stringify( - GetServerListErrors$outboundSchema.parse(getServerListErrors), - ); -} - -export function getServerListErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetServerListErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetServerListErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetServerListBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetServerListBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index a110d291..00000000 --- a/src/sdk/models/errors/getserverpreferences.ts +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetServerPreferencesServerErrors = { - 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 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 GetServerPreferencesUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetServerPreferencesUnauthorizedData; - - constructor( - err: GetServerPreferencesUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetServerPreferencesUnauthorized"; - } -} - -export type GetServerPreferencesErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetServerPreferencesBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetServerPreferencesBadRequestData; - - constructor( - err: GetServerPreferencesBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetServerPreferencesBadRequest"; - } -} - -/** @internal */ -export const GetServerPreferencesServerErrors$inboundSchema: z.ZodType< - GetServerPreferencesServerErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetServerPreferencesServerErrors$outboundSchema: z.ZodType< - GetServerPreferencesServerErrors$Outbound, - z.ZodTypeDef, - GetServerPreferencesServerErrors -> = 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 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; -} - -export function getServerPreferencesServerErrorsToJSON( - getServerPreferencesServerErrors: GetServerPreferencesServerErrors, -): string { - return JSON.stringify( - GetServerPreferencesServerErrors$outboundSchema.parse( - getServerPreferencesServerErrors, - ), - ); -} - -export function getServerPreferencesServerErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetServerPreferencesServerErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetServerPreferencesServerErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetServerPreferencesUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetServerPreferencesUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetServerPreferencesErrors$outboundSchema: z.ZodType< - GetServerPreferencesErrors$Outbound, - z.ZodTypeDef, - GetServerPreferencesErrors -> = 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 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; -} - -export function getServerPreferencesErrorsToJSON( - getServerPreferencesErrors: GetServerPreferencesErrors, -): string { - return JSON.stringify( - GetServerPreferencesErrors$outboundSchema.parse(getServerPreferencesErrors), - ); -} - -export function getServerPreferencesErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetServerPreferencesErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetServerPreferencesErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetServerPreferencesBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetServerPreferencesBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 7c569e4f..00000000 --- a/src/sdk/models/errors/getserverresources.ts +++ /dev/null @@ -1,344 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetServerResourcesPlexErrors = { - 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 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 GetServerResourcesUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetServerResourcesUnauthorizedData; - - constructor( - err: GetServerResourcesUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetServerResourcesUnauthorized"; - } -} - -export type GetServerResourcesErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetServerResourcesBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetServerResourcesBadRequestData; - - constructor( - err: GetServerResourcesBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetServerResourcesBadRequest"; - } -} - -/** @internal */ -export const GetServerResourcesPlexErrors$inboundSchema: z.ZodType< - GetServerResourcesPlexErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetServerResourcesPlexErrors$outboundSchema: z.ZodType< - GetServerResourcesPlexErrors$Outbound, - z.ZodTypeDef, - GetServerResourcesPlexErrors -> = 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 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; -} - -export function getServerResourcesPlexErrorsToJSON( - getServerResourcesPlexErrors: GetServerResourcesPlexErrors, -): string { - return JSON.stringify( - GetServerResourcesPlexErrors$outboundSchema.parse( - getServerResourcesPlexErrors, - ), - ); -} - -export function getServerResourcesPlexErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetServerResourcesPlexErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetServerResourcesPlexErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetServerResourcesUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetServerResourcesUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetServerResourcesErrors$outboundSchema: z.ZodType< - GetServerResourcesErrors$Outbound, - z.ZodTypeDef, - GetServerResourcesErrors -> = 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 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; -} - -export function getServerResourcesErrorsToJSON( - getServerResourcesErrors: GetServerResourcesErrors, -): string { - return JSON.stringify( - GetServerResourcesErrors$outboundSchema.parse(getServerResourcesErrors), - ); -} - -export function getServerResourcesErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetServerResourcesErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetServerResourcesErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetServerResourcesBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetServerResourcesBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 1eff8438..00000000 --- a/src/sdk/models/errors/getsessionhistory.ts +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetSessionHistorySessionsErrors = { - 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 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 GetSessionHistoryUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetSessionHistoryUnauthorizedData; - - constructor( - err: GetSessionHistoryUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetSessionHistoryUnauthorized"; - } -} - -export type GetSessionHistoryErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetSessionHistoryBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetSessionHistoryBadRequestData; - - constructor( - err: GetSessionHistoryBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetSessionHistoryBadRequest"; - } -} - -/** @internal */ -export const GetSessionHistorySessionsErrors$inboundSchema: z.ZodType< - GetSessionHistorySessionsErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetSessionHistorySessionsErrors$outboundSchema: z.ZodType< - GetSessionHistorySessionsErrors$Outbound, - z.ZodTypeDef, - GetSessionHistorySessionsErrors -> = 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 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; -} - -export function getSessionHistorySessionsErrorsToJSON( - getSessionHistorySessionsErrors: GetSessionHistorySessionsErrors, -): string { - return JSON.stringify( - GetSessionHistorySessionsErrors$outboundSchema.parse( - getSessionHistorySessionsErrors, - ), - ); -} - -export function getSessionHistorySessionsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetSessionHistorySessionsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetSessionHistorySessionsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetSessionHistoryUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetSessionHistoryUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetSessionHistoryErrors$outboundSchema: z.ZodType< - GetSessionHistoryErrors$Outbound, - z.ZodTypeDef, - GetSessionHistoryErrors -> = 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 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; -} - -export function getSessionHistoryErrorsToJSON( - getSessionHistoryErrors: GetSessionHistoryErrors, -): string { - return JSON.stringify( - GetSessionHistoryErrors$outboundSchema.parse(getSessionHistoryErrors), - ); -} - -export function getSessionHistoryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetSessionHistoryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetSessionHistoryErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetSessionHistoryBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetSessionHistoryBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 6353a4c9..00000000 --- a/src/sdk/models/errors/getsessions.ts +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetSessionsSessionsErrors = { - 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 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 GetSessionsUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetSessionsUnauthorizedData; - - constructor( - err: GetSessionsUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetSessionsUnauthorized"; - } -} - -export type GetSessionsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetSessionsBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetSessionsBadRequestData; - - constructor( - err: GetSessionsBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetSessionsBadRequest"; - } -} - -/** @internal */ -export const GetSessionsSessionsErrors$inboundSchema: z.ZodType< - GetSessionsSessionsErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetSessionsSessionsErrors$outboundSchema: z.ZodType< - GetSessionsSessionsErrors$Outbound, - z.ZodTypeDef, - GetSessionsSessionsErrors -> = 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 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; -} - -export function getSessionsSessionsErrorsToJSON( - getSessionsSessionsErrors: GetSessionsSessionsErrors, -): string { - return JSON.stringify( - GetSessionsSessionsErrors$outboundSchema.parse(getSessionsSessionsErrors), - ); -} - -export function getSessionsSessionsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetSessionsSessionsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetSessionsSessionsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetSessionsUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetSessionsUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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< - 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; -}; - -/** @internal */ -export const GetSessionsErrors$outboundSchema: z.ZodType< - GetSessionsErrors$Outbound, - z.ZodTypeDef, - GetSessionsErrors -> = 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 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; -} - -export function getSessionsErrorsToJSON( - getSessionsErrors: GetSessionsErrors, -): string { - return JSON.stringify( - GetSessionsErrors$outboundSchema.parse(getSessionsErrors), - ); -} - -export function getSessionsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetSessionsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetSessionsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetSessionsBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetSessionsBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index ad6fc82f..00000000 --- a/src/sdk/models/errors/getsourceconnectioninformation.ts +++ /dev/null @@ -1,376 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetSourceConnectionInformationAuthenticationErrors = { - 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 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 GetSourceConnectionInformationUnauthorized extends PlexAPIError { - errors?: - | Array - | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetSourceConnectionInformationUnauthorizedData; - - constructor( - err: GetSourceConnectionInformationUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetSourceConnectionInformationUnauthorized"; - } -} - -export type GetSourceConnectionInformationErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetSourceConnectionInformationBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetSourceConnectionInformationBadRequestData; - - constructor( - err: GetSourceConnectionInformationBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetSourceConnectionInformationBadRequest"; - } -} - -/** @internal */ -export const GetSourceConnectionInformationAuthenticationErrors$inboundSchema: - z.ZodType< - GetSourceConnectionInformationAuthenticationErrors, - z.ZodTypeDef, - unknown - > = 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; -}; - -/** @internal */ -export const GetSourceConnectionInformationAuthenticationErrors$outboundSchema: - z.ZodType< - GetSourceConnectionInformationAuthenticationErrors$Outbound, - z.ZodTypeDef, - GetSourceConnectionInformationAuthenticationErrors - > = 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; -} - -export function getSourceConnectionInformationAuthenticationErrorsToJSON( - getSourceConnectionInformationAuthenticationErrors: - GetSourceConnectionInformationAuthenticationErrors, -): string { - return JSON.stringify( - GetSourceConnectionInformationAuthenticationErrors$outboundSchema.parse( - getSourceConnectionInformationAuthenticationErrors, - ), - ); -} - -export function getSourceConnectionInformationAuthenticationErrorsFromJSON( - jsonString: string, -): SafeParseResult< - GetSourceConnectionInformationAuthenticationErrors, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - GetSourceConnectionInformationAuthenticationErrors$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'GetSourceConnectionInformationAuthenticationErrors' from JSON`, - ); -} - -/** @internal */ -export const GetSourceConnectionInformationUnauthorized$inboundSchema: - z.ZodType = - z.object({ - errors: z.array( - z.lazy(() => - GetSourceConnectionInformationAuthenticationErrors$inboundSchema - ), - ).optional(), - RawResponse: z.instanceof(Response).optional(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), - }) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetSourceConnectionInformationUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetSourceConnectionInformationUnauthorized$Outbound = { - errors?: - | Array - | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -export const GetSourceConnectionInformationUnauthorized$outboundSchema: - z.ZodType< - GetSourceConnectionInformationUnauthorized$Outbound, - z.ZodTypeDef, - 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", - }); - }), - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetSourceConnectionInformationErrors$outboundSchema: z.ZodType< - GetSourceConnectionInformationErrors$Outbound, - z.ZodTypeDef, - GetSourceConnectionInformationErrors -> = 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 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; -} - -export function getSourceConnectionInformationErrorsToJSON( - getSourceConnectionInformationErrors: GetSourceConnectionInformationErrors, -): string { - return JSON.stringify( - GetSourceConnectionInformationErrors$outboundSchema.parse( - getSourceConnectionInformationErrors, - ), - ); -} - -export function getSourceConnectionInformationErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - GetSourceConnectionInformationErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetSourceConnectionInformationErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetSourceConnectionInformationBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetSourceConnectionInformationBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 02962a76..00000000 --- a/src/sdk/models/errors/getstatistics.ts +++ /dev/null @@ -1,344 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetStatisticsStatisticsErrors = { - 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 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 GetStatisticsUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetStatisticsUnauthorizedData; - - constructor( - err: GetStatisticsUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetStatisticsUnauthorized"; - } -} - -export type GetStatisticsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetStatisticsBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetStatisticsBadRequestData; - - constructor( - err: GetStatisticsBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetStatisticsBadRequest"; - } -} - -/** @internal */ -export const GetStatisticsStatisticsErrors$inboundSchema: z.ZodType< - GetStatisticsStatisticsErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetStatisticsStatisticsErrors$outboundSchema: z.ZodType< - GetStatisticsStatisticsErrors$Outbound, - z.ZodTypeDef, - GetStatisticsStatisticsErrors -> = 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 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; -} - -export function getStatisticsStatisticsErrorsToJSON( - getStatisticsStatisticsErrors: GetStatisticsStatisticsErrors, -): string { - return JSON.stringify( - GetStatisticsStatisticsErrors$outboundSchema.parse( - getStatisticsStatisticsErrors, - ), - ); -} - -export function getStatisticsStatisticsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetStatisticsStatisticsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetStatisticsStatisticsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetStatisticsUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetStatisticsUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetStatisticsErrors$outboundSchema: z.ZodType< - GetStatisticsErrors$Outbound, - z.ZodTypeDef, - GetStatisticsErrors -> = 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 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; -} - -export function getStatisticsErrorsToJSON( - getStatisticsErrors: GetStatisticsErrors, -): string { - return JSON.stringify( - GetStatisticsErrors$outboundSchema.parse(getStatisticsErrors), - ); -} - -export function getStatisticsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetStatisticsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetStatisticsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetStatisticsBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetStatisticsBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 22d8fc3f..00000000 --- a/src/sdk/models/errors/getthumbimage.ts +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetThumbImageMediaErrors = { - 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 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 GetThumbImageUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetThumbImageUnauthorizedData; - - constructor( - err: GetThumbImageUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetThumbImageUnauthorized"; - } -} - -export type GetThumbImageErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetThumbImageBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetThumbImageBadRequestData; - - constructor( - err: GetThumbImageBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetThumbImageBadRequest"; - } -} - -/** @internal */ -export const GetThumbImageMediaErrors$inboundSchema: z.ZodType< - GetThumbImageMediaErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetThumbImageMediaErrors$outboundSchema: z.ZodType< - GetThumbImageMediaErrors$Outbound, - z.ZodTypeDef, - GetThumbImageMediaErrors -> = 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 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; -} - -export function getThumbImageMediaErrorsToJSON( - getThumbImageMediaErrors: GetThumbImageMediaErrors, -): string { - return JSON.stringify( - GetThumbImageMediaErrors$outboundSchema.parse(getThumbImageMediaErrors), - ); -} - -export function getThumbImageMediaErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetThumbImageMediaErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetThumbImageMediaErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetThumbImageUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetThumbImageUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetThumbImageErrors$outboundSchema: z.ZodType< - GetThumbImageErrors$Outbound, - z.ZodTypeDef, - GetThumbImageErrors -> = 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 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; -} - -export function getThumbImageErrorsToJSON( - getThumbImageErrors: GetThumbImageErrors, -): string { - return JSON.stringify( - GetThumbImageErrors$outboundSchema.parse(getThumbImageErrors), - ); -} - -export function getThumbImageErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetThumbImageErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetThumbImageErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetThumbImageBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetThumbImageBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 2880d009..00000000 --- a/src/sdk/models/errors/gettimeline.ts +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetTimelineVideoErrors = { - 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 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 GetTimelineUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetTimelineUnauthorizedData; - - constructor( - err: GetTimelineUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetTimelineUnauthorized"; - } -} - -export type GetTimelineErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetTimelineBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetTimelineBadRequestData; - - constructor( - err: GetTimelineBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetTimelineBadRequest"; - } -} - -/** @internal */ -export const GetTimelineVideoErrors$inboundSchema: z.ZodType< - GetTimelineVideoErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetTimelineVideoErrors$outboundSchema: z.ZodType< - GetTimelineVideoErrors$Outbound, - z.ZodTypeDef, - GetTimelineVideoErrors -> = 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 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; -} - -export function getTimelineVideoErrorsToJSON( - getTimelineVideoErrors: GetTimelineVideoErrors, -): string { - return JSON.stringify( - GetTimelineVideoErrors$outboundSchema.parse(getTimelineVideoErrors), - ); -} - -export function getTimelineVideoErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetTimelineVideoErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetTimelineVideoErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetTimelineUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetTimelineUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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< - 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; -}; - -/** @internal */ -export const GetTimelineErrors$outboundSchema: z.ZodType< - GetTimelineErrors$Outbound, - z.ZodTypeDef, - GetTimelineErrors -> = 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 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; -} - -export function getTimelineErrorsToJSON( - getTimelineErrors: GetTimelineErrors, -): string { - return JSON.stringify( - GetTimelineErrors$outboundSchema.parse(getTimelineErrors), - ); -} - -export function getTimelineErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetTimelineErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetTimelineErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetTimelineBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetTimelineBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 9385f89b..00000000 --- a/src/sdk/models/errors/gettokenbypinid.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetTokenByPinIdPlexErrors = { - code?: number | undefined; - message?: string | undefined; -}; - -/** - * Not Found or Expired - */ -export type GetTokenByPinIdResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; -}; - -/** - * Not Found or Expired - */ -export class GetTokenByPinIdResponseBody extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetTokenByPinIdResponseBodyData; - - constructor( - err: GetTokenByPinIdResponseBodyData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetTokenByPinIdResponseBody"; - } -} - -export type GetTokenByPinIdErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -export type GetTokenByPinIdBadRequestData = { - 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 GetTokenByPinIdBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetTokenByPinIdBadRequestData; - - constructor( - err: GetTokenByPinIdBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetTokenByPinIdBadRequest"; - } -} - -/** @internal */ -export const GetTokenByPinIdPlexErrors$inboundSchema: z.ZodType< - GetTokenByPinIdPlexErrors, - z.ZodTypeDef, - unknown -> = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), -}); - -/** @internal */ -export type GetTokenByPinIdPlexErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; -}; - -/** @internal */ -export const GetTokenByPinIdPlexErrors$outboundSchema: z.ZodType< - GetTokenByPinIdPlexErrors$Outbound, - z.ZodTypeDef, - GetTokenByPinIdPlexErrors -> = z.object({ - code: z.number().int().optional(), - message: 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 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; -} - -export function getTokenByPinIdPlexErrorsToJSON( - getTokenByPinIdPlexErrors: GetTokenByPinIdPlexErrors, -): string { - return JSON.stringify( - GetTokenByPinIdPlexErrors$outboundSchema.parse(getTokenByPinIdPlexErrors), - ); -} - -export function getTokenByPinIdPlexErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetTokenByPinIdPlexErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetTokenByPinIdPlexErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetTokenByPinIdResponseBody(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetTokenByPinIdResponseBody$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(() => 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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetTokenByPinIdErrors$outboundSchema: z.ZodType< - GetTokenByPinIdErrors$Outbound, - z.ZodTypeDef, - GetTokenByPinIdErrors -> = 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 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; -} - -export function getTokenByPinIdErrorsToJSON( - getTokenByPinIdErrors: GetTokenByPinIdErrors, -): string { - return JSON.stringify( - GetTokenByPinIdErrors$outboundSchema.parse(getTokenByPinIdErrors), - ); -} - -export function getTokenByPinIdErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetTokenByPinIdErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetTokenByPinIdErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetTokenByPinIdBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetTokenByPinIdBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 8acdf87a..00000000 --- a/src/sdk/models/errors/gettokendetails.ts +++ /dev/null @@ -1,348 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.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 PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetTokenDetailsUnauthorizedData; - - constructor( - err: GetTokenDetailsUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - 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 PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetTokenDetailsBadRequestData; - - constructor( - err: GetTokenDetailsBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - 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; -} - -export function getTokenDetailsAuthenticationErrorsToJSON( - getTokenDetailsAuthenticationErrors: GetTokenDetailsAuthenticationErrors, -): string { - return JSON.stringify( - GetTokenDetailsAuthenticationErrors$outboundSchema.parse( - getTokenDetailsAuthenticationErrors, - ), - ); -} - -export function getTokenDetailsAuthenticationErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - GetTokenDetailsAuthenticationErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetTokenDetailsAuthenticationErrors' from JSON`, - ); -} - -/** @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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetTokenDetailsUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @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; -} - -export function getTokenDetailsErrorsToJSON( - getTokenDetailsErrors: GetTokenDetailsErrors, -): string { - return JSON.stringify( - GetTokenDetailsErrors$outboundSchema.parse(getTokenDetailsErrors), - ); -} - -export function getTokenDetailsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetTokenDetailsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetTokenDetailsErrors' from JSON`, - ); -} - -/** @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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetTokenDetailsBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @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 deleted file mode 100644 index 56f3c97b..00000000 --- a/src/sdk/models/errors/gettopwatchedcontent.ts +++ /dev/null @@ -1,346 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetTopWatchedContentLibraryErrors = { - 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 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 GetTopWatchedContentUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetTopWatchedContentUnauthorizedData; - - constructor( - err: GetTopWatchedContentUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetTopWatchedContentUnauthorized"; - } -} - -export type GetTopWatchedContentErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetTopWatchedContentBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetTopWatchedContentBadRequestData; - - constructor( - err: GetTopWatchedContentBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetTopWatchedContentBadRequest"; - } -} - -/** @internal */ -export const GetTopWatchedContentLibraryErrors$inboundSchema: z.ZodType< - GetTopWatchedContentLibraryErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetTopWatchedContentLibraryErrors$outboundSchema: z.ZodType< - GetTopWatchedContentLibraryErrors$Outbound, - z.ZodTypeDef, - GetTopWatchedContentLibraryErrors -> = 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 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; -} - -export function getTopWatchedContentLibraryErrorsToJSON( - getTopWatchedContentLibraryErrors: GetTopWatchedContentLibraryErrors, -): string { - return JSON.stringify( - GetTopWatchedContentLibraryErrors$outboundSchema.parse( - getTopWatchedContentLibraryErrors, - ), - ); -} - -export function getTopWatchedContentLibraryErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetTopWatchedContentLibraryErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetTopWatchedContentLibraryErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetTopWatchedContentUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetTopWatchedContentUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetTopWatchedContentErrors$outboundSchema: z.ZodType< - GetTopWatchedContentErrors$Outbound, - z.ZodTypeDef, - GetTopWatchedContentErrors -> = 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 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; -} - -export function getTopWatchedContentErrorsToJSON( - getTopWatchedContentErrors: GetTopWatchedContentErrors, -): string { - return JSON.stringify( - GetTopWatchedContentErrors$outboundSchema.parse(getTopWatchedContentErrors), - ); -} - -export function getTopWatchedContentErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetTopWatchedContentErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetTopWatchedContentErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetTopWatchedContentBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetTopWatchedContentBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index faa74311..00000000 --- a/src/sdk/models/errors/gettranscodesessions.ts +++ /dev/null @@ -1,348 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetTranscodeSessionsSessionsErrors = { - 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 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 GetTranscodeSessionsUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetTranscodeSessionsUnauthorizedData; - - constructor( - err: GetTranscodeSessionsUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetTranscodeSessionsUnauthorized"; - } -} - -export type GetTranscodeSessionsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetTranscodeSessionsBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetTranscodeSessionsBadRequestData; - - constructor( - err: GetTranscodeSessionsBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetTranscodeSessionsBadRequest"; - } -} - -/** @internal */ -export const GetTranscodeSessionsSessionsErrors$inboundSchema: z.ZodType< - GetTranscodeSessionsSessionsErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetTranscodeSessionsSessionsErrors$outboundSchema: z.ZodType< - GetTranscodeSessionsSessionsErrors$Outbound, - z.ZodTypeDef, - GetTranscodeSessionsSessionsErrors -> = 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 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; -} - -export function getTranscodeSessionsSessionsErrorsToJSON( - getTranscodeSessionsSessionsErrors: GetTranscodeSessionsSessionsErrors, -): string { - return JSON.stringify( - GetTranscodeSessionsSessionsErrors$outboundSchema.parse( - getTranscodeSessionsSessionsErrors, - ), - ); -} - -export function getTranscodeSessionsSessionsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - GetTranscodeSessionsSessionsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetTranscodeSessionsSessionsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetTranscodeSessionsUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetTranscodeSessionsUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetTranscodeSessionsErrors$outboundSchema: z.ZodType< - GetTranscodeSessionsErrors$Outbound, - z.ZodTypeDef, - GetTranscodeSessionsErrors -> = 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 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; -} - -export function getTranscodeSessionsErrorsToJSON( - getTranscodeSessionsErrors: GetTranscodeSessionsErrors, -): string { - return JSON.stringify( - GetTranscodeSessionsErrors$outboundSchema.parse(getTranscodeSessionsErrors), - ); -} - -export function getTranscodeSessionsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetTranscodeSessionsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetTranscodeSessionsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetTranscodeSessionsBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetTranscodeSessionsBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index b7f78ebe..00000000 --- a/src/sdk/models/errors/gettransienttoken.ts +++ /dev/null @@ -1,349 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetTransientTokenAuthenticationErrors = { - 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 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 GetTransientTokenUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetTransientTokenUnauthorizedData; - - constructor( - err: GetTransientTokenUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetTransientTokenUnauthorized"; - } -} - -export type GetTransientTokenErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetTransientTokenBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetTransientTokenBadRequestData; - - constructor( - err: GetTransientTokenBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetTransientTokenBadRequest"; - } -} - -/** @internal */ -export const GetTransientTokenAuthenticationErrors$inboundSchema: z.ZodType< - GetTransientTokenAuthenticationErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetTransientTokenAuthenticationErrors$outboundSchema: z.ZodType< - GetTransientTokenAuthenticationErrors$Outbound, - z.ZodTypeDef, - GetTransientTokenAuthenticationErrors -> = 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 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; -} - -export function getTransientTokenAuthenticationErrorsToJSON( - getTransientTokenAuthenticationErrors: GetTransientTokenAuthenticationErrors, -): string { - return JSON.stringify( - GetTransientTokenAuthenticationErrors$outboundSchema.parse( - getTransientTokenAuthenticationErrors, - ), - ); -} - -export function getTransientTokenAuthenticationErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - GetTransientTokenAuthenticationErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetTransientTokenAuthenticationErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetTransientTokenUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetTransientTokenUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetTransientTokenErrors$outboundSchema: z.ZodType< - GetTransientTokenErrors$Outbound, - z.ZodTypeDef, - GetTransientTokenErrors -> = 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 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; -} - -export function getTransientTokenErrorsToJSON( - getTransientTokenErrors: GetTransientTokenErrors, -): string { - return JSON.stringify( - GetTransientTokenErrors$outboundSchema.parse(getTransientTokenErrors), - ); -} - -export function getTransientTokenErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetTransientTokenErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetTransientTokenErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetTransientTokenBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetTransientTokenBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 0c82df73..00000000 --- a/src/sdk/models/errors/getupdatestatus.ts +++ /dev/null @@ -1,343 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetUpdateStatusUpdaterErrors = { - 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 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 GetUpdateStatusUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetUpdateStatusUnauthorizedData; - - constructor( - err: GetUpdateStatusUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetUpdateStatusUnauthorized"; - } -} - -export type GetUpdateStatusErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetUpdateStatusBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetUpdateStatusBadRequestData; - - constructor( - err: GetUpdateStatusBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetUpdateStatusBadRequest"; - } -} - -/** @internal */ -export const GetUpdateStatusUpdaterErrors$inboundSchema: z.ZodType< - GetUpdateStatusUpdaterErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetUpdateStatusUpdaterErrors$outboundSchema: z.ZodType< - GetUpdateStatusUpdaterErrors$Outbound, - z.ZodTypeDef, - GetUpdateStatusUpdaterErrors -> = 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 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; -} - -export function getUpdateStatusUpdaterErrorsToJSON( - getUpdateStatusUpdaterErrors: GetUpdateStatusUpdaterErrors, -): string { - return JSON.stringify( - GetUpdateStatusUpdaterErrors$outboundSchema.parse( - getUpdateStatusUpdaterErrors, - ), - ); -} - -export function getUpdateStatusUpdaterErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetUpdateStatusUpdaterErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetUpdateStatusUpdaterErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetUpdateStatusUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetUpdateStatusUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetUpdateStatusErrors$outboundSchema: z.ZodType< - GetUpdateStatusErrors$Outbound, - z.ZodTypeDef, - GetUpdateStatusErrors -> = 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 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; -} - -export function getUpdateStatusErrorsToJSON( - getUpdateStatusErrors: GetUpdateStatusErrors, -): string { - return JSON.stringify( - GetUpdateStatusErrors$outboundSchema.parse(getUpdateStatusErrors), - ); -} - -export function getUpdateStatusErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetUpdateStatusErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetUpdateStatusErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetUpdateStatusBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetUpdateStatusBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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/getuserfriends.ts b/src/sdk/models/errors/getuserfriends.ts deleted file mode 100644 index bbeadb12..00000000 --- a/src/sdk/models/errors/getuserfriends.ts +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetUserFriendsPlexErrors = { - 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 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 GetUserFriendsUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetUserFriendsUnauthorizedData; - - constructor( - err: GetUserFriendsUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetUserFriendsUnauthorized"; - } -} - -export type GetUserFriendsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetUserFriendsBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetUserFriendsBadRequestData; - - constructor( - err: GetUserFriendsBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetUserFriendsBadRequest"; - } -} - -/** @internal */ -export const GetUserFriendsPlexErrors$inboundSchema: z.ZodType< - GetUserFriendsPlexErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetUserFriendsPlexErrors$outboundSchema: z.ZodType< - GetUserFriendsPlexErrors$Outbound, - z.ZodTypeDef, - GetUserFriendsPlexErrors -> = 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 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; -} - -export function getUserFriendsPlexErrorsToJSON( - getUserFriendsPlexErrors: GetUserFriendsPlexErrors, -): string { - return JSON.stringify( - GetUserFriendsPlexErrors$outboundSchema.parse(getUserFriendsPlexErrors), - ); -} - -export function getUserFriendsPlexErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetUserFriendsPlexErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetUserFriendsPlexErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetUserFriendsUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetUserFriendsUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetUserFriendsErrors$outboundSchema: z.ZodType< - GetUserFriendsErrors$Outbound, - z.ZodTypeDef, - GetUserFriendsErrors -> = 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 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; -} - -export function getUserFriendsErrorsToJSON( - getUserFriendsErrors: GetUserFriendsErrors, -): string { - return JSON.stringify( - GetUserFriendsErrors$outboundSchema.parse(getUserFriendsErrors), - ); -} - -export function getUserFriendsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetUserFriendsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetUserFriendsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetUserFriendsBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetUserFriendsBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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/getusers.ts b/src/sdk/models/errors/getusers.ts deleted file mode 100644 index 466e85e0..00000000 --- a/src/sdk/models/errors/getusers.ts +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetUsersUsersErrors = { - 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 GetUsersUnauthorizedData = { - 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 GetUsersUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetUsersUnauthorizedData; - - constructor( - err: GetUsersUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetUsersUnauthorized"; - } -} - -export type GetUsersErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -export type GetUsersBadRequestData = { - 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 GetUsersBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetUsersBadRequestData; - - constructor( - err: GetUsersBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetUsersBadRequest"; - } -} - -/** @internal */ -export const GetUsersUsersErrors$inboundSchema: z.ZodType< - GetUsersUsersErrors, - z.ZodTypeDef, - unknown -> = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), -}); - -/** @internal */ -export type GetUsersUsersErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** @internal */ -export const GetUsersUsersErrors$outboundSchema: z.ZodType< - GetUsersUsersErrors$Outbound, - z.ZodTypeDef, - GetUsersUsersErrors -> = 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 GetUsersUsersErrors$ { - /** @deprecated use `GetUsersUsersErrors$inboundSchema` instead. */ - export const inboundSchema = GetUsersUsersErrors$inboundSchema; - /** @deprecated use `GetUsersUsersErrors$outboundSchema` instead. */ - export const outboundSchema = GetUsersUsersErrors$outboundSchema; - /** @deprecated use `GetUsersUsersErrors$Outbound` instead. */ - export type Outbound = GetUsersUsersErrors$Outbound; -} - -export function getUsersUsersErrorsToJSON( - getUsersUsersErrors: GetUsersUsersErrors, -): string { - return JSON.stringify( - GetUsersUsersErrors$outboundSchema.parse(getUsersUsersErrors), - ); -} - -export function getUsersUsersErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetUsersUsersErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetUsersUsersErrors' from JSON`, - ); -} - -/** @internal */ -export const GetUsersUnauthorized$inboundSchema: z.ZodType< - GetUsersUnauthorized, - z.ZodTypeDef, - unknown -> = z.object({ - errors: z.array(z.lazy(() => GetUsersUsersErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetUsersUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetUsersUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -export const GetUsersUnauthorized$outboundSchema: z.ZodType< - GetUsersUnauthorized$Outbound, - z.ZodTypeDef, - GetUsersUnauthorized -> = z.instanceof(GetUsersUnauthorized) - .transform(v => v.data$) - .pipe( - z.object({ - errors: z.array(z.lazy(() => GetUsersUsersErrors$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 GetUsersUnauthorized$ { - /** @deprecated use `GetUsersUnauthorized$inboundSchema` instead. */ - export const inboundSchema = GetUsersUnauthorized$inboundSchema; - /** @deprecated use `GetUsersUnauthorized$outboundSchema` instead. */ - export const outboundSchema = GetUsersUnauthorized$outboundSchema; - /** @deprecated use `GetUsersUnauthorized$Outbound` instead. */ - export type Outbound = GetUsersUnauthorized$Outbound; -} - -/** @internal */ -export const GetUsersErrors$inboundSchema: z.ZodType< - GetUsersErrors, - z.ZodTypeDef, - unknown -> = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), -}); - -/** @internal */ -export type GetUsersErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** @internal */ -export const GetUsersErrors$outboundSchema: z.ZodType< - GetUsersErrors$Outbound, - z.ZodTypeDef, - GetUsersErrors -> = 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 GetUsersErrors$ { - /** @deprecated use `GetUsersErrors$inboundSchema` instead. */ - export const inboundSchema = GetUsersErrors$inboundSchema; - /** @deprecated use `GetUsersErrors$outboundSchema` instead. */ - export const outboundSchema = GetUsersErrors$outboundSchema; - /** @deprecated use `GetUsersErrors$Outbound` instead. */ - export type Outbound = GetUsersErrors$Outbound; -} - -export function getUsersErrorsToJSON(getUsersErrors: GetUsersErrors): string { - return JSON.stringify(GetUsersErrors$outboundSchema.parse(getUsersErrors)); -} - -export function getUsersErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetUsersErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetUsersErrors' from JSON`, - ); -} - -/** @internal */ -export const GetUsersBadRequest$inboundSchema: z.ZodType< - GetUsersBadRequest, - z.ZodTypeDef, - unknown -> = z.object({ - errors: z.array(z.lazy(() => GetUsersErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetUsersBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetUsersBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -export const GetUsersBadRequest$outboundSchema: z.ZodType< - GetUsersBadRequest$Outbound, - z.ZodTypeDef, - GetUsersBadRequest -> = z.instanceof(GetUsersBadRequest) - .transform(v => v.data$) - .pipe( - z.object({ - errors: z.array(z.lazy(() => GetUsersErrors$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 GetUsersBadRequest$ { - /** @deprecated use `GetUsersBadRequest$inboundSchema` instead. */ - export const inboundSchema = GetUsersBadRequest$inboundSchema; - /** @deprecated use `GetUsersBadRequest$outboundSchema` instead. */ - export const outboundSchema = GetUsersBadRequest$outboundSchema; - /** @deprecated use `GetUsersBadRequest$Outbound` instead. */ - export type Outbound = GetUsersBadRequest$Outbound; -} diff --git a/src/sdk/models/errors/getwatchlist.ts b/src/sdk/models/errors/getwatchlist.ts deleted file mode 100644 index e8ba611c..00000000 --- a/src/sdk/models/errors/getwatchlist.ts +++ /dev/null @@ -1,343 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type GetWatchListWatchlistErrors = { - 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 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 GetWatchListUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetWatchListUnauthorizedData; - - constructor( - err: GetWatchListUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetWatchListUnauthorized"; - } -} - -export type GetWatchListErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 GetWatchListBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetWatchListBadRequestData; - - constructor( - err: GetWatchListBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "GetWatchListBadRequest"; - } -} - -/** @internal */ -export const GetWatchListWatchlistErrors$inboundSchema: z.ZodType< - GetWatchListWatchlistErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const GetWatchListWatchlistErrors$outboundSchema: z.ZodType< - GetWatchListWatchlistErrors$Outbound, - z.ZodTypeDef, - GetWatchListWatchlistErrors -> = 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 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; -} - -export function getWatchListWatchlistErrorsToJSON( - getWatchListWatchlistErrors: GetWatchListWatchlistErrors, -): string { - return JSON.stringify( - GetWatchListWatchlistErrors$outboundSchema.parse( - getWatchListWatchlistErrors, - ), - ); -} - -export function getWatchListWatchlistErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetWatchListWatchlistErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetWatchListWatchlistErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetWatchListUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetWatchListUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const GetWatchListErrors$outboundSchema: z.ZodType< - GetWatchListErrors$Outbound, - z.ZodTypeDef, - GetWatchListErrors -> = 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 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; -} - -export function getWatchListErrorsToJSON( - getWatchListErrors: GetWatchListErrors, -): string { - return JSON.stringify( - GetWatchListErrors$outboundSchema.parse(getWatchListErrors), - ); -} - -export function getWatchListErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetWatchListErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetWatchListErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new GetWatchListBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type GetWatchListBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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/index.ts b/src/sdk/models/errors/index.ts index 9adf7590..a8a7cb4d 100644 --- a/src/sdk/models/errors/index.ts +++ b/src/sdk/models/errors/index.ts @@ -2,86 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export * from "./addplaylistcontents.js"; -export * from "./applyupdates.js"; -export * from "./cancelserveractivities.js"; -export * from "./checkforupdates.js"; -export * from "./clearplaylistcontents.js"; -export * from "./createplaylist.js"; -export * from "./deletelibrary.js"; -export * from "./deleteplaylist.js"; -export * from "./enablepapertrail.js"; -export * from "./getactorslibrary.js"; -export * from "./getalllibraries.js"; -export * from "./getavailableclients.js"; -export * from "./getbandwidthstatistics.js"; -export * from "./getbannerimage.js"; -export * from "./getbutlertasks.js"; -export * from "./getcompanionsdata.js"; -export * from "./getcountrieslibrary.js"; -export * from "./getdevices.js"; -export * from "./getfilehash.js"; -export * from "./getgenreslibrary.js"; -export * from "./getgeodata.js"; -export * from "./getglobalhubs.js"; -export * from "./gethomedata.js"; -export * from "./getlibrarydetails.js"; -export * from "./getlibraryhubs.js"; -export * from "./getlibraryitems.js"; -export * from "./getlibrarysectionsall.js"; -export * from "./getmediametadata.js"; -export * from "./getmediaproviders.js"; -export * from "./getmetadatachildren.js"; -export * from "./getmyplexaccount.js"; -export * from "./getpin.js"; -export * from "./getplaylist.js"; -export * from "./getplaylistcontents.js"; -export * from "./getplaylists.js"; -export * from "./getrecentlyaddedlibrary.js"; -export * from "./getrefreshlibrarymetadata.js"; -export * from "./getresizedphoto.js"; -export * from "./getresourcesstatistics.js"; -export * from "./getsearchalllibraries.js"; -export * from "./getsearchlibrary.js"; -export * from "./getsearchresults.js"; -export * from "./getserveractivities.js"; -export * from "./getservercapabilities.js"; -export * from "./getserveridentity.js"; -export * from "./getserverlist.js"; -export * from "./getserverpreferences.js"; -export * from "./getserverresources.js"; -export * from "./getsessionhistory.js"; -export * from "./getsessions.js"; -export * from "./getsourceconnectioninformation.js"; -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 "./getuserfriends.js"; -export * from "./getusers.js"; -export * from "./getwatchlist.js"; export * from "./httpclienterrors.js"; -export * from "./logline.js"; -export * from "./logmultiline.js"; -export * from "./markplayed.js"; -export * from "./markunplayed.js"; -export * from "./performsearch.js"; -export * from "./performvoicesearch.js"; -export * from "./postuserssignindata.js"; +export * from "./plexapierror.js"; export * from "./responsevalidationerror.js"; export * from "./sdkerror.js"; export * from "./sdkvalidationerror.js"; -export * from "./startalltasks.js"; -export * from "./starttask.js"; -export * from "./startuniversaltranscode.js"; -export * from "./stopalltasks.js"; -export * from "./stoptask.js"; -export * from "./stoptranscodesession.js"; -export * from "./updateplaylist.js"; -export * from "./updateplayprogress.js"; -export * from "./uploadplaylist.js"; diff --git a/src/sdk/models/errors/logline.ts b/src/sdk/models/errors/logline.ts deleted file mode 100644 index b5fe1929..00000000 --- a/src/sdk/models/errors/logline.ts +++ /dev/null @@ -1,334 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type LogLineLogErrors = { - 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 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 LogLineUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: LogLineUnauthorizedData; - - constructor( - err: LogLineUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "LogLineUnauthorized"; - } -} - -export type LogLineErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 LogLineBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: LogLineBadRequestData; - - constructor( - err: LogLineBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "LogLineBadRequest"; - } -} - -/** @internal */ -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; -}; - -/** @internal */ -export const LogLineLogErrors$outboundSchema: z.ZodType< - LogLineLogErrors$Outbound, - z.ZodTypeDef, - LogLineLogErrors -> = 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 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; -} - -export function logLineLogErrorsToJSON( - logLineLogErrors: LogLineLogErrors, -): string { - return JSON.stringify( - LogLineLogErrors$outboundSchema.parse(logLineLogErrors), - ); -} - -export function logLineLogErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => LogLineLogErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'LogLineLogErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new LogLineUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type LogLineUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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< - 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; -}; - -/** @internal */ -export const LogLineErrors$outboundSchema: z.ZodType< - LogLineErrors$Outbound, - z.ZodTypeDef, - LogLineErrors -> = 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 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; -} - -export function logLineErrorsToJSON(logLineErrors: LogLineErrors): string { - return JSON.stringify(LogLineErrors$outboundSchema.parse(logLineErrors)); -} - -export function logLineErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => LogLineErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'LogLineErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new LogLineBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type LogLineBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index cc617edb..00000000 --- a/src/sdk/models/errors/logmultiline.ts +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type LogMultiLineLogErrors = { - 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 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 LogMultiLineUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: LogMultiLineUnauthorizedData; - - constructor( - err: LogMultiLineUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "LogMultiLineUnauthorized"; - } -} - -export type LogMultiLineErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 LogMultiLineBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: LogMultiLineBadRequestData; - - constructor( - err: LogMultiLineBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "LogMultiLineBadRequest"; - } -} - -/** @internal */ -export const LogMultiLineLogErrors$inboundSchema: z.ZodType< - LogMultiLineLogErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const LogMultiLineLogErrors$outboundSchema: z.ZodType< - LogMultiLineLogErrors$Outbound, - z.ZodTypeDef, - LogMultiLineLogErrors -> = 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 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; -} - -export function logMultiLineLogErrorsToJSON( - logMultiLineLogErrors: LogMultiLineLogErrors, -): string { - return JSON.stringify( - LogMultiLineLogErrors$outboundSchema.parse(logMultiLineLogErrors), - ); -} - -export function logMultiLineLogErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => LogMultiLineLogErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'LogMultiLineLogErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new LogMultiLineUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type LogMultiLineUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const LogMultiLineErrors$outboundSchema: z.ZodType< - LogMultiLineErrors$Outbound, - z.ZodTypeDef, - LogMultiLineErrors -> = 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 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; -} - -export function logMultiLineErrorsToJSON( - logMultiLineErrors: LogMultiLineErrors, -): string { - return JSON.stringify( - LogMultiLineErrors$outboundSchema.parse(logMultiLineErrors), - ); -} - -export function logMultiLineErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => LogMultiLineErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'LogMultiLineErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new LogMultiLineBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type LogMultiLineBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index be58e402..00000000 --- a/src/sdk/models/errors/markplayed.ts +++ /dev/null @@ -1,339 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type MarkPlayedMediaErrors = { - 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 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 MarkPlayedUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: MarkPlayedUnauthorizedData; - - constructor( - err: MarkPlayedUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "MarkPlayedUnauthorized"; - } -} - -export type MarkPlayedErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 MarkPlayedBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: MarkPlayedBadRequestData; - - constructor( - err: MarkPlayedBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "MarkPlayedBadRequest"; - } -} - -/** @internal */ -export const MarkPlayedMediaErrors$inboundSchema: z.ZodType< - MarkPlayedMediaErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const MarkPlayedMediaErrors$outboundSchema: z.ZodType< - MarkPlayedMediaErrors$Outbound, - z.ZodTypeDef, - MarkPlayedMediaErrors -> = 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 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; -} - -export function markPlayedMediaErrorsToJSON( - markPlayedMediaErrors: MarkPlayedMediaErrors, -): string { - return JSON.stringify( - MarkPlayedMediaErrors$outboundSchema.parse(markPlayedMediaErrors), - ); -} - -export function markPlayedMediaErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => MarkPlayedMediaErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'MarkPlayedMediaErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new MarkPlayedUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type MarkPlayedUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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< - 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; -}; - -/** @internal */ -export const MarkPlayedErrors$outboundSchema: z.ZodType< - MarkPlayedErrors$Outbound, - z.ZodTypeDef, - MarkPlayedErrors -> = 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 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; -} - -export function markPlayedErrorsToJSON( - markPlayedErrors: MarkPlayedErrors, -): string { - return JSON.stringify( - MarkPlayedErrors$outboundSchema.parse(markPlayedErrors), - ); -} - -export function markPlayedErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => MarkPlayedErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'MarkPlayedErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new MarkPlayedBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type MarkPlayedBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 94c9f876..00000000 --- a/src/sdk/models/errors/markunplayed.ts +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type MarkUnplayedMediaErrors = { - 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 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 MarkUnplayedUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: MarkUnplayedUnauthorizedData; - - constructor( - err: MarkUnplayedUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "MarkUnplayedUnauthorized"; - } -} - -export type MarkUnplayedErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 MarkUnplayedBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: MarkUnplayedBadRequestData; - - constructor( - err: MarkUnplayedBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "MarkUnplayedBadRequest"; - } -} - -/** @internal */ -export const MarkUnplayedMediaErrors$inboundSchema: z.ZodType< - MarkUnplayedMediaErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const MarkUnplayedMediaErrors$outboundSchema: z.ZodType< - MarkUnplayedMediaErrors$Outbound, - z.ZodTypeDef, - MarkUnplayedMediaErrors -> = 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 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; -} - -export function markUnplayedMediaErrorsToJSON( - markUnplayedMediaErrors: MarkUnplayedMediaErrors, -): string { - return JSON.stringify( - MarkUnplayedMediaErrors$outboundSchema.parse(markUnplayedMediaErrors), - ); -} - -export function markUnplayedMediaErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => MarkUnplayedMediaErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'MarkUnplayedMediaErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new MarkUnplayedUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type MarkUnplayedUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const MarkUnplayedErrors$outboundSchema: z.ZodType< - MarkUnplayedErrors$Outbound, - z.ZodTypeDef, - MarkUnplayedErrors -> = 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 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; -} - -export function markUnplayedErrorsToJSON( - markUnplayedErrors: MarkUnplayedErrors, -): string { - return JSON.stringify( - MarkUnplayedErrors$outboundSchema.parse(markUnplayedErrors), - ); -} - -export function markUnplayedErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => MarkUnplayedErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'MarkUnplayedErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new MarkUnplayedBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type MarkUnplayedBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 6a905f90..00000000 --- a/src/sdk/models/errors/performsearch.ts +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type PerformSearchSearchErrors = { - 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 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 PerformSearchUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: PerformSearchUnauthorizedData; - - constructor( - err: PerformSearchUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "PerformSearchUnauthorized"; - } -} - -export type PerformSearchErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 PerformSearchBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: PerformSearchBadRequestData; - - constructor( - err: PerformSearchBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "PerformSearchBadRequest"; - } -} - -/** @internal */ -export const PerformSearchSearchErrors$inboundSchema: z.ZodType< - PerformSearchSearchErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const PerformSearchSearchErrors$outboundSchema: z.ZodType< - PerformSearchSearchErrors$Outbound, - z.ZodTypeDef, - PerformSearchSearchErrors -> = 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 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; -} - -export function performSearchSearchErrorsToJSON( - performSearchSearchErrors: PerformSearchSearchErrors, -): string { - return JSON.stringify( - PerformSearchSearchErrors$outboundSchema.parse(performSearchSearchErrors), - ); -} - -export function performSearchSearchErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PerformSearchSearchErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PerformSearchSearchErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new PerformSearchUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type PerformSearchUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const PerformSearchErrors$outboundSchema: z.ZodType< - PerformSearchErrors$Outbound, - z.ZodTypeDef, - PerformSearchErrors -> = 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 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; -} - -export function performSearchErrorsToJSON( - performSearchErrors: PerformSearchErrors, -): string { - return JSON.stringify( - PerformSearchErrors$outboundSchema.parse(performSearchErrors), - ); -} - -export function performSearchErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PerformSearchErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PerformSearchErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new PerformSearchBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type PerformSearchBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index a5cb897e..00000000 --- a/src/sdk/models/errors/performvoicesearch.ts +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type PerformVoiceSearchSearchErrors = { - 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 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 PerformVoiceSearchUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: PerformVoiceSearchUnauthorizedData; - - constructor( - err: PerformVoiceSearchUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "PerformVoiceSearchUnauthorized"; - } -} - -export type PerformVoiceSearchErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 PerformVoiceSearchBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: PerformVoiceSearchBadRequestData; - - constructor( - err: PerformVoiceSearchBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "PerformVoiceSearchBadRequest"; - } -} - -/** @internal */ -export const PerformVoiceSearchSearchErrors$inboundSchema: z.ZodType< - PerformVoiceSearchSearchErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const PerformVoiceSearchSearchErrors$outboundSchema: z.ZodType< - PerformVoiceSearchSearchErrors$Outbound, - z.ZodTypeDef, - PerformVoiceSearchSearchErrors -> = 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 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; -} - -export function performVoiceSearchSearchErrorsToJSON( - performVoiceSearchSearchErrors: PerformVoiceSearchSearchErrors, -): string { - return JSON.stringify( - PerformVoiceSearchSearchErrors$outboundSchema.parse( - performVoiceSearchSearchErrors, - ), - ); -} - -export function performVoiceSearchSearchErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PerformVoiceSearchSearchErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PerformVoiceSearchSearchErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new PerformVoiceSearchUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type PerformVoiceSearchUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const PerformVoiceSearchErrors$outboundSchema: z.ZodType< - PerformVoiceSearchErrors$Outbound, - z.ZodTypeDef, - PerformVoiceSearchErrors -> = 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 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; -} - -export function performVoiceSearchErrorsToJSON( - performVoiceSearchErrors: PerformVoiceSearchErrors, -): string { - return JSON.stringify( - PerformVoiceSearchErrors$outboundSchema.parse(performVoiceSearchErrors), - ); -} - -export function performVoiceSearchErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PerformVoiceSearchErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PerformVoiceSearchErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new PerformVoiceSearchBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type PerformVoiceSearchBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 0018587e..00000000 --- a/src/sdk/models/errors/postuserssignindata.ts +++ /dev/null @@ -1,355 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type PostUsersSignInDataAuthenticationErrors = { - 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 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 PostUsersSignInDataUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: PostUsersSignInDataUnauthorizedData; - - constructor( - err: PostUsersSignInDataUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "PostUsersSignInDataUnauthorized"; - } -} - -export type PostUsersSignInDataErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 PostUsersSignInDataBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: PostUsersSignInDataBadRequestData; - - constructor( - err: PostUsersSignInDataBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "PostUsersSignInDataBadRequest"; - } -} - -/** @internal */ -export const PostUsersSignInDataAuthenticationErrors$inboundSchema: z.ZodType< - PostUsersSignInDataAuthenticationErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const PostUsersSignInDataAuthenticationErrors$outboundSchema: z.ZodType< - PostUsersSignInDataAuthenticationErrors$Outbound, - z.ZodTypeDef, - PostUsersSignInDataAuthenticationErrors -> = 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 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; -} - -export function postUsersSignInDataAuthenticationErrorsToJSON( - postUsersSignInDataAuthenticationErrors: - PostUsersSignInDataAuthenticationErrors, -): string { - return JSON.stringify( - PostUsersSignInDataAuthenticationErrors$outboundSchema.parse( - postUsersSignInDataAuthenticationErrors, - ), - ); -} - -export function postUsersSignInDataAuthenticationErrorsFromJSON( - jsonString: string, -): SafeParseResult< - PostUsersSignInDataAuthenticationErrors, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PostUsersSignInDataAuthenticationErrors$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PostUsersSignInDataAuthenticationErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new PostUsersSignInDataUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type PostUsersSignInDataUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const PostUsersSignInDataErrors$outboundSchema: z.ZodType< - PostUsersSignInDataErrors$Outbound, - z.ZodTypeDef, - PostUsersSignInDataErrors -> = 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 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; -} - -export function postUsersSignInDataErrorsToJSON( - postUsersSignInDataErrors: PostUsersSignInDataErrors, -): string { - return JSON.stringify( - PostUsersSignInDataErrors$outboundSchema.parse(postUsersSignInDataErrors), - ); -} - -export function postUsersSignInDataErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostUsersSignInDataErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostUsersSignInDataErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new PostUsersSignInDataBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type PostUsersSignInDataBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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/startalltasks.ts b/src/sdk/models/errors/startalltasks.ts deleted file mode 100644 index 0163ce78..00000000 --- a/src/sdk/models/errors/startalltasks.ts +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type StartAllTasksButlerErrors = { - 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 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 StartAllTasksUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: StartAllTasksUnauthorizedData; - - constructor( - err: StartAllTasksUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "StartAllTasksUnauthorized"; - } -} - -export type StartAllTasksErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 StartAllTasksBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: StartAllTasksBadRequestData; - - constructor( - err: StartAllTasksBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "StartAllTasksBadRequest"; - } -} - -/** @internal */ -export const StartAllTasksButlerErrors$inboundSchema: z.ZodType< - StartAllTasksButlerErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const StartAllTasksButlerErrors$outboundSchema: z.ZodType< - StartAllTasksButlerErrors$Outbound, - z.ZodTypeDef, - StartAllTasksButlerErrors -> = 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 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; -} - -export function startAllTasksButlerErrorsToJSON( - startAllTasksButlerErrors: StartAllTasksButlerErrors, -): string { - return JSON.stringify( - StartAllTasksButlerErrors$outboundSchema.parse(startAllTasksButlerErrors), - ); -} - -export function startAllTasksButlerErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StartAllTasksButlerErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StartAllTasksButlerErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new StartAllTasksUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type StartAllTasksUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const StartAllTasksErrors$outboundSchema: z.ZodType< - StartAllTasksErrors$Outbound, - z.ZodTypeDef, - StartAllTasksErrors -> = 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 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; -} - -export function startAllTasksErrorsToJSON( - startAllTasksErrors: StartAllTasksErrors, -): string { - return JSON.stringify( - StartAllTasksErrors$outboundSchema.parse(startAllTasksErrors), - ); -} - -export function startAllTasksErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StartAllTasksErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StartAllTasksErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new StartAllTasksBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type StartAllTasksBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index e91e258a..00000000 --- a/src/sdk/models/errors/starttask.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type StartTaskButlerErrors = { - 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 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 StartTaskUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: StartTaskUnauthorizedData; - - constructor( - err: StartTaskUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "StartTaskUnauthorized"; - } -} - -export type StartTaskErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 StartTaskBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: StartTaskBadRequestData; - - constructor( - err: StartTaskBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "StartTaskBadRequest"; - } -} - -/** @internal */ -export const StartTaskButlerErrors$inboundSchema: z.ZodType< - StartTaskButlerErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const StartTaskButlerErrors$outboundSchema: z.ZodType< - StartTaskButlerErrors$Outbound, - z.ZodTypeDef, - StartTaskButlerErrors -> = 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 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; -} - -export function startTaskButlerErrorsToJSON( - startTaskButlerErrors: StartTaskButlerErrors, -): string { - return JSON.stringify( - StartTaskButlerErrors$outboundSchema.parse(startTaskButlerErrors), - ); -} - -export function startTaskButlerErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StartTaskButlerErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StartTaskButlerErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new StartTaskUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type StartTaskUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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< - 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; -}; - -/** @internal */ -export const StartTaskErrors$outboundSchema: z.ZodType< - StartTaskErrors$Outbound, - z.ZodTypeDef, - StartTaskErrors -> = 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 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; -} - -export function startTaskErrorsToJSON( - startTaskErrors: StartTaskErrors, -): string { - return JSON.stringify(StartTaskErrors$outboundSchema.parse(startTaskErrors)); -} - -export function startTaskErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StartTaskErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StartTaskErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new StartTaskBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type StartTaskBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index ae46ac25..00000000 --- a/src/sdk/models/errors/startuniversaltranscode.ts +++ /dev/null @@ -1,354 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type StartUniversalTranscodeVideoErrors = { - 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 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 StartUniversalTranscodeUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: StartUniversalTranscodeUnauthorizedData; - - constructor( - err: StartUniversalTranscodeUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "StartUniversalTranscodeUnauthorized"; - } -} - -export type StartUniversalTranscodeErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 StartUniversalTranscodeBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: StartUniversalTranscodeBadRequestData; - - constructor( - err: StartUniversalTranscodeBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "StartUniversalTranscodeBadRequest"; - } -} - -/** @internal */ -export const StartUniversalTranscodeVideoErrors$inboundSchema: z.ZodType< - StartUniversalTranscodeVideoErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const StartUniversalTranscodeVideoErrors$outboundSchema: z.ZodType< - StartUniversalTranscodeVideoErrors$Outbound, - z.ZodTypeDef, - StartUniversalTranscodeVideoErrors -> = 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 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; -} - -export function startUniversalTranscodeVideoErrorsToJSON( - startUniversalTranscodeVideoErrors: StartUniversalTranscodeVideoErrors, -): string { - return JSON.stringify( - StartUniversalTranscodeVideoErrors$outboundSchema.parse( - startUniversalTranscodeVideoErrors, - ), - ); -} - -export function startUniversalTranscodeVideoErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - StartUniversalTranscodeVideoErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StartUniversalTranscodeVideoErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new StartUniversalTranscodeUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type StartUniversalTranscodeUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const StartUniversalTranscodeErrors$outboundSchema: z.ZodType< - StartUniversalTranscodeErrors$Outbound, - z.ZodTypeDef, - StartUniversalTranscodeErrors -> = 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 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; -} - -export function startUniversalTranscodeErrorsToJSON( - startUniversalTranscodeErrors: StartUniversalTranscodeErrors, -): string { - return JSON.stringify( - StartUniversalTranscodeErrors$outboundSchema.parse( - startUniversalTranscodeErrors, - ), - ); -} - -export function startUniversalTranscodeErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StartUniversalTranscodeErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StartUniversalTranscodeErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new StartUniversalTranscodeBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type StartUniversalTranscodeBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index b2ec1696..00000000 --- a/src/sdk/models/errors/stopalltasks.ts +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type StopAllTasksButlerErrors = { - 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 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 StopAllTasksUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: StopAllTasksUnauthorizedData; - - constructor( - err: StopAllTasksUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "StopAllTasksUnauthorized"; - } -} - -export type StopAllTasksErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 StopAllTasksBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: StopAllTasksBadRequestData; - - constructor( - err: StopAllTasksBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "StopAllTasksBadRequest"; - } -} - -/** @internal */ -export const StopAllTasksButlerErrors$inboundSchema: z.ZodType< - StopAllTasksButlerErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const StopAllTasksButlerErrors$outboundSchema: z.ZodType< - StopAllTasksButlerErrors$Outbound, - z.ZodTypeDef, - StopAllTasksButlerErrors -> = 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 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; -} - -export function stopAllTasksButlerErrorsToJSON( - stopAllTasksButlerErrors: StopAllTasksButlerErrors, -): string { - return JSON.stringify( - StopAllTasksButlerErrors$outboundSchema.parse(stopAllTasksButlerErrors), - ); -} - -export function stopAllTasksButlerErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StopAllTasksButlerErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StopAllTasksButlerErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new StopAllTasksUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type StopAllTasksUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const StopAllTasksErrors$outboundSchema: z.ZodType< - StopAllTasksErrors$Outbound, - z.ZodTypeDef, - StopAllTasksErrors -> = 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 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; -} - -export function stopAllTasksErrorsToJSON( - stopAllTasksErrors: StopAllTasksErrors, -): string { - return JSON.stringify( - StopAllTasksErrors$outboundSchema.parse(stopAllTasksErrors), - ); -} - -export function stopAllTasksErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StopAllTasksErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StopAllTasksErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new StopAllTasksBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type StopAllTasksBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 3a320148..00000000 --- a/src/sdk/models/errors/stoptask.ts +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type StopTaskButlerErrors = { - 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 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 StopTaskUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: StopTaskUnauthorizedData; - - constructor( - err: StopTaskUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "StopTaskUnauthorized"; - } -} - -export type StopTaskErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 StopTaskBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: StopTaskBadRequestData; - - constructor( - err: StopTaskBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "StopTaskBadRequest"; - } -} - -/** @internal */ -export const StopTaskButlerErrors$inboundSchema: z.ZodType< - StopTaskButlerErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const StopTaskButlerErrors$outboundSchema: z.ZodType< - StopTaskButlerErrors$Outbound, - z.ZodTypeDef, - StopTaskButlerErrors -> = 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 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; -} - -export function stopTaskButlerErrorsToJSON( - stopTaskButlerErrors: StopTaskButlerErrors, -): string { - return JSON.stringify( - StopTaskButlerErrors$outboundSchema.parse(stopTaskButlerErrors), - ); -} - -export function stopTaskButlerErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StopTaskButlerErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StopTaskButlerErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new StopTaskUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type StopTaskUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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< - 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; -}; - -/** @internal */ -export const StopTaskErrors$outboundSchema: z.ZodType< - StopTaskErrors$Outbound, - z.ZodTypeDef, - StopTaskErrors -> = 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 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; -} - -export function stopTaskErrorsToJSON(stopTaskErrors: StopTaskErrors): string { - return JSON.stringify(StopTaskErrors$outboundSchema.parse(stopTaskErrors)); -} - -export function stopTaskErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StopTaskErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StopTaskErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new StopTaskBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type StopTaskBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index df59a502..00000000 --- a/src/sdk/models/errors/stoptranscodesession.ts +++ /dev/null @@ -1,348 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type StopTranscodeSessionSessionsErrors = { - 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 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 StopTranscodeSessionUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: StopTranscodeSessionUnauthorizedData; - - constructor( - err: StopTranscodeSessionUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "StopTranscodeSessionUnauthorized"; - } -} - -export type StopTranscodeSessionErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 StopTranscodeSessionBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: StopTranscodeSessionBadRequestData; - - constructor( - err: StopTranscodeSessionBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "StopTranscodeSessionBadRequest"; - } -} - -/** @internal */ -export const StopTranscodeSessionSessionsErrors$inboundSchema: z.ZodType< - StopTranscodeSessionSessionsErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const StopTranscodeSessionSessionsErrors$outboundSchema: z.ZodType< - StopTranscodeSessionSessionsErrors$Outbound, - z.ZodTypeDef, - StopTranscodeSessionSessionsErrors -> = 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 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; -} - -export function stopTranscodeSessionSessionsErrorsToJSON( - stopTranscodeSessionSessionsErrors: StopTranscodeSessionSessionsErrors, -): string { - return JSON.stringify( - StopTranscodeSessionSessionsErrors$outboundSchema.parse( - stopTranscodeSessionSessionsErrors, - ), - ); -} - -export function stopTranscodeSessionSessionsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - StopTranscodeSessionSessionsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StopTranscodeSessionSessionsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new StopTranscodeSessionUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type StopTranscodeSessionUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const StopTranscodeSessionErrors$outboundSchema: z.ZodType< - StopTranscodeSessionErrors$Outbound, - z.ZodTypeDef, - StopTranscodeSessionErrors -> = 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 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; -} - -export function stopTranscodeSessionErrorsToJSON( - stopTranscodeSessionErrors: StopTranscodeSessionErrors, -): string { - return JSON.stringify( - StopTranscodeSessionErrors$outboundSchema.parse(stopTranscodeSessionErrors), - ); -} - -export function stopTranscodeSessionErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StopTranscodeSessionErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StopTranscodeSessionErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new StopTranscodeSessionBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type StopTranscodeSessionBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 8423dd7f..00000000 --- a/src/sdk/models/errors/updateplaylist.ts +++ /dev/null @@ -1,344 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type UpdatePlaylistPlaylistsErrors = { - 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 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 UpdatePlaylistUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: UpdatePlaylistUnauthorizedData; - - constructor( - err: UpdatePlaylistUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "UpdatePlaylistUnauthorized"; - } -} - -export type UpdatePlaylistErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 UpdatePlaylistBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: UpdatePlaylistBadRequestData; - - constructor( - err: UpdatePlaylistBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "UpdatePlaylistBadRequest"; - } -} - -/** @internal */ -export const UpdatePlaylistPlaylistsErrors$inboundSchema: z.ZodType< - UpdatePlaylistPlaylistsErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const UpdatePlaylistPlaylistsErrors$outboundSchema: z.ZodType< - UpdatePlaylistPlaylistsErrors$Outbound, - z.ZodTypeDef, - UpdatePlaylistPlaylistsErrors -> = 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 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; -} - -export function updatePlaylistPlaylistsErrorsToJSON( - updatePlaylistPlaylistsErrors: UpdatePlaylistPlaylistsErrors, -): string { - return JSON.stringify( - UpdatePlaylistPlaylistsErrors$outboundSchema.parse( - updatePlaylistPlaylistsErrors, - ), - ); -} - -export function updatePlaylistPlaylistsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdatePlaylistPlaylistsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdatePlaylistPlaylistsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new UpdatePlaylistUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type UpdatePlaylistUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const UpdatePlaylistErrors$outboundSchema: z.ZodType< - UpdatePlaylistErrors$Outbound, - z.ZodTypeDef, - UpdatePlaylistErrors -> = 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 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; -} - -export function updatePlaylistErrorsToJSON( - updatePlaylistErrors: UpdatePlaylistErrors, -): string { - return JSON.stringify( - UpdatePlaylistErrors$outboundSchema.parse(updatePlaylistErrors), - ); -} - -export function updatePlaylistErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdatePlaylistErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdatePlaylistErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new UpdatePlaylistBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type UpdatePlaylistBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index cab96f28..00000000 --- a/src/sdk/models/errors/updateplayprogress.ts +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type UpdatePlayProgressMediaErrors = { - 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 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 UpdatePlayProgressUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: UpdatePlayProgressUnauthorizedData; - - constructor( - err: UpdatePlayProgressUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "UpdatePlayProgressUnauthorized"; - } -} - -export type UpdatePlayProgressErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 UpdatePlayProgressBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: UpdatePlayProgressBadRequestData; - - constructor( - err: UpdatePlayProgressBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "UpdatePlayProgressBadRequest"; - } -} - -/** @internal */ -export const UpdatePlayProgressMediaErrors$inboundSchema: z.ZodType< - UpdatePlayProgressMediaErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const UpdatePlayProgressMediaErrors$outboundSchema: z.ZodType< - UpdatePlayProgressMediaErrors$Outbound, - z.ZodTypeDef, - UpdatePlayProgressMediaErrors -> = 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 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; -} - -export function updatePlayProgressMediaErrorsToJSON( - updatePlayProgressMediaErrors: UpdatePlayProgressMediaErrors, -): string { - return JSON.stringify( - UpdatePlayProgressMediaErrors$outboundSchema.parse( - updatePlayProgressMediaErrors, - ), - ); -} - -export function updatePlayProgressMediaErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdatePlayProgressMediaErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdatePlayProgressMediaErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new UpdatePlayProgressUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type UpdatePlayProgressUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const UpdatePlayProgressErrors$outboundSchema: z.ZodType< - UpdatePlayProgressErrors$Outbound, - z.ZodTypeDef, - UpdatePlayProgressErrors -> = 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 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; -} - -export function updatePlayProgressErrorsToJSON( - updatePlayProgressErrors: UpdatePlayProgressErrors, -): string { - return JSON.stringify( - UpdatePlayProgressErrors$outboundSchema.parse(updatePlayProgressErrors), - ); -} - -export function updatePlayProgressErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdatePlayProgressErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdatePlayProgressErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new UpdatePlayProgressBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type UpdatePlayProgressBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 deleted file mode 100644 index 5d3698e5..00000000 --- a/src/sdk/models/errors/uploadplaylist.ts +++ /dev/null @@ -1,344 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { PlexAPIError } from "./plexapierror.js"; -import { SDKValidationError } from "./sdkvalidationerror.js"; - -export type UploadPlaylistPlaylistsErrors = { - 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 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 UploadPlaylistUnauthorized extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: UploadPlaylistUnauthorizedData; - - constructor( - err: UploadPlaylistUnauthorizedData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "UploadPlaylistUnauthorized"; - } -} - -export type UploadPlaylistErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -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 UploadPlaylistBadRequest extends PlexAPIError { - errors?: Array | undefined; - - /** The original data that was passed to this error instance. */ - data$: UploadPlaylistBadRequestData; - - constructor( - err: UploadPlaylistBadRequestData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.errors != null) this.errors = err.errors; - - this.name = "UploadPlaylistBadRequest"; - } -} - -/** @internal */ -export const UploadPlaylistPlaylistsErrors$inboundSchema: z.ZodType< - UploadPlaylistPlaylistsErrors, - z.ZodTypeDef, - unknown -> = z.object({ - 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; -}; - -/** @internal */ -export const UploadPlaylistPlaylistsErrors$outboundSchema: z.ZodType< - UploadPlaylistPlaylistsErrors$Outbound, - z.ZodTypeDef, - UploadPlaylistPlaylistsErrors -> = 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 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; -} - -export function uploadPlaylistPlaylistsErrorsToJSON( - uploadPlaylistPlaylistsErrors: UploadPlaylistPlaylistsErrors, -): string { - return JSON.stringify( - UploadPlaylistPlaylistsErrors$outboundSchema.parse( - uploadPlaylistPlaylistsErrors, - ), - ); -} - -export function uploadPlaylistPlaylistsErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UploadPlaylistPlaylistsErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UploadPlaylistPlaylistsErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new UploadPlaylistUnauthorized(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type UploadPlaylistUnauthorized$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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 -> = z.object({ - 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; -}; - -/** @internal */ -export const UploadPlaylistErrors$outboundSchema: z.ZodType< - UploadPlaylistErrors$Outbound, - z.ZodTypeDef, - UploadPlaylistErrors -> = 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 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; -} - -export function uploadPlaylistErrorsToJSON( - uploadPlaylistErrors: UploadPlaylistErrors, -): string { - return JSON.stringify( - UploadPlaylistErrors$outboundSchema.parse(uploadPlaylistErrors), - ); -} - -export function uploadPlaylistErrorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UploadPlaylistErrors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UploadPlaylistErrors' from JSON`, - ); -} - -/** @internal */ -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(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - const remapped = remap$(v, { - "RawResponse": "rawResponse", - }); - - return new UploadPlaylistBadRequest(remapped, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type UploadPlaylistBadRequest$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -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 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/addcollectionitems.ts b/src/sdk/models/operations/addcollectionitems.ts new file mode 100644 index 00000000..9156d921 --- /dev/null +++ b/src/sdk/models/operations/addcollectionitems.ts @@ -0,0 +1,426 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type AddCollectionItemsGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type AddCollectionItemsRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The collection id + */ + collectionId: number; + /** + * The URI describing the items to add to this collection + */ + uri: string; +}; + +export type AddCollectionItemsResponse = { + /** + * 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; + /** + * OK + */ + mediaContainerWithMetadata?: shared.MediaContainerWithMetadata | undefined; +}; + +/** @internal */ +export const AddCollectionItemsGlobals$inboundSchema: z.ZodType< + AddCollectionItemsGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AddCollectionItemsGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const AddCollectionItemsGlobals$outboundSchema: z.ZodType< + AddCollectionItemsGlobals$Outbound, + z.ZodTypeDef, + AddCollectionItemsGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddCollectionItemsGlobals$ { + /** @deprecated use `AddCollectionItemsGlobals$inboundSchema` instead. */ + export const inboundSchema = AddCollectionItemsGlobals$inboundSchema; + /** @deprecated use `AddCollectionItemsGlobals$outboundSchema` instead. */ + export const outboundSchema = AddCollectionItemsGlobals$outboundSchema; + /** @deprecated use `AddCollectionItemsGlobals$Outbound` instead. */ + export type Outbound = AddCollectionItemsGlobals$Outbound; +} + +export function addCollectionItemsGlobalsToJSON( + addCollectionItemsGlobals: AddCollectionItemsGlobals, +): string { + return JSON.stringify( + AddCollectionItemsGlobals$outboundSchema.parse(addCollectionItemsGlobals), + ); +} + +export function addCollectionItemsGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddCollectionItemsGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddCollectionItemsGlobals' from JSON`, + ); +} + +/** @internal */ +export const AddCollectionItemsRequest$inboundSchema: z.ZodType< + AddCollectionItemsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + collectionId: z.number().int(), + uri: z.string(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AddCollectionItemsRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + collectionId: number; + uri: string; +}; + +/** @internal */ +export const AddCollectionItemsRequest$outboundSchema: z.ZodType< + AddCollectionItemsRequest$Outbound, + z.ZodTypeDef, + AddCollectionItemsRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + collectionId: z.number().int(), + uri: z.string(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddCollectionItemsRequest$ { + /** @deprecated use `AddCollectionItemsRequest$inboundSchema` instead. */ + export const inboundSchema = AddCollectionItemsRequest$inboundSchema; + /** @deprecated use `AddCollectionItemsRequest$outboundSchema` instead. */ + export const outboundSchema = AddCollectionItemsRequest$outboundSchema; + /** @deprecated use `AddCollectionItemsRequest$Outbound` instead. */ + export type Outbound = AddCollectionItemsRequest$Outbound; +} + +export function addCollectionItemsRequestToJSON( + addCollectionItemsRequest: AddCollectionItemsRequest, +): string { + return JSON.stringify( + AddCollectionItemsRequest$outboundSchema.parse(addCollectionItemsRequest), + ); +} + +export function addCollectionItemsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddCollectionItemsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddCollectionItemsRequest' from JSON`, + ); +} + +/** @internal */ +export const AddCollectionItemsResponse$inboundSchema: z.ZodType< + AddCollectionItemsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + MediaContainerWithMetadata: shared.MediaContainerWithMetadata$inboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "MediaContainerWithMetadata": "mediaContainerWithMetadata", + }); +}); + +/** @internal */ +export type AddCollectionItemsResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + MediaContainerWithMetadata?: + | shared.MediaContainerWithMetadata$Outbound + | undefined; +}; + +/** @internal */ +export const AddCollectionItemsResponse$outboundSchema: z.ZodType< + AddCollectionItemsResponse$Outbound, + z.ZodTypeDef, + AddCollectionItemsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + mediaContainerWithMetadata: shared.MediaContainerWithMetadata$outboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + mediaContainerWithMetadata: "MediaContainerWithMetadata", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddCollectionItemsResponse$ { + /** @deprecated use `AddCollectionItemsResponse$inboundSchema` instead. */ + export const inboundSchema = AddCollectionItemsResponse$inboundSchema; + /** @deprecated use `AddCollectionItemsResponse$outboundSchema` instead. */ + export const outboundSchema = AddCollectionItemsResponse$outboundSchema; + /** @deprecated use `AddCollectionItemsResponse$Outbound` instead. */ + export type Outbound = AddCollectionItemsResponse$Outbound; +} + +export function addCollectionItemsResponseToJSON( + addCollectionItemsResponse: AddCollectionItemsResponse, +): string { + return JSON.stringify( + AddCollectionItemsResponse$outboundSchema.parse(addCollectionItemsResponse), + ); +} + +export function addCollectionItemsResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddCollectionItemsResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddCollectionItemsResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/adddevice.ts b/src/sdk/models/operations/adddevice.ts new file mode 100644 index 00000000..73fc4bd6 --- /dev/null +++ b/src/sdk/models/operations/adddevice.ts @@ -0,0 +1,419 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type AddDeviceGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type AddDeviceRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The URI of the device. + */ + uri?: string | undefined; +}; + +export type AddDeviceResponse = { + /** + * 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; + /** + * OK + */ + mediaContainerWithDevice?: shared.MediaContainerWithDevice | undefined; +}; + +/** @internal */ +export const AddDeviceGlobals$inboundSchema: z.ZodType< + AddDeviceGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AddDeviceGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const AddDeviceGlobals$outboundSchema: z.ZodType< + AddDeviceGlobals$Outbound, + z.ZodTypeDef, + AddDeviceGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddDeviceGlobals$ { + /** @deprecated use `AddDeviceGlobals$inboundSchema` instead. */ + export const inboundSchema = AddDeviceGlobals$inboundSchema; + /** @deprecated use `AddDeviceGlobals$outboundSchema` instead. */ + export const outboundSchema = AddDeviceGlobals$outboundSchema; + /** @deprecated use `AddDeviceGlobals$Outbound` instead. */ + export type Outbound = AddDeviceGlobals$Outbound; +} + +export function addDeviceGlobalsToJSON( + addDeviceGlobals: AddDeviceGlobals, +): string { + return JSON.stringify( + AddDeviceGlobals$outboundSchema.parse(addDeviceGlobals), + ); +} + +export function addDeviceGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddDeviceGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddDeviceGlobals' from JSON`, + ); +} + +/** @internal */ +export const AddDeviceRequest$inboundSchema: z.ZodType< + AddDeviceRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + uri: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AddDeviceRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + uri?: string | undefined; +}; + +/** @internal */ +export const AddDeviceRequest$outboundSchema: z.ZodType< + AddDeviceRequest$Outbound, + z.ZodTypeDef, + AddDeviceRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + uri: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddDeviceRequest$ { + /** @deprecated use `AddDeviceRequest$inboundSchema` instead. */ + export const inboundSchema = AddDeviceRequest$inboundSchema; + /** @deprecated use `AddDeviceRequest$outboundSchema` instead. */ + export const outboundSchema = AddDeviceRequest$outboundSchema; + /** @deprecated use `AddDeviceRequest$Outbound` instead. */ + export type Outbound = AddDeviceRequest$Outbound; +} + +export function addDeviceRequestToJSON( + addDeviceRequest: AddDeviceRequest, +): string { + return JSON.stringify( + AddDeviceRequest$outboundSchema.parse(addDeviceRequest), + ); +} + +export function addDeviceRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddDeviceRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddDeviceRequest' from JSON`, + ); +} + +/** @internal */ +export const AddDeviceResponse$inboundSchema: z.ZodType< + AddDeviceResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + MediaContainerWithDevice: shared.MediaContainerWithDevice$inboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "MediaContainerWithDevice": "mediaContainerWithDevice", + }); +}); + +/** @internal */ +export type AddDeviceResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + MediaContainerWithDevice?: + | shared.MediaContainerWithDevice$Outbound + | undefined; +}; + +/** @internal */ +export const AddDeviceResponse$outboundSchema: z.ZodType< + AddDeviceResponse$Outbound, + z.ZodTypeDef, + AddDeviceResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + mediaContainerWithDevice: shared.MediaContainerWithDevice$outboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + mediaContainerWithDevice: "MediaContainerWithDevice", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddDeviceResponse$ { + /** @deprecated use `AddDeviceResponse$inboundSchema` instead. */ + export const inboundSchema = AddDeviceResponse$inboundSchema; + /** @deprecated use `AddDeviceResponse$outboundSchema` instead. */ + export const outboundSchema = AddDeviceResponse$outboundSchema; + /** @deprecated use `AddDeviceResponse$Outbound` instead. */ + export type Outbound = AddDeviceResponse$Outbound; +} + +export function addDeviceResponseToJSON( + addDeviceResponse: AddDeviceResponse, +): string { + return JSON.stringify( + AddDeviceResponse$outboundSchema.parse(addDeviceResponse), + ); +} + +export function addDeviceResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddDeviceResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddDeviceResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/adddevicetodvr.ts b/src/sdk/models/operations/adddevicetodvr.ts new file mode 100644 index 00000000..8ccf49e4 --- /dev/null +++ b/src/sdk/models/operations/adddevicetodvr.ts @@ -0,0 +1,763 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type AddDeviceToDVRGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type AddDeviceToDVRRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The ID of the DVR. + */ + dvrId: number; + /** + * The ID of the device to add. + */ + deviceId: number; +}; + +/** + * `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * + * @remarks + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +export type AddDeviceToDVRMediaContainerMediaContainer = { + identifier?: string | undefined; + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + * + * @remarks + */ + offset?: number | undefined; + size?: number | undefined; + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + * + * @remarks + */ + totalSize?: number | undefined; + /** + * A status indicator. If present and non-zero, indicates an error + */ + status?: number | undefined; +}; + +export type AddDeviceToDVRDVR = { + device?: Array | undefined; + key?: string | undefined; + language?: string | undefined; + lineup?: string | undefined; + uuid?: string | undefined; +}; + +export type AddDeviceToDVRMediaContainer = { + mediaContainer?: AddDeviceToDVRMediaContainerMediaContainer | undefined; + dvr?: Array | undefined; +}; + +/** + * OK + */ +export type AddDeviceToDVRResponseBody = { + mediaContainer?: AddDeviceToDVRMediaContainer | undefined; +}; + +export type AddDeviceToDVRResponse = { + /** + * 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; + /** + * OK + */ + object?: AddDeviceToDVRResponseBody | undefined; + headers: { [k: string]: Array }; +}; + +/** @internal */ +export const AddDeviceToDVRGlobals$inboundSchema: z.ZodType< + AddDeviceToDVRGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AddDeviceToDVRGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const AddDeviceToDVRGlobals$outboundSchema: z.ZodType< + AddDeviceToDVRGlobals$Outbound, + z.ZodTypeDef, + AddDeviceToDVRGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddDeviceToDVRGlobals$ { + /** @deprecated use `AddDeviceToDVRGlobals$inboundSchema` instead. */ + export const inboundSchema = AddDeviceToDVRGlobals$inboundSchema; + /** @deprecated use `AddDeviceToDVRGlobals$outboundSchema` instead. */ + export const outboundSchema = AddDeviceToDVRGlobals$outboundSchema; + /** @deprecated use `AddDeviceToDVRGlobals$Outbound` instead. */ + export type Outbound = AddDeviceToDVRGlobals$Outbound; +} + +export function addDeviceToDVRGlobalsToJSON( + addDeviceToDVRGlobals: AddDeviceToDVRGlobals, +): string { + return JSON.stringify( + AddDeviceToDVRGlobals$outboundSchema.parse(addDeviceToDVRGlobals), + ); +} + +export function addDeviceToDVRGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddDeviceToDVRGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddDeviceToDVRGlobals' from JSON`, + ); +} + +/** @internal */ +export const AddDeviceToDVRRequest$inboundSchema: z.ZodType< + AddDeviceToDVRRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + dvrId: z.number().int(), + deviceId: z.number().int(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AddDeviceToDVRRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + dvrId: number; + deviceId: number; +}; + +/** @internal */ +export const AddDeviceToDVRRequest$outboundSchema: z.ZodType< + AddDeviceToDVRRequest$Outbound, + z.ZodTypeDef, + AddDeviceToDVRRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + dvrId: z.number().int(), + deviceId: z.number().int(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddDeviceToDVRRequest$ { + /** @deprecated use `AddDeviceToDVRRequest$inboundSchema` instead. */ + export const inboundSchema = AddDeviceToDVRRequest$inboundSchema; + /** @deprecated use `AddDeviceToDVRRequest$outboundSchema` instead. */ + export const outboundSchema = AddDeviceToDVRRequest$outboundSchema; + /** @deprecated use `AddDeviceToDVRRequest$Outbound` instead. */ + export type Outbound = AddDeviceToDVRRequest$Outbound; +} + +export function addDeviceToDVRRequestToJSON( + addDeviceToDVRRequest: AddDeviceToDVRRequest, +): string { + return JSON.stringify( + AddDeviceToDVRRequest$outboundSchema.parse(addDeviceToDVRRequest), + ); +} + +export function addDeviceToDVRRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddDeviceToDVRRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddDeviceToDVRRequest' from JSON`, + ); +} + +/** @internal */ +export const AddDeviceToDVRMediaContainerMediaContainer$inboundSchema: + z.ZodType = + z.object({ + identifier: z.string().optional(), + offset: z.number().int().optional(), + size: z.number().int().optional(), + totalSize: z.number().int().optional(), + status: z.number().int().optional(), + }); + +/** @internal */ +export type AddDeviceToDVRMediaContainerMediaContainer$Outbound = { + identifier?: string | undefined; + offset?: number | undefined; + size?: number | undefined; + totalSize?: number | undefined; + status?: number | undefined; +}; + +/** @internal */ +export const AddDeviceToDVRMediaContainerMediaContainer$outboundSchema: + z.ZodType< + AddDeviceToDVRMediaContainerMediaContainer$Outbound, + z.ZodTypeDef, + AddDeviceToDVRMediaContainerMediaContainer + > = z.object({ + identifier: z.string().optional(), + offset: z.number().int().optional(), + size: z.number().int().optional(), + totalSize: z.number().int().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 AddDeviceToDVRMediaContainerMediaContainer$ { + /** @deprecated use `AddDeviceToDVRMediaContainerMediaContainer$inboundSchema` instead. */ + export const inboundSchema = + AddDeviceToDVRMediaContainerMediaContainer$inboundSchema; + /** @deprecated use `AddDeviceToDVRMediaContainerMediaContainer$outboundSchema` instead. */ + export const outboundSchema = + AddDeviceToDVRMediaContainerMediaContainer$outboundSchema; + /** @deprecated use `AddDeviceToDVRMediaContainerMediaContainer$Outbound` instead. */ + export type Outbound = AddDeviceToDVRMediaContainerMediaContainer$Outbound; +} + +export function addDeviceToDVRMediaContainerMediaContainerToJSON( + addDeviceToDVRMediaContainerMediaContainer: + AddDeviceToDVRMediaContainerMediaContainer, +): string { + return JSON.stringify( + AddDeviceToDVRMediaContainerMediaContainer$outboundSchema.parse( + addDeviceToDVRMediaContainerMediaContainer, + ), + ); +} + +export function addDeviceToDVRMediaContainerMediaContainerFromJSON( + jsonString: string, +): SafeParseResult< + AddDeviceToDVRMediaContainerMediaContainer, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + AddDeviceToDVRMediaContainerMediaContainer$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'AddDeviceToDVRMediaContainerMediaContainer' from JSON`, + ); +} + +/** @internal */ +export const AddDeviceToDVRDVR$inboundSchema: z.ZodType< + AddDeviceToDVRDVR, + z.ZodTypeDef, + unknown +> = z.object({ + Device: z.array(shared.Device$inboundSchema).optional(), + key: z.string().optional(), + language: z.string().optional(), + lineup: z.string().optional(), + uuid: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "Device": "device", + }); +}); + +/** @internal */ +export type AddDeviceToDVRDVR$Outbound = { + Device?: Array | undefined; + key?: string | undefined; + language?: string | undefined; + lineup?: string | undefined; + uuid?: string | undefined; +}; + +/** @internal */ +export const AddDeviceToDVRDVR$outboundSchema: z.ZodType< + AddDeviceToDVRDVR$Outbound, + z.ZodTypeDef, + AddDeviceToDVRDVR +> = z.object({ + device: z.array(shared.Device$outboundSchema).optional(), + key: z.string().optional(), + language: z.string().optional(), + lineup: z.string().optional(), + uuid: z.string().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 AddDeviceToDVRDVR$ { + /** @deprecated use `AddDeviceToDVRDVR$inboundSchema` instead. */ + export const inboundSchema = AddDeviceToDVRDVR$inboundSchema; + /** @deprecated use `AddDeviceToDVRDVR$outboundSchema` instead. */ + export const outboundSchema = AddDeviceToDVRDVR$outboundSchema; + /** @deprecated use `AddDeviceToDVRDVR$Outbound` instead. */ + export type Outbound = AddDeviceToDVRDVR$Outbound; +} + +export function addDeviceToDVRDVRToJSON( + addDeviceToDVRDVR: AddDeviceToDVRDVR, +): string { + return JSON.stringify( + AddDeviceToDVRDVR$outboundSchema.parse(addDeviceToDVRDVR), + ); +} + +export function addDeviceToDVRDVRFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddDeviceToDVRDVR$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddDeviceToDVRDVR' from JSON`, + ); +} + +/** @internal */ +export const AddDeviceToDVRMediaContainer$inboundSchema: z.ZodType< + AddDeviceToDVRMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => + AddDeviceToDVRMediaContainerMediaContainer$inboundSchema + ).optional(), + DVR: z.array(z.lazy(() => AddDeviceToDVRDVR$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + "DVR": "dvr", + }); +}); + +/** @internal */ +export type AddDeviceToDVRMediaContainer$Outbound = { + MediaContainer?: + | AddDeviceToDVRMediaContainerMediaContainer$Outbound + | undefined; + DVR?: Array | undefined; +}; + +/** @internal */ +export const AddDeviceToDVRMediaContainer$outboundSchema: z.ZodType< + AddDeviceToDVRMediaContainer$Outbound, + z.ZodTypeDef, + AddDeviceToDVRMediaContainer +> = z.object({ + mediaContainer: z.lazy(() => + AddDeviceToDVRMediaContainerMediaContainer$outboundSchema + ).optional(), + dvr: z.array(z.lazy(() => AddDeviceToDVRDVR$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + dvr: "DVR", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddDeviceToDVRMediaContainer$ { + /** @deprecated use `AddDeviceToDVRMediaContainer$inboundSchema` instead. */ + export const inboundSchema = AddDeviceToDVRMediaContainer$inboundSchema; + /** @deprecated use `AddDeviceToDVRMediaContainer$outboundSchema` instead. */ + export const outboundSchema = AddDeviceToDVRMediaContainer$outboundSchema; + /** @deprecated use `AddDeviceToDVRMediaContainer$Outbound` instead. */ + export type Outbound = AddDeviceToDVRMediaContainer$Outbound; +} + +export function addDeviceToDVRMediaContainerToJSON( + addDeviceToDVRMediaContainer: AddDeviceToDVRMediaContainer, +): string { + return JSON.stringify( + AddDeviceToDVRMediaContainer$outboundSchema.parse( + addDeviceToDVRMediaContainer, + ), + ); +} + +export function addDeviceToDVRMediaContainerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddDeviceToDVRMediaContainer$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddDeviceToDVRMediaContainer' from JSON`, + ); +} + +/** @internal */ +export const AddDeviceToDVRResponseBody$inboundSchema: z.ZodType< + AddDeviceToDVRResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => AddDeviceToDVRMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); + +/** @internal */ +export type AddDeviceToDVRResponseBody$Outbound = { + MediaContainer?: AddDeviceToDVRMediaContainer$Outbound | undefined; +}; + +/** @internal */ +export const AddDeviceToDVRResponseBody$outboundSchema: z.ZodType< + AddDeviceToDVRResponseBody$Outbound, + z.ZodTypeDef, + AddDeviceToDVRResponseBody +> = z.object({ + mediaContainer: z.lazy(() => AddDeviceToDVRMediaContainer$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 AddDeviceToDVRResponseBody$ { + /** @deprecated use `AddDeviceToDVRResponseBody$inboundSchema` instead. */ + export const inboundSchema = AddDeviceToDVRResponseBody$inboundSchema; + /** @deprecated use `AddDeviceToDVRResponseBody$outboundSchema` instead. */ + export const outboundSchema = AddDeviceToDVRResponseBody$outboundSchema; + /** @deprecated use `AddDeviceToDVRResponseBody$Outbound` instead. */ + export type Outbound = AddDeviceToDVRResponseBody$Outbound; +} + +export function addDeviceToDVRResponseBodyToJSON( + addDeviceToDVRResponseBody: AddDeviceToDVRResponseBody, +): string { + return JSON.stringify( + AddDeviceToDVRResponseBody$outboundSchema.parse(addDeviceToDVRResponseBody), + ); +} + +export function addDeviceToDVRResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddDeviceToDVRResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddDeviceToDVRResponseBody' from JSON`, + ); +} + +/** @internal */ +export const AddDeviceToDVRResponse$inboundSchema: z.ZodType< + AddDeviceToDVRResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => AddDeviceToDVRResponseBody$inboundSchema).optional(), + Headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "Headers": "headers", + }); +}); + +/** @internal */ +export type AddDeviceToDVRResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: AddDeviceToDVRResponseBody$Outbound | undefined; + Headers: { [k: string]: Array }; +}; + +/** @internal */ +export const AddDeviceToDVRResponse$outboundSchema: z.ZodType< + AddDeviceToDVRResponse$Outbound, + z.ZodTypeDef, + AddDeviceToDVRResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => AddDeviceToDVRResponseBody$outboundSchema).optional(), + headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + 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 AddDeviceToDVRResponse$ { + /** @deprecated use `AddDeviceToDVRResponse$inboundSchema` instead. */ + export const inboundSchema = AddDeviceToDVRResponse$inboundSchema; + /** @deprecated use `AddDeviceToDVRResponse$outboundSchema` instead. */ + export const outboundSchema = AddDeviceToDVRResponse$outboundSchema; + /** @deprecated use `AddDeviceToDVRResponse$Outbound` instead. */ + export type Outbound = AddDeviceToDVRResponse$Outbound; +} + +export function addDeviceToDVRResponseToJSON( + addDeviceToDVRResponse: AddDeviceToDVRResponse, +): string { + return JSON.stringify( + AddDeviceToDVRResponse$outboundSchema.parse(addDeviceToDVRResponse), + ); +} + +export function addDeviceToDVRResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddDeviceToDVRResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddDeviceToDVRResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/adddownloadqueueitems.ts b/src/sdk/models/operations/adddownloadqueueitems.ts new file mode 100644 index 00000000..6e5dddda --- /dev/null +++ b/src/sdk/models/operations/adddownloadqueueitems.ts @@ -0,0 +1,862 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type AddDownloadQueueItemsGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type AddDownloadQueueItemsRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The queue id + */ + queueId: number; + /** + * Keys to add + */ + keys: Array; + /** + * Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost + * + * @remarks + */ + advancedSubtitles?: shared.AdvancedSubtitles | undefined; + /** + * Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) + */ + audioBoost?: number | undefined; + /** + * Target video number of audio channels. + */ + audioChannelCount?: number | undefined; + /** + * Indicates the client supports ABR. + */ + autoAdjustQuality?: shared.BoolInt | undefined; + /** + * Indicates if the server should adjust subtitles based on Voice Activity Data. + */ + autoAdjustSubtitle?: shared.BoolInt | undefined; + /** + * Indicates the client supports direct playing the indicated content. + */ + directPlay?: shared.BoolInt | undefined; + /** + * Indicates the client supports direct streaming the video of the indicated content. + */ + directStream?: shared.BoolInt | undefined; + /** + * Indicates the client supports direct streaming the audio of the indicated content. + */ + directStreamAudio?: shared.BoolInt | undefined; + /** + * Indicates if resolution should be adjusted for orientation. + */ + disableResolutionRotation?: shared.BoolInt | undefined; + /** + * Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 + */ + hasMDE?: shared.BoolInt | undefined; + /** + * Network type of the client, can be used to help determine target bitrate. + */ + location?: shared.LocationParameter | undefined; + /** + * Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. + */ + mediaBufferSize?: number | undefined; + /** + * Index of the media to transcode. -1 or not specified indicates let the server choose. + */ + mediaIndex?: number | undefined; + /** + * Target bitrate for audio only files (in kbps, used to transcode). + */ + musicBitrate?: number | undefined; + /** + * Offset from the start of the media (in seconds). + */ + offset?: number | undefined; + /** + * Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode + */ + partIndex?: number | undefined; + /** + * Internal PMS path of the media to transcode. + */ + path?: string | undefined; + /** + * Maximum bitrate (in kbps) to use in ABR. + */ + peakBitrate?: number | undefined; + /** + * Target photo resolution. + */ + photoResolution?: string | undefined; + /** + * Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) + * + * @remarks + */ + protocol?: shared.Protocol | undefined; + /** + * Number of seconds to include in each transcoded segment + */ + secondsPerSegment?: number | undefined; + /** + * Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) + */ + subtitleSize?: number | undefined; + /** + * Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream + * + * @remarks + */ + subtitles?: shared.Subtitles | undefined; + /** + * Target video bitrate (in kbps). + */ + videoBitrate?: number | undefined; + /** + * Target photo quality. + */ + videoQuality?: number | undefined; + /** + * Target maximum video resolution. + */ + videoResolution?: string | undefined; +}; + +export type AddedQueueItem = { + /** + * The queue item id that was added or the existing one if an item already exists in this queue with the same parameters + */ + id?: number | undefined; + /** + * The key added to the queue + */ + key?: string | undefined; +}; + +/** + * `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * + * @remarks + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +export type AddDownloadQueueItemsMediaContainer = { + identifier?: string | undefined; + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + * + * @remarks + */ + offset?: number | undefined; + size?: number | undefined; + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + * + * @remarks + */ + totalSize?: number | undefined; + addedQueueItems?: Array | undefined; +}; + +/** + * OK + */ +export type AddDownloadQueueItemsResponseBody = { + mediaContainer?: AddDownloadQueueItemsMediaContainer | undefined; +}; + +export type AddDownloadQueueItemsResponse = { + /** + * 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; + /** + * OK + */ + object?: AddDownloadQueueItemsResponseBody | undefined; +}; + +/** @internal */ +export const AddDownloadQueueItemsGlobals$inboundSchema: z.ZodType< + AddDownloadQueueItemsGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AddDownloadQueueItemsGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const AddDownloadQueueItemsGlobals$outboundSchema: z.ZodType< + AddDownloadQueueItemsGlobals$Outbound, + z.ZodTypeDef, + AddDownloadQueueItemsGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddDownloadQueueItemsGlobals$ { + /** @deprecated use `AddDownloadQueueItemsGlobals$inboundSchema` instead. */ + export const inboundSchema = AddDownloadQueueItemsGlobals$inboundSchema; + /** @deprecated use `AddDownloadQueueItemsGlobals$outboundSchema` instead. */ + export const outboundSchema = AddDownloadQueueItemsGlobals$outboundSchema; + /** @deprecated use `AddDownloadQueueItemsGlobals$Outbound` instead. */ + export type Outbound = AddDownloadQueueItemsGlobals$Outbound; +} + +export function addDownloadQueueItemsGlobalsToJSON( + addDownloadQueueItemsGlobals: AddDownloadQueueItemsGlobals, +): string { + return JSON.stringify( + AddDownloadQueueItemsGlobals$outboundSchema.parse( + addDownloadQueueItemsGlobals, + ), + ); +} + +export function addDownloadQueueItemsGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddDownloadQueueItemsGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddDownloadQueueItemsGlobals' from JSON`, + ); +} + +/** @internal */ +export const AddDownloadQueueItemsRequest$inboundSchema: z.ZodType< + AddDownloadQueueItemsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + queueId: z.number().int(), + keys: z.array(z.string()), + advancedSubtitles: shared.AdvancedSubtitles$inboundSchema.optional(), + audioBoost: z.number().int().optional(), + audioChannelCount: z.number().int().optional(), + autoAdjustQuality: shared.BoolInt$inboundSchema.optional(), + autoAdjustSubtitle: shared.BoolInt$inboundSchema.optional(), + directPlay: shared.BoolInt$inboundSchema.optional(), + directStream: shared.BoolInt$inboundSchema.optional(), + directStreamAudio: shared.BoolInt$inboundSchema.optional(), + disableResolutionRotation: shared.BoolInt$inboundSchema.optional(), + hasMDE: shared.BoolInt$inboundSchema.optional(), + location: shared.LocationParameter$inboundSchema.optional(), + mediaBufferSize: z.number().int().optional(), + mediaIndex: z.number().int().optional(), + musicBitrate: z.number().int().optional(), + offset: z.number().optional(), + partIndex: z.number().int().optional(), + path: z.string().optional(), + peakBitrate: z.number().int().optional(), + photoResolution: z.string().optional(), + protocol: shared.Protocol$inboundSchema.optional(), + secondsPerSegment: z.number().int().optional(), + subtitleSize: z.number().int().optional(), + subtitles: shared.Subtitles$inboundSchema.optional(), + videoBitrate: z.number().int().optional(), + videoQuality: z.number().int().optional(), + videoResolution: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AddDownloadQueueItemsRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + queueId: number; + keys: Array; + advancedSubtitles?: string | undefined; + audioBoost?: number | undefined; + audioChannelCount?: number | undefined; + autoAdjustQuality?: number | undefined; + autoAdjustSubtitle?: number | undefined; + directPlay?: number | undefined; + directStream?: number | undefined; + directStreamAudio?: number | undefined; + disableResolutionRotation?: number | undefined; + hasMDE?: number | undefined; + location?: string | undefined; + mediaBufferSize?: number | undefined; + mediaIndex?: number | undefined; + musicBitrate?: number | undefined; + offset?: number | undefined; + partIndex?: number | undefined; + path?: string | undefined; + peakBitrate?: number | undefined; + photoResolution?: string | undefined; + protocol?: string | undefined; + secondsPerSegment?: number | undefined; + subtitleSize?: number | undefined; + subtitles?: string | undefined; + videoBitrate?: number | undefined; + videoQuality?: number | undefined; + videoResolution?: string | undefined; +}; + +/** @internal */ +export const AddDownloadQueueItemsRequest$outboundSchema: z.ZodType< + AddDownloadQueueItemsRequest$Outbound, + z.ZodTypeDef, + AddDownloadQueueItemsRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + queueId: z.number().int(), + keys: z.array(z.string()), + advancedSubtitles: shared.AdvancedSubtitles$outboundSchema.optional(), + audioBoost: z.number().int().optional(), + audioChannelCount: z.number().int().optional(), + autoAdjustQuality: shared.BoolInt$outboundSchema.optional(), + autoAdjustSubtitle: shared.BoolInt$outboundSchema.optional(), + directPlay: shared.BoolInt$outboundSchema.optional(), + directStream: shared.BoolInt$outboundSchema.optional(), + directStreamAudio: shared.BoolInt$outboundSchema.optional(), + disableResolutionRotation: shared.BoolInt$outboundSchema.optional(), + hasMDE: shared.BoolInt$outboundSchema.optional(), + location: shared.LocationParameter$outboundSchema.optional(), + mediaBufferSize: z.number().int().optional(), + mediaIndex: z.number().int().optional(), + musicBitrate: z.number().int().optional(), + offset: z.number().optional(), + partIndex: z.number().int().optional(), + path: z.string().optional(), + peakBitrate: z.number().int().optional(), + photoResolution: z.string().optional(), + protocol: shared.Protocol$outboundSchema.optional(), + secondsPerSegment: z.number().int().optional(), + subtitleSize: z.number().int().optional(), + subtitles: shared.Subtitles$outboundSchema.optional(), + videoBitrate: z.number().int().optional(), + videoQuality: z.number().int().optional(), + videoResolution: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddDownloadQueueItemsRequest$ { + /** @deprecated use `AddDownloadQueueItemsRequest$inboundSchema` instead. */ + export const inboundSchema = AddDownloadQueueItemsRequest$inboundSchema; + /** @deprecated use `AddDownloadQueueItemsRequest$outboundSchema` instead. */ + export const outboundSchema = AddDownloadQueueItemsRequest$outboundSchema; + /** @deprecated use `AddDownloadQueueItemsRequest$Outbound` instead. */ + export type Outbound = AddDownloadQueueItemsRequest$Outbound; +} + +export function addDownloadQueueItemsRequestToJSON( + addDownloadQueueItemsRequest: AddDownloadQueueItemsRequest, +): string { + return JSON.stringify( + AddDownloadQueueItemsRequest$outboundSchema.parse( + addDownloadQueueItemsRequest, + ), + ); +} + +export function addDownloadQueueItemsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddDownloadQueueItemsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddDownloadQueueItemsRequest' from JSON`, + ); +} + +/** @internal */ +export const AddedQueueItem$inboundSchema: z.ZodType< + AddedQueueItem, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + key: z.string().optional(), +}); + +/** @internal */ +export type AddedQueueItem$Outbound = { + id?: number | undefined; + key?: string | undefined; +}; + +/** @internal */ +export const AddedQueueItem$outboundSchema: z.ZodType< + AddedQueueItem$Outbound, + z.ZodTypeDef, + AddedQueueItem +> = z.object({ + id: z.number().int().optional(), + key: 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 AddedQueueItem$ { + /** @deprecated use `AddedQueueItem$inboundSchema` instead. */ + export const inboundSchema = AddedQueueItem$inboundSchema; + /** @deprecated use `AddedQueueItem$outboundSchema` instead. */ + export const outboundSchema = AddedQueueItem$outboundSchema; + /** @deprecated use `AddedQueueItem$Outbound` instead. */ + export type Outbound = AddedQueueItem$Outbound; +} + +export function addedQueueItemToJSON(addedQueueItem: AddedQueueItem): string { + return JSON.stringify(AddedQueueItem$outboundSchema.parse(addedQueueItem)); +} + +export function addedQueueItemFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddedQueueItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddedQueueItem' from JSON`, + ); +} + +/** @internal */ +export const AddDownloadQueueItemsMediaContainer$inboundSchema: z.ZodType< + AddDownloadQueueItemsMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + identifier: z.string().optional(), + offset: z.number().int().optional(), + size: z.number().int().optional(), + totalSize: z.number().int().optional(), + AddedQueueItems: z.array(z.lazy(() => AddedQueueItem$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "AddedQueueItems": "addedQueueItems", + }); +}); + +/** @internal */ +export type AddDownloadQueueItemsMediaContainer$Outbound = { + identifier?: string | undefined; + offset?: number | undefined; + size?: number | undefined; + totalSize?: number | undefined; + AddedQueueItems?: Array | undefined; +}; + +/** @internal */ +export const AddDownloadQueueItemsMediaContainer$outboundSchema: z.ZodType< + AddDownloadQueueItemsMediaContainer$Outbound, + z.ZodTypeDef, + AddDownloadQueueItemsMediaContainer +> = z.object({ + identifier: z.string().optional(), + offset: z.number().int().optional(), + size: z.number().int().optional(), + totalSize: z.number().int().optional(), + addedQueueItems: z.array(z.lazy(() => AddedQueueItem$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + addedQueueItems: "AddedQueueItems", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddDownloadQueueItemsMediaContainer$ { + /** @deprecated use `AddDownloadQueueItemsMediaContainer$inboundSchema` instead. */ + export const inboundSchema = + AddDownloadQueueItemsMediaContainer$inboundSchema; + /** @deprecated use `AddDownloadQueueItemsMediaContainer$outboundSchema` instead. */ + export const outboundSchema = + AddDownloadQueueItemsMediaContainer$outboundSchema; + /** @deprecated use `AddDownloadQueueItemsMediaContainer$Outbound` instead. */ + export type Outbound = AddDownloadQueueItemsMediaContainer$Outbound; +} + +export function addDownloadQueueItemsMediaContainerToJSON( + addDownloadQueueItemsMediaContainer: AddDownloadQueueItemsMediaContainer, +): string { + return JSON.stringify( + AddDownloadQueueItemsMediaContainer$outboundSchema.parse( + addDownloadQueueItemsMediaContainer, + ), + ); +} + +export function addDownloadQueueItemsMediaContainerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + AddDownloadQueueItemsMediaContainer$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddDownloadQueueItemsMediaContainer' from JSON`, + ); +} + +/** @internal */ +export const AddDownloadQueueItemsResponseBody$inboundSchema: z.ZodType< + AddDownloadQueueItemsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => + AddDownloadQueueItemsMediaContainer$inboundSchema + ).optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); + +/** @internal */ +export type AddDownloadQueueItemsResponseBody$Outbound = { + MediaContainer?: AddDownloadQueueItemsMediaContainer$Outbound | undefined; +}; + +/** @internal */ +export const AddDownloadQueueItemsResponseBody$outboundSchema: z.ZodType< + AddDownloadQueueItemsResponseBody$Outbound, + z.ZodTypeDef, + AddDownloadQueueItemsResponseBody +> = z.object({ + mediaContainer: z.lazy(() => + AddDownloadQueueItemsMediaContainer$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 AddDownloadQueueItemsResponseBody$ { + /** @deprecated use `AddDownloadQueueItemsResponseBody$inboundSchema` instead. */ + export const inboundSchema = AddDownloadQueueItemsResponseBody$inboundSchema; + /** @deprecated use `AddDownloadQueueItemsResponseBody$outboundSchema` instead. */ + export const outboundSchema = + AddDownloadQueueItemsResponseBody$outboundSchema; + /** @deprecated use `AddDownloadQueueItemsResponseBody$Outbound` instead. */ + export type Outbound = AddDownloadQueueItemsResponseBody$Outbound; +} + +export function addDownloadQueueItemsResponseBodyToJSON( + addDownloadQueueItemsResponseBody: AddDownloadQueueItemsResponseBody, +): string { + return JSON.stringify( + AddDownloadQueueItemsResponseBody$outboundSchema.parse( + addDownloadQueueItemsResponseBody, + ), + ); +} + +export function addDownloadQueueItemsResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddDownloadQueueItemsResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddDownloadQueueItemsResponseBody' from JSON`, + ); +} + +/** @internal */ +export const AddDownloadQueueItemsResponse$inboundSchema: z.ZodType< + AddDownloadQueueItemsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => AddDownloadQueueItemsResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); + +/** @internal */ +export type AddDownloadQueueItemsResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: AddDownloadQueueItemsResponseBody$Outbound | undefined; +}; + +/** @internal */ +export const AddDownloadQueueItemsResponse$outboundSchema: z.ZodType< + AddDownloadQueueItemsResponse$Outbound, + z.ZodTypeDef, + AddDownloadQueueItemsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => AddDownloadQueueItemsResponseBody$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 AddDownloadQueueItemsResponse$ { + /** @deprecated use `AddDownloadQueueItemsResponse$inboundSchema` instead. */ + export const inboundSchema = AddDownloadQueueItemsResponse$inboundSchema; + /** @deprecated use `AddDownloadQueueItemsResponse$outboundSchema` instead. */ + export const outboundSchema = AddDownloadQueueItemsResponse$outboundSchema; + /** @deprecated use `AddDownloadQueueItemsResponse$Outbound` instead. */ + export type Outbound = AddDownloadQueueItemsResponse$Outbound; +} + +export function addDownloadQueueItemsResponseToJSON( + addDownloadQueueItemsResponse: AddDownloadQueueItemsResponse, +): string { + return JSON.stringify( + AddDownloadQueueItemsResponse$outboundSchema.parse( + addDownloadQueueItemsResponse, + ), + ); +} + +export function addDownloadQueueItemsResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddDownloadQueueItemsResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddDownloadQueueItemsResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/addextras.ts b/src/sdk/models/operations/addextras.ts new file mode 100644 index 00000000..fb4d9f3d --- /dev/null +++ b/src/sdk/models/operations/addextras.ts @@ -0,0 +1,423 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type AddExtrasGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type AddExtrasRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + ids: string; + /** + * The metadata type of the extra + */ + extraType?: number | undefined; + /** + * The URL of the extra + */ + url: string; + /** + * The title to filter by or assign + */ + title?: string | undefined; +}; + +export type AddExtrasResponse = { + /** + * 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 AddExtrasGlobals$inboundSchema: z.ZodType< + AddExtrasGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AddExtrasGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const AddExtrasGlobals$outboundSchema: z.ZodType< + AddExtrasGlobals$Outbound, + z.ZodTypeDef, + AddExtrasGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddExtrasGlobals$ { + /** @deprecated use `AddExtrasGlobals$inboundSchema` instead. */ + export const inboundSchema = AddExtrasGlobals$inboundSchema; + /** @deprecated use `AddExtrasGlobals$outboundSchema` instead. */ + export const outboundSchema = AddExtrasGlobals$outboundSchema; + /** @deprecated use `AddExtrasGlobals$Outbound` instead. */ + export type Outbound = AddExtrasGlobals$Outbound; +} + +export function addExtrasGlobalsToJSON( + addExtrasGlobals: AddExtrasGlobals, +): string { + return JSON.stringify( + AddExtrasGlobals$outboundSchema.parse(addExtrasGlobals), + ); +} + +export function addExtrasGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddExtrasGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddExtrasGlobals' from JSON`, + ); +} + +/** @internal */ +export const AddExtrasRequest$inboundSchema: z.ZodType< + AddExtrasRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + ids: z.string(), + extraType: z.number().int().optional(), + url: z.string(), + title: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AddExtrasRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + ids: string; + extraType?: number | undefined; + url: string; + title?: string | undefined; +}; + +/** @internal */ +export const AddExtrasRequest$outboundSchema: z.ZodType< + AddExtrasRequest$Outbound, + z.ZodTypeDef, + AddExtrasRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + ids: z.string(), + extraType: z.number().int().optional(), + url: z.string(), + title: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddExtrasRequest$ { + /** @deprecated use `AddExtrasRequest$inboundSchema` instead. */ + export const inboundSchema = AddExtrasRequest$inboundSchema; + /** @deprecated use `AddExtrasRequest$outboundSchema` instead. */ + export const outboundSchema = AddExtrasRequest$outboundSchema; + /** @deprecated use `AddExtrasRequest$Outbound` instead. */ + export type Outbound = AddExtrasRequest$Outbound; +} + +export function addExtrasRequestToJSON( + addExtrasRequest: AddExtrasRequest, +): string { + return JSON.stringify( + AddExtrasRequest$outboundSchema.parse(addExtrasRequest), + ); +} + +export function addExtrasRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddExtrasRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddExtrasRequest' from JSON`, + ); +} + +/** @internal */ +export const AddExtrasResponse$inboundSchema: z.ZodType< + AddExtrasResponse, + 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 AddExtrasResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const AddExtrasResponse$outboundSchema: z.ZodType< + AddExtrasResponse$Outbound, + z.ZodTypeDef, + AddExtrasResponse +> = 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 AddExtrasResponse$ { + /** @deprecated use `AddExtrasResponse$inboundSchema` instead. */ + export const inboundSchema = AddExtrasResponse$inboundSchema; + /** @deprecated use `AddExtrasResponse$outboundSchema` instead. */ + export const outboundSchema = AddExtrasResponse$outboundSchema; + /** @deprecated use `AddExtrasResponse$Outbound` instead. */ + export type Outbound = AddExtrasResponse$Outbound; +} + +export function addExtrasResponseToJSON( + addExtrasResponse: AddExtrasResponse, +): string { + return JSON.stringify( + AddExtrasResponse$outboundSchema.parse(addExtrasResponse), + ); +} + +export function addExtrasResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddExtrasResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddExtrasResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/addlineup.ts b/src/sdk/models/operations/addlineup.ts new file mode 100644 index 00000000..7842b1c9 --- /dev/null +++ b/src/sdk/models/operations/addlineup.ts @@ -0,0 +1,750 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type AddLineupGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type AddLineupRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The ID of the DVR. + */ + dvrId: number; + /** + * The lineup to delete + */ + lineup: string; +}; + +/** + * `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * + * @remarks + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +export type AddLineupMediaContainerMediaContainer = { + identifier?: string | undefined; + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + * + * @remarks + */ + offset?: number | undefined; + size?: number | undefined; + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + * + * @remarks + */ + totalSize?: number | undefined; + /** + * A status indicator. If present and non-zero, indicates an error + */ + status?: number | undefined; +}; + +export type AddLineupDVR = { + device?: Array | undefined; + key?: string | undefined; + language?: string | undefined; + lineup?: string | undefined; + uuid?: string | undefined; +}; + +export type AddLineupMediaContainer = { + mediaContainer?: AddLineupMediaContainerMediaContainer | undefined; + dvr?: Array | undefined; +}; + +/** + * OK + */ +export type AddLineupResponseBody = { + mediaContainer?: AddLineupMediaContainer | undefined; +}; + +export type AddLineupResponse = { + /** + * 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; + /** + * OK + */ + object?: AddLineupResponseBody | undefined; + headers: { [k: string]: Array }; +}; + +/** @internal */ +export const AddLineupGlobals$inboundSchema: z.ZodType< + AddLineupGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AddLineupGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const AddLineupGlobals$outboundSchema: z.ZodType< + AddLineupGlobals$Outbound, + z.ZodTypeDef, + AddLineupGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddLineupGlobals$ { + /** @deprecated use `AddLineupGlobals$inboundSchema` instead. */ + export const inboundSchema = AddLineupGlobals$inboundSchema; + /** @deprecated use `AddLineupGlobals$outboundSchema` instead. */ + export const outboundSchema = AddLineupGlobals$outboundSchema; + /** @deprecated use `AddLineupGlobals$Outbound` instead. */ + export type Outbound = AddLineupGlobals$Outbound; +} + +export function addLineupGlobalsToJSON( + addLineupGlobals: AddLineupGlobals, +): string { + return JSON.stringify( + AddLineupGlobals$outboundSchema.parse(addLineupGlobals), + ); +} + +export function addLineupGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddLineupGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddLineupGlobals' from JSON`, + ); +} + +/** @internal */ +export const AddLineupRequest$inboundSchema: z.ZodType< + AddLineupRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + dvrId: z.number().int(), + lineup: z.string(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AddLineupRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + dvrId: number; + lineup: string; +}; + +/** @internal */ +export const AddLineupRequest$outboundSchema: z.ZodType< + AddLineupRequest$Outbound, + z.ZodTypeDef, + AddLineupRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + dvrId: z.number().int(), + lineup: z.string(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddLineupRequest$ { + /** @deprecated use `AddLineupRequest$inboundSchema` instead. */ + export const inboundSchema = AddLineupRequest$inboundSchema; + /** @deprecated use `AddLineupRequest$outboundSchema` instead. */ + export const outboundSchema = AddLineupRequest$outboundSchema; + /** @deprecated use `AddLineupRequest$Outbound` instead. */ + export type Outbound = AddLineupRequest$Outbound; +} + +export function addLineupRequestToJSON( + addLineupRequest: AddLineupRequest, +): string { + return JSON.stringify( + AddLineupRequest$outboundSchema.parse(addLineupRequest), + ); +} + +export function addLineupRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddLineupRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddLineupRequest' from JSON`, + ); +} + +/** @internal */ +export const AddLineupMediaContainerMediaContainer$inboundSchema: z.ZodType< + AddLineupMediaContainerMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + identifier: z.string().optional(), + offset: z.number().int().optional(), + size: z.number().int().optional(), + totalSize: z.number().int().optional(), + status: z.number().int().optional(), +}); + +/** @internal */ +export type AddLineupMediaContainerMediaContainer$Outbound = { + identifier?: string | undefined; + offset?: number | undefined; + size?: number | undefined; + totalSize?: number | undefined; + status?: number | undefined; +}; + +/** @internal */ +export const AddLineupMediaContainerMediaContainer$outboundSchema: z.ZodType< + AddLineupMediaContainerMediaContainer$Outbound, + z.ZodTypeDef, + AddLineupMediaContainerMediaContainer +> = z.object({ + identifier: z.string().optional(), + offset: z.number().int().optional(), + size: z.number().int().optional(), + totalSize: z.number().int().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 AddLineupMediaContainerMediaContainer$ { + /** @deprecated use `AddLineupMediaContainerMediaContainer$inboundSchema` instead. */ + export const inboundSchema = + AddLineupMediaContainerMediaContainer$inboundSchema; + /** @deprecated use `AddLineupMediaContainerMediaContainer$outboundSchema` instead. */ + export const outboundSchema = + AddLineupMediaContainerMediaContainer$outboundSchema; + /** @deprecated use `AddLineupMediaContainerMediaContainer$Outbound` instead. */ + export type Outbound = AddLineupMediaContainerMediaContainer$Outbound; +} + +export function addLineupMediaContainerMediaContainerToJSON( + addLineupMediaContainerMediaContainer: AddLineupMediaContainerMediaContainer, +): string { + return JSON.stringify( + AddLineupMediaContainerMediaContainer$outboundSchema.parse( + addLineupMediaContainerMediaContainer, + ), + ); +} + +export function addLineupMediaContainerMediaContainerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + AddLineupMediaContainerMediaContainer$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddLineupMediaContainerMediaContainer' from JSON`, + ); +} + +/** @internal */ +export const AddLineupDVR$inboundSchema: z.ZodType< + AddLineupDVR, + z.ZodTypeDef, + unknown +> = z.object({ + Device: z.array(shared.Device$inboundSchema).optional(), + key: z.string().optional(), + language: z.string().optional(), + lineup: z.string().optional(), + uuid: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "Device": "device", + }); +}); + +/** @internal */ +export type AddLineupDVR$Outbound = { + Device?: Array | undefined; + key?: string | undefined; + language?: string | undefined; + lineup?: string | undefined; + uuid?: string | undefined; +}; + +/** @internal */ +export const AddLineupDVR$outboundSchema: z.ZodType< + AddLineupDVR$Outbound, + z.ZodTypeDef, + AddLineupDVR +> = z.object({ + device: z.array(shared.Device$outboundSchema).optional(), + key: z.string().optional(), + language: z.string().optional(), + lineup: z.string().optional(), + uuid: z.string().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 AddLineupDVR$ { + /** @deprecated use `AddLineupDVR$inboundSchema` instead. */ + export const inboundSchema = AddLineupDVR$inboundSchema; + /** @deprecated use `AddLineupDVR$outboundSchema` instead. */ + export const outboundSchema = AddLineupDVR$outboundSchema; + /** @deprecated use `AddLineupDVR$Outbound` instead. */ + export type Outbound = AddLineupDVR$Outbound; +} + +export function addLineupDVRToJSON(addLineupDVR: AddLineupDVR): string { + return JSON.stringify(AddLineupDVR$outboundSchema.parse(addLineupDVR)); +} + +export function addLineupDVRFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddLineupDVR$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddLineupDVR' from JSON`, + ); +} + +/** @internal */ +export const AddLineupMediaContainer$inboundSchema: z.ZodType< + AddLineupMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => + AddLineupMediaContainerMediaContainer$inboundSchema + ).optional(), + DVR: z.array(z.lazy(() => AddLineupDVR$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + "DVR": "dvr", + }); +}); + +/** @internal */ +export type AddLineupMediaContainer$Outbound = { + MediaContainer?: AddLineupMediaContainerMediaContainer$Outbound | undefined; + DVR?: Array | undefined; +}; + +/** @internal */ +export const AddLineupMediaContainer$outboundSchema: z.ZodType< + AddLineupMediaContainer$Outbound, + z.ZodTypeDef, + AddLineupMediaContainer +> = z.object({ + mediaContainer: z.lazy(() => + AddLineupMediaContainerMediaContainer$outboundSchema + ).optional(), + dvr: z.array(z.lazy(() => AddLineupDVR$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + dvr: "DVR", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddLineupMediaContainer$ { + /** @deprecated use `AddLineupMediaContainer$inboundSchema` instead. */ + export const inboundSchema = AddLineupMediaContainer$inboundSchema; + /** @deprecated use `AddLineupMediaContainer$outboundSchema` instead. */ + export const outboundSchema = AddLineupMediaContainer$outboundSchema; + /** @deprecated use `AddLineupMediaContainer$Outbound` instead. */ + export type Outbound = AddLineupMediaContainer$Outbound; +} + +export function addLineupMediaContainerToJSON( + addLineupMediaContainer: AddLineupMediaContainer, +): string { + return JSON.stringify( + AddLineupMediaContainer$outboundSchema.parse(addLineupMediaContainer), + ); +} + +export function addLineupMediaContainerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddLineupMediaContainer$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddLineupMediaContainer' from JSON`, + ); +} + +/** @internal */ +export const AddLineupResponseBody$inboundSchema: z.ZodType< + AddLineupResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => AddLineupMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); + +/** @internal */ +export type AddLineupResponseBody$Outbound = { + MediaContainer?: AddLineupMediaContainer$Outbound | undefined; +}; + +/** @internal */ +export const AddLineupResponseBody$outboundSchema: z.ZodType< + AddLineupResponseBody$Outbound, + z.ZodTypeDef, + AddLineupResponseBody +> = z.object({ + mediaContainer: z.lazy(() => AddLineupMediaContainer$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 AddLineupResponseBody$ { + /** @deprecated use `AddLineupResponseBody$inboundSchema` instead. */ + export const inboundSchema = AddLineupResponseBody$inboundSchema; + /** @deprecated use `AddLineupResponseBody$outboundSchema` instead. */ + export const outboundSchema = AddLineupResponseBody$outboundSchema; + /** @deprecated use `AddLineupResponseBody$Outbound` instead. */ + export type Outbound = AddLineupResponseBody$Outbound; +} + +export function addLineupResponseBodyToJSON( + addLineupResponseBody: AddLineupResponseBody, +): string { + return JSON.stringify( + AddLineupResponseBody$outboundSchema.parse(addLineupResponseBody), + ); +} + +export function addLineupResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddLineupResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddLineupResponseBody' from JSON`, + ); +} + +/** @internal */ +export const AddLineupResponse$inboundSchema: z.ZodType< + AddLineupResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => AddLineupResponseBody$inboundSchema).optional(), + Headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "Headers": "headers", + }); +}); + +/** @internal */ +export type AddLineupResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: AddLineupResponseBody$Outbound | undefined; + Headers: { [k: string]: Array }; +}; + +/** @internal */ +export const AddLineupResponse$outboundSchema: z.ZodType< + AddLineupResponse$Outbound, + z.ZodTypeDef, + AddLineupResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => AddLineupResponseBody$outboundSchema).optional(), + headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + 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 AddLineupResponse$ { + /** @deprecated use `AddLineupResponse$inboundSchema` instead. */ + export const inboundSchema = AddLineupResponse$inboundSchema; + /** @deprecated use `AddLineupResponse$outboundSchema` instead. */ + export const outboundSchema = AddLineupResponse$outboundSchema; + /** @deprecated use `AddLineupResponse$Outbound` instead. */ + export type Outbound = AddLineupResponse$Outbound; +} + +export function addLineupResponseToJSON( + addLineupResponse: AddLineupResponse, +): string { + return JSON.stringify( + AddLineupResponse$outboundSchema.parse(addLineupResponse), + ); +} + +export function addLineupResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddLineupResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddLineupResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/addplaylistcontents.ts b/src/sdk/models/operations/addplaylistcontents.ts deleted file mode 100644 index 1a42302c..00000000 --- a/src/sdk/models/operations/addplaylistcontents.ts +++ /dev/null @@ -1,448 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.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; -}; - -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; -}; - -export type AddPlaylistContentsMediaContainer = { - size?: number | undefined; - leafCountAdded?: number | undefined; - leafCountRequested?: number | undefined; - metadata?: Array | undefined; -}; - -/** - * Playlist Updated - */ -export type AddPlaylistContentsResponseBody = { - 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; -}; - -/** @internal */ -export const AddPlaylistContentsRequest$inboundSchema: z.ZodType< - AddPlaylistContentsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - playlistID: z.number(), - uri: z.string(), - playQueueID: z.number().optional(), -}); - -/** @internal */ -export type AddPlaylistContentsRequest$Outbound = { - playlistID: number; - uri: string; - playQueueID?: number | undefined; -}; - -/** @internal */ -export const AddPlaylistContentsRequest$outboundSchema: z.ZodType< - AddPlaylistContentsRequest$Outbound, - z.ZodTypeDef, - AddPlaylistContentsRequest -> = z.object({ - playlistID: z.number(), - uri: z.string(), - playQueueID: z.number().optional(), -}); - -/** - * @internal - * @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; -} - -export function addPlaylistContentsRequestToJSON( - addPlaylistContentsRequest: AddPlaylistContentsRequest, -): string { - return JSON.stringify( - AddPlaylistContentsRequest$outboundSchema.parse(addPlaylistContentsRequest), - ); -} - -export function addPlaylistContentsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AddPlaylistContentsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AddPlaylistContentsRequest' from JSON`, - ); -} - -/** @internal */ -export const AddPlaylistContentsMetadata$inboundSchema: z.ZodType< - 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(), -}); - -/** @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; -}; - -/** @internal */ -export const AddPlaylistContentsMetadata$outboundSchema: z.ZodType< - 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(), -}); - -/** - * @internal - * @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; -} - -export function addPlaylistContentsMetadataToJSON( - addPlaylistContentsMetadata: AddPlaylistContentsMetadata, -): string { - return JSON.stringify( - AddPlaylistContentsMetadata$outboundSchema.parse( - addPlaylistContentsMetadata, - ), - ); -} - -export function addPlaylistContentsMetadataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AddPlaylistContentsMetadata$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AddPlaylistContentsMetadata' from JSON`, - ); -} - -/** @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", - }); -}); - -/** @internal */ -export type AddPlaylistContentsMediaContainer$Outbound = { - 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", - }); -}); - -/** - * @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; -} - -export function addPlaylistContentsMediaContainerToJSON( - addPlaylistContentsMediaContainer: AddPlaylistContentsMediaContainer, -): string { - return JSON.stringify( - AddPlaylistContentsMediaContainer$outboundSchema.parse( - addPlaylistContentsMediaContainer, - ), - ); -} - -export function addPlaylistContentsMediaContainerFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AddPlaylistContentsMediaContainer$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AddPlaylistContentsMediaContainer' from JSON`, - ); -} - -/** @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", - }); -}); - -/** @internal */ -export type AddPlaylistContentsResponseBody$Outbound = { - 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", - }); -}); - -/** - * @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 function addPlaylistContentsResponseBodyToJSON( - addPlaylistContentsResponseBody: AddPlaylistContentsResponseBody, -): string { - return JSON.stringify( - AddPlaylistContentsResponseBody$outboundSchema.parse( - addPlaylistContentsResponseBody, - ), - ); -} - -export function addPlaylistContentsResponseBodyFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AddPlaylistContentsResponseBody$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AddPlaylistContentsResponseBody' from JSON`, - ); -} - -/** @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", - }); -}); - -/** @internal */ -export type AddPlaylistContentsResponse$Outbound = { - 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", - }); -}); - -/** - * @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; -} - -export function addPlaylistContentsResponseToJSON( - addPlaylistContentsResponse: AddPlaylistContentsResponse, -): string { - return JSON.stringify( - AddPlaylistContentsResponse$outboundSchema.parse( - addPlaylistContentsResponse, - ), - ); -} - -export function addPlaylistContentsResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AddPlaylistContentsResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AddPlaylistContentsResponse' from JSON`, - ); -} diff --git a/src/sdk/models/operations/addplaylistitems.ts b/src/sdk/models/operations/addplaylistitems.ts new file mode 100644 index 00000000..d67d9c25 --- /dev/null +++ b/src/sdk/models/operations/addplaylistitems.ts @@ -0,0 +1,435 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type AddPlaylistItemsGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type AddPlaylistItemsRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The ID of the playlist + */ + playlistId: number; + /** + * The content URI for the playlist. + */ + uri?: string | undefined; + /** + * The play queue to add to a playlist. + */ + playQueueID?: number | undefined; +}; + +export type AddPlaylistItemsResponse = { + /** + * 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; + /** + * OK + */ + mediaContainerWithPlaylistMetadata?: + | shared.MediaContainerWithPlaylistMetadata + | undefined; +}; + +/** @internal */ +export const AddPlaylistItemsGlobals$inboundSchema: z.ZodType< + AddPlaylistItemsGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AddPlaylistItemsGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const AddPlaylistItemsGlobals$outboundSchema: z.ZodType< + AddPlaylistItemsGlobals$Outbound, + z.ZodTypeDef, + AddPlaylistItemsGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddPlaylistItemsGlobals$ { + /** @deprecated use `AddPlaylistItemsGlobals$inboundSchema` instead. */ + export const inboundSchema = AddPlaylistItemsGlobals$inboundSchema; + /** @deprecated use `AddPlaylistItemsGlobals$outboundSchema` instead. */ + export const outboundSchema = AddPlaylistItemsGlobals$outboundSchema; + /** @deprecated use `AddPlaylistItemsGlobals$Outbound` instead. */ + export type Outbound = AddPlaylistItemsGlobals$Outbound; +} + +export function addPlaylistItemsGlobalsToJSON( + addPlaylistItemsGlobals: AddPlaylistItemsGlobals, +): string { + return JSON.stringify( + AddPlaylistItemsGlobals$outboundSchema.parse(addPlaylistItemsGlobals), + ); +} + +export function addPlaylistItemsGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddPlaylistItemsGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddPlaylistItemsGlobals' from JSON`, + ); +} + +/** @internal */ +export const AddPlaylistItemsRequest$inboundSchema: z.ZodType< + AddPlaylistItemsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + playlistId: z.number().int(), + uri: z.string().optional(), + playQueueID: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AddPlaylistItemsRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + playlistId: number; + uri?: string | undefined; + playQueueID?: number | undefined; +}; + +/** @internal */ +export const AddPlaylistItemsRequest$outboundSchema: z.ZodType< + AddPlaylistItemsRequest$Outbound, + z.ZodTypeDef, + AddPlaylistItemsRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + playlistId: z.number().int(), + uri: z.string().optional(), + playQueueID: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddPlaylistItemsRequest$ { + /** @deprecated use `AddPlaylistItemsRequest$inboundSchema` instead. */ + export const inboundSchema = AddPlaylistItemsRequest$inboundSchema; + /** @deprecated use `AddPlaylistItemsRequest$outboundSchema` instead. */ + export const outboundSchema = AddPlaylistItemsRequest$outboundSchema; + /** @deprecated use `AddPlaylistItemsRequest$Outbound` instead. */ + export type Outbound = AddPlaylistItemsRequest$Outbound; +} + +export function addPlaylistItemsRequestToJSON( + addPlaylistItemsRequest: AddPlaylistItemsRequest, +): string { + return JSON.stringify( + AddPlaylistItemsRequest$outboundSchema.parse(addPlaylistItemsRequest), + ); +} + +export function addPlaylistItemsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddPlaylistItemsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddPlaylistItemsRequest' from JSON`, + ); +} + +/** @internal */ +export const AddPlaylistItemsResponse$inboundSchema: z.ZodType< + AddPlaylistItemsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + MediaContainerWithPlaylistMetadata: shared + .MediaContainerWithPlaylistMetadata$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "MediaContainerWithPlaylistMetadata": "mediaContainerWithPlaylistMetadata", + }); +}); + +/** @internal */ +export type AddPlaylistItemsResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + MediaContainerWithPlaylistMetadata?: + | shared.MediaContainerWithPlaylistMetadata$Outbound + | undefined; +}; + +/** @internal */ +export const AddPlaylistItemsResponse$outboundSchema: z.ZodType< + AddPlaylistItemsResponse$Outbound, + z.ZodTypeDef, + AddPlaylistItemsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + mediaContainerWithPlaylistMetadata: shared + .MediaContainerWithPlaylistMetadata$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + mediaContainerWithPlaylistMetadata: "MediaContainerWithPlaylistMetadata", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddPlaylistItemsResponse$ { + /** @deprecated use `AddPlaylistItemsResponse$inboundSchema` instead. */ + export const inboundSchema = AddPlaylistItemsResponse$inboundSchema; + /** @deprecated use `AddPlaylistItemsResponse$outboundSchema` instead. */ + export const outboundSchema = AddPlaylistItemsResponse$outboundSchema; + /** @deprecated use `AddPlaylistItemsResponse$Outbound` instead. */ + export type Outbound = AddPlaylistItemsResponse$Outbound; +} + +export function addPlaylistItemsResponseToJSON( + addPlaylistItemsResponse: AddPlaylistItemsResponse, +): string { + return JSON.stringify( + AddPlaylistItemsResponse$outboundSchema.parse(addPlaylistItemsResponse), + ); +} + +export function addPlaylistItemsResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddPlaylistItemsResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddPlaylistItemsResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/addprovider.ts b/src/sdk/models/operations/addprovider.ts new file mode 100644 index 00000000..542bbeb9 --- /dev/null +++ b/src/sdk/models/operations/addprovider.ts @@ -0,0 +1,405 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type AddProviderGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type AddProviderRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The URL of the media provider to add. + */ + url: string; +}; + +export type AddProviderResponse = { + /** + * 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 AddProviderGlobals$inboundSchema: z.ZodType< + AddProviderGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AddProviderGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const AddProviderGlobals$outboundSchema: z.ZodType< + AddProviderGlobals$Outbound, + z.ZodTypeDef, + AddProviderGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddProviderGlobals$ { + /** @deprecated use `AddProviderGlobals$inboundSchema` instead. */ + export const inboundSchema = AddProviderGlobals$inboundSchema; + /** @deprecated use `AddProviderGlobals$outboundSchema` instead. */ + export const outboundSchema = AddProviderGlobals$outboundSchema; + /** @deprecated use `AddProviderGlobals$Outbound` instead. */ + export type Outbound = AddProviderGlobals$Outbound; +} + +export function addProviderGlobalsToJSON( + addProviderGlobals: AddProviderGlobals, +): string { + return JSON.stringify( + AddProviderGlobals$outboundSchema.parse(addProviderGlobals), + ); +} + +export function addProviderGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddProviderGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddProviderGlobals' from JSON`, + ); +} + +/** @internal */ +export const AddProviderRequest$inboundSchema: z.ZodType< + AddProviderRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + url: z.string(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AddProviderRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + url: string; +}; + +/** @internal */ +export const AddProviderRequest$outboundSchema: z.ZodType< + AddProviderRequest$Outbound, + z.ZodTypeDef, + AddProviderRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + url: z.string(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddProviderRequest$ { + /** @deprecated use `AddProviderRequest$inboundSchema` instead. */ + export const inboundSchema = AddProviderRequest$inboundSchema; + /** @deprecated use `AddProviderRequest$outboundSchema` instead. */ + export const outboundSchema = AddProviderRequest$outboundSchema; + /** @deprecated use `AddProviderRequest$Outbound` instead. */ + export type Outbound = AddProviderRequest$Outbound; +} + +export function addProviderRequestToJSON( + addProviderRequest: AddProviderRequest, +): string { + return JSON.stringify( + AddProviderRequest$outboundSchema.parse(addProviderRequest), + ); +} + +export function addProviderRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddProviderRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddProviderRequest' from JSON`, + ); +} + +/** @internal */ +export const AddProviderResponse$inboundSchema: z.ZodType< + AddProviderResponse, + 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 AddProviderResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const AddProviderResponse$outboundSchema: z.ZodType< + AddProviderResponse$Outbound, + z.ZodTypeDef, + AddProviderResponse +> = 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 AddProviderResponse$ { + /** @deprecated use `AddProviderResponse$inboundSchema` instead. */ + export const inboundSchema = AddProviderResponse$inboundSchema; + /** @deprecated use `AddProviderResponse$outboundSchema` instead. */ + export const outboundSchema = AddProviderResponse$outboundSchema; + /** @deprecated use `AddProviderResponse$Outbound` instead. */ + export type Outbound = AddProviderResponse$Outbound; +} + +export function addProviderResponseToJSON( + addProviderResponse: AddProviderResponse, +): string { + return JSON.stringify( + AddProviderResponse$outboundSchema.parse(addProviderResponse), + ); +} + +export function addProviderResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddProviderResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddProviderResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/addsection.ts b/src/sdk/models/operations/addsection.ts new file mode 100644 index 00000000..f3f1811d --- /dev/null +++ b/src/sdk/models/operations/addsection.ts @@ -0,0 +1,530 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type AddSectionGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +/** + * The preferences for this section + */ +export type AddSectionPrefs = {}; + +export type AddSectionRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The name of the new section + */ + name: string; + /** + * The type of library section + */ + type: number; + /** + * The scanner this section should use + */ + scanner?: string | undefined; + /** + * The agent this section should use for metadata + */ + agent: string; + /** + * The agent group id for this section + */ + metadataAgentProviderGroupId?: string | undefined; + /** + * The language of this section + */ + language: string; + /** + * The locations on disk to add to this section + */ + locations?: Array | undefined; + /** + * The preferences for this section + */ + prefs?: AddSectionPrefs | undefined; + /** + * If set, paths are relative to `Media Upload` path + */ + relative?: shared.BoolInt | undefined; + /** + * If set, import media from iTunes. + */ + importFromiTunes?: shared.BoolInt | undefined; +}; + +export type AddSectionResponse = { + /** + * 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; + /** + * OK + */ + slashGetResponses200?: shared.SlashGetResponses200 | undefined; +}; + +/** @internal */ +export const AddSectionGlobals$inboundSchema: z.ZodType< + AddSectionGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AddSectionGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const AddSectionGlobals$outboundSchema: z.ZodType< + AddSectionGlobals$Outbound, + z.ZodTypeDef, + AddSectionGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddSectionGlobals$ { + /** @deprecated use `AddSectionGlobals$inboundSchema` instead. */ + export const inboundSchema = AddSectionGlobals$inboundSchema; + /** @deprecated use `AddSectionGlobals$outboundSchema` instead. */ + export const outboundSchema = AddSectionGlobals$outboundSchema; + /** @deprecated use `AddSectionGlobals$Outbound` instead. */ + export type Outbound = AddSectionGlobals$Outbound; +} + +export function addSectionGlobalsToJSON( + addSectionGlobals: AddSectionGlobals, +): string { + return JSON.stringify( + AddSectionGlobals$outboundSchema.parse(addSectionGlobals), + ); +} + +export function addSectionGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddSectionGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddSectionGlobals' from JSON`, + ); +} + +/** @internal */ +export const AddSectionPrefs$inboundSchema: z.ZodType< + AddSectionPrefs, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type AddSectionPrefs$Outbound = {}; + +/** @internal */ +export const AddSectionPrefs$outboundSchema: z.ZodType< + AddSectionPrefs$Outbound, + z.ZodTypeDef, + AddSectionPrefs +> = 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 AddSectionPrefs$ { + /** @deprecated use `AddSectionPrefs$inboundSchema` instead. */ + export const inboundSchema = AddSectionPrefs$inboundSchema; + /** @deprecated use `AddSectionPrefs$outboundSchema` instead. */ + export const outboundSchema = AddSectionPrefs$outboundSchema; + /** @deprecated use `AddSectionPrefs$Outbound` instead. */ + export type Outbound = AddSectionPrefs$Outbound; +} + +export function addSectionPrefsToJSON( + addSectionPrefs: AddSectionPrefs, +): string { + return JSON.stringify(AddSectionPrefs$outboundSchema.parse(addSectionPrefs)); +} + +export function addSectionPrefsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddSectionPrefs$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddSectionPrefs' from JSON`, + ); +} + +/** @internal */ +export const AddSectionRequest$inboundSchema: z.ZodType< + AddSectionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + name: z.string(), + type: z.number().int(), + scanner: z.string().optional(), + agent: z.string(), + metadataAgentProviderGroupId: z.string().optional(), + language: z.string(), + locations: z.array(z.string()).optional(), + prefs: z.lazy(() => AddSectionPrefs$inboundSchema).optional(), + relative: shared.BoolInt$inboundSchema.optional(), + importFromiTunes: shared.BoolInt$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AddSectionRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + name: string; + type: number; + scanner?: string | undefined; + agent: string; + metadataAgentProviderGroupId?: string | undefined; + language: string; + locations?: Array | undefined; + prefs?: AddSectionPrefs$Outbound | undefined; + relative?: number | undefined; + importFromiTunes?: number | undefined; +}; + +/** @internal */ +export const AddSectionRequest$outboundSchema: z.ZodType< + AddSectionRequest$Outbound, + z.ZodTypeDef, + AddSectionRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + name: z.string(), + type: z.number().int(), + scanner: z.string().optional(), + agent: z.string(), + metadataAgentProviderGroupId: z.string().optional(), + language: z.string(), + locations: z.array(z.string()).optional(), + prefs: z.lazy(() => AddSectionPrefs$outboundSchema).optional(), + relative: shared.BoolInt$outboundSchema.optional(), + importFromiTunes: shared.BoolInt$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddSectionRequest$ { + /** @deprecated use `AddSectionRequest$inboundSchema` instead. */ + export const inboundSchema = AddSectionRequest$inboundSchema; + /** @deprecated use `AddSectionRequest$outboundSchema` instead. */ + export const outboundSchema = AddSectionRequest$outboundSchema; + /** @deprecated use `AddSectionRequest$Outbound` instead. */ + export type Outbound = AddSectionRequest$Outbound; +} + +export function addSectionRequestToJSON( + addSectionRequest: AddSectionRequest, +): string { + return JSON.stringify( + AddSectionRequest$outboundSchema.parse(addSectionRequest), + ); +} + +export function addSectionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddSectionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddSectionRequest' from JSON`, + ); +} + +/** @internal */ +export const AddSectionResponse$inboundSchema: z.ZodType< + AddSectionResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + "slash-get-responses-200": shared.SlashGetResponses200$inboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "slash-get-responses-200": "slashGetResponses200", + }); +}); + +/** @internal */ +export type AddSectionResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + "slash-get-responses-200"?: shared.SlashGetResponses200$Outbound | undefined; +}; + +/** @internal */ +export const AddSectionResponse$outboundSchema: z.ZodType< + AddSectionResponse$Outbound, + z.ZodTypeDef, + AddSectionResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + slashGetResponses200: shared.SlashGetResponses200$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + slashGetResponses200: "slash-get-responses-200", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddSectionResponse$ { + /** @deprecated use `AddSectionResponse$inboundSchema` instead. */ + export const inboundSchema = AddSectionResponse$inboundSchema; + /** @deprecated use `AddSectionResponse$outboundSchema` instead. */ + export const outboundSchema = AddSectionResponse$outboundSchema; + /** @deprecated use `AddSectionResponse$Outbound` instead. */ + export type Outbound = AddSectionResponse$Outbound; +} + +export function addSectionResponseToJSON( + addSectionResponse: AddSectionResponse, +): string { + return JSON.stringify( + AddSectionResponse$outboundSchema.parse(addSectionResponse), + ); +} + +export function addSectionResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddSectionResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddSectionResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/addsubtitles.ts b/src/sdk/models/operations/addsubtitles.ts new file mode 100644 index 00000000..fa67dcb9 --- /dev/null +++ b/src/sdk/models/operations/addsubtitles.ts @@ -0,0 +1,434 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type AddSubtitlesGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type AddSubtitlesRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + ids: string; + title?: string | undefined; + language?: string | undefined; + mediaItemID?: number | undefined; + /** + * The URL of the subtitle. If not provided, the contents of the subtitle must be in the post body + */ + url?: string | undefined; + format?: string | undefined; + forced?: shared.BoolInt | undefined; + hearingImpaired?: shared.BoolInt | undefined; +}; + +export type AddSubtitlesResponse = { + /** + * 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 AddSubtitlesGlobals$inboundSchema: z.ZodType< + AddSubtitlesGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AddSubtitlesGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const AddSubtitlesGlobals$outboundSchema: z.ZodType< + AddSubtitlesGlobals$Outbound, + z.ZodTypeDef, + AddSubtitlesGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddSubtitlesGlobals$ { + /** @deprecated use `AddSubtitlesGlobals$inboundSchema` instead. */ + export const inboundSchema = AddSubtitlesGlobals$inboundSchema; + /** @deprecated use `AddSubtitlesGlobals$outboundSchema` instead. */ + export const outboundSchema = AddSubtitlesGlobals$outboundSchema; + /** @deprecated use `AddSubtitlesGlobals$Outbound` instead. */ + export type Outbound = AddSubtitlesGlobals$Outbound; +} + +export function addSubtitlesGlobalsToJSON( + addSubtitlesGlobals: AddSubtitlesGlobals, +): string { + return JSON.stringify( + AddSubtitlesGlobals$outboundSchema.parse(addSubtitlesGlobals), + ); +} + +export function addSubtitlesGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddSubtitlesGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddSubtitlesGlobals' from JSON`, + ); +} + +/** @internal */ +export const AddSubtitlesRequest$inboundSchema: z.ZodType< + AddSubtitlesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + ids: z.string(), + title: z.string().optional(), + language: z.string().optional(), + mediaItemID: z.number().int().optional(), + url: z.string().optional(), + format: z.string().optional(), + forced: shared.BoolInt$inboundSchema.optional(), + hearingImpaired: shared.BoolInt$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AddSubtitlesRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + ids: string; + title?: string | undefined; + language?: string | undefined; + mediaItemID?: number | undefined; + url?: string | undefined; + format?: string | undefined; + forced?: number | undefined; + hearingImpaired?: number | undefined; +}; + +/** @internal */ +export const AddSubtitlesRequest$outboundSchema: z.ZodType< + AddSubtitlesRequest$Outbound, + z.ZodTypeDef, + AddSubtitlesRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + ids: z.string(), + title: z.string().optional(), + language: z.string().optional(), + mediaItemID: z.number().int().optional(), + url: z.string().optional(), + format: z.string().optional(), + forced: shared.BoolInt$outboundSchema.optional(), + hearingImpaired: shared.BoolInt$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddSubtitlesRequest$ { + /** @deprecated use `AddSubtitlesRequest$inboundSchema` instead. */ + export const inboundSchema = AddSubtitlesRequest$inboundSchema; + /** @deprecated use `AddSubtitlesRequest$outboundSchema` instead. */ + export const outboundSchema = AddSubtitlesRequest$outboundSchema; + /** @deprecated use `AddSubtitlesRequest$Outbound` instead. */ + export type Outbound = AddSubtitlesRequest$Outbound; +} + +export function addSubtitlesRequestToJSON( + addSubtitlesRequest: AddSubtitlesRequest, +): string { + return JSON.stringify( + AddSubtitlesRequest$outboundSchema.parse(addSubtitlesRequest), + ); +} + +export function addSubtitlesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddSubtitlesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddSubtitlesRequest' from JSON`, + ); +} + +/** @internal */ +export const AddSubtitlesResponse$inboundSchema: z.ZodType< + AddSubtitlesResponse, + 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 AddSubtitlesResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const AddSubtitlesResponse$outboundSchema: z.ZodType< + AddSubtitlesResponse$Outbound, + z.ZodTypeDef, + AddSubtitlesResponse +> = 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 AddSubtitlesResponse$ { + /** @deprecated use `AddSubtitlesResponse$inboundSchema` instead. */ + export const inboundSchema = AddSubtitlesResponse$inboundSchema; + /** @deprecated use `AddSubtitlesResponse$outboundSchema` instead. */ + export const outboundSchema = AddSubtitlesResponse$outboundSchema; + /** @deprecated use `AddSubtitlesResponse$Outbound` instead. */ + export type Outbound = AddSubtitlesResponse$Outbound; +} + +export function addSubtitlesResponseToJSON( + addSubtitlesResponse: AddSubtitlesResponse, +): string { + return JSON.stringify( + AddSubtitlesResponse$outboundSchema.parse(addSubtitlesResponse), + ); +} + +export function addSubtitlesResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddSubtitlesResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddSubtitlesResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/addtoplayqueue.ts b/src/sdk/models/operations/addtoplayqueue.ts new file mode 100644 index 00000000..5e391208 --- /dev/null +++ b/src/sdk/models/operations/addtoplayqueue.ts @@ -0,0 +1,442 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type AddToPlayQueueGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type AddToPlayQueueRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The ID of the play queue. + */ + playQueueId: number; + /** + * The content URI for what we're adding to the queue. + */ + uri?: string | undefined; + /** + * The ID of the playlist to add to the playQueue. + */ + playlistID?: string | undefined; + /** + * Play this item next (defaults to 0 - queueing at the end of manually queued items). + */ + next?: shared.BoolInt | undefined; +}; + +export type AddToPlayQueueResponse = { + /** + * 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; + /** + * OK + */ + mediaContainerWithPlaylistMetadata?: + | shared.MediaContainerWithPlaylistMetadata + | undefined; +}; + +/** @internal */ +export const AddToPlayQueueGlobals$inboundSchema: z.ZodType< + AddToPlayQueueGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AddToPlayQueueGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const AddToPlayQueueGlobals$outboundSchema: z.ZodType< + AddToPlayQueueGlobals$Outbound, + z.ZodTypeDef, + AddToPlayQueueGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddToPlayQueueGlobals$ { + /** @deprecated use `AddToPlayQueueGlobals$inboundSchema` instead. */ + export const inboundSchema = AddToPlayQueueGlobals$inboundSchema; + /** @deprecated use `AddToPlayQueueGlobals$outboundSchema` instead. */ + export const outboundSchema = AddToPlayQueueGlobals$outboundSchema; + /** @deprecated use `AddToPlayQueueGlobals$Outbound` instead. */ + export type Outbound = AddToPlayQueueGlobals$Outbound; +} + +export function addToPlayQueueGlobalsToJSON( + addToPlayQueueGlobals: AddToPlayQueueGlobals, +): string { + return JSON.stringify( + AddToPlayQueueGlobals$outboundSchema.parse(addToPlayQueueGlobals), + ); +} + +export function addToPlayQueueGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddToPlayQueueGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddToPlayQueueGlobals' from JSON`, + ); +} + +/** @internal */ +export const AddToPlayQueueRequest$inboundSchema: z.ZodType< + AddToPlayQueueRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + playQueueId: z.number().int(), + uri: z.string().optional(), + playlistID: z.string().optional(), + next: shared.BoolInt$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AddToPlayQueueRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + playQueueId: number; + uri?: string | undefined; + playlistID?: string | undefined; + next?: number | undefined; +}; + +/** @internal */ +export const AddToPlayQueueRequest$outboundSchema: z.ZodType< + AddToPlayQueueRequest$Outbound, + z.ZodTypeDef, + AddToPlayQueueRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + playQueueId: z.number().int(), + uri: z.string().optional(), + playlistID: z.string().optional(), + next: shared.BoolInt$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddToPlayQueueRequest$ { + /** @deprecated use `AddToPlayQueueRequest$inboundSchema` instead. */ + export const inboundSchema = AddToPlayQueueRequest$inboundSchema; + /** @deprecated use `AddToPlayQueueRequest$outboundSchema` instead. */ + export const outboundSchema = AddToPlayQueueRequest$outboundSchema; + /** @deprecated use `AddToPlayQueueRequest$Outbound` instead. */ + export type Outbound = AddToPlayQueueRequest$Outbound; +} + +export function addToPlayQueueRequestToJSON( + addToPlayQueueRequest: AddToPlayQueueRequest, +): string { + return JSON.stringify( + AddToPlayQueueRequest$outboundSchema.parse(addToPlayQueueRequest), + ); +} + +export function addToPlayQueueRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddToPlayQueueRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddToPlayQueueRequest' from JSON`, + ); +} + +/** @internal */ +export const AddToPlayQueueResponse$inboundSchema: z.ZodType< + AddToPlayQueueResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + MediaContainerWithPlaylistMetadata: shared + .MediaContainerWithPlaylistMetadata$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "MediaContainerWithPlaylistMetadata": "mediaContainerWithPlaylistMetadata", + }); +}); + +/** @internal */ +export type AddToPlayQueueResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + MediaContainerWithPlaylistMetadata?: + | shared.MediaContainerWithPlaylistMetadata$Outbound + | undefined; +}; + +/** @internal */ +export const AddToPlayQueueResponse$outboundSchema: z.ZodType< + AddToPlayQueueResponse$Outbound, + z.ZodTypeDef, + AddToPlayQueueResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + mediaContainerWithPlaylistMetadata: shared + .MediaContainerWithPlaylistMetadata$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + mediaContainerWithPlaylistMetadata: "MediaContainerWithPlaylistMetadata", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddToPlayQueueResponse$ { + /** @deprecated use `AddToPlayQueueResponse$inboundSchema` instead. */ + export const inboundSchema = AddToPlayQueueResponse$inboundSchema; + /** @deprecated use `AddToPlayQueueResponse$outboundSchema` instead. */ + export const outboundSchema = AddToPlayQueueResponse$outboundSchema; + /** @deprecated use `AddToPlayQueueResponse$Outbound` instead. */ + export type Outbound = AddToPlayQueueResponse$Outbound; +} + +export function addToPlayQueueResponseToJSON( + addToPlayQueueResponse: AddToPlayQueueResponse, +): string { + return JSON.stringify( + AddToPlayQueueResponse$outboundSchema.parse(addToPlayQueueResponse), + ); +} + +export function addToPlayQueueResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddToPlayQueueResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddToPlayQueueResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/analyzemetadata.ts b/src/sdk/models/operations/analyzemetadata.ts new file mode 100644 index 00000000..be25d057 --- /dev/null +++ b/src/sdk/models/operations/analyzemetadata.ts @@ -0,0 +1,416 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type AnalyzeMetadataGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type AnalyzeMetadataRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + ids: string; + /** + * Set the offset to be used for thumbnails + */ + thumbOffset?: number | undefined; + /** + * Set the offset to be used for artwork + */ + artOffset?: number | undefined; +}; + +export type AnalyzeMetadataResponse = { + /** + * 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 AnalyzeMetadataGlobals$inboundSchema: z.ZodType< + AnalyzeMetadataGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AnalyzeMetadataGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const AnalyzeMetadataGlobals$outboundSchema: z.ZodType< + AnalyzeMetadataGlobals$Outbound, + z.ZodTypeDef, + AnalyzeMetadataGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AnalyzeMetadataGlobals$ { + /** @deprecated use `AnalyzeMetadataGlobals$inboundSchema` instead. */ + export const inboundSchema = AnalyzeMetadataGlobals$inboundSchema; + /** @deprecated use `AnalyzeMetadataGlobals$outboundSchema` instead. */ + export const outboundSchema = AnalyzeMetadataGlobals$outboundSchema; + /** @deprecated use `AnalyzeMetadataGlobals$Outbound` instead. */ + export type Outbound = AnalyzeMetadataGlobals$Outbound; +} + +export function analyzeMetadataGlobalsToJSON( + analyzeMetadataGlobals: AnalyzeMetadataGlobals, +): string { + return JSON.stringify( + AnalyzeMetadataGlobals$outboundSchema.parse(analyzeMetadataGlobals), + ); +} + +export function analyzeMetadataGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AnalyzeMetadataGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AnalyzeMetadataGlobals' from JSON`, + ); +} + +/** @internal */ +export const AnalyzeMetadataRequest$inboundSchema: z.ZodType< + AnalyzeMetadataRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + ids: z.string(), + thumbOffset: z.number().optional(), + artOffset: z.number().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AnalyzeMetadataRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + ids: string; + thumbOffset?: number | undefined; + artOffset?: number | undefined; +}; + +/** @internal */ +export const AnalyzeMetadataRequest$outboundSchema: z.ZodType< + AnalyzeMetadataRequest$Outbound, + z.ZodTypeDef, + AnalyzeMetadataRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + ids: z.string(), + thumbOffset: z.number().optional(), + artOffset: z.number().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AnalyzeMetadataRequest$ { + /** @deprecated use `AnalyzeMetadataRequest$inboundSchema` instead. */ + export const inboundSchema = AnalyzeMetadataRequest$inboundSchema; + /** @deprecated use `AnalyzeMetadataRequest$outboundSchema` instead. */ + export const outboundSchema = AnalyzeMetadataRequest$outboundSchema; + /** @deprecated use `AnalyzeMetadataRequest$Outbound` instead. */ + export type Outbound = AnalyzeMetadataRequest$Outbound; +} + +export function analyzeMetadataRequestToJSON( + analyzeMetadataRequest: AnalyzeMetadataRequest, +): string { + return JSON.stringify( + AnalyzeMetadataRequest$outboundSchema.parse(analyzeMetadataRequest), + ); +} + +export function analyzeMetadataRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AnalyzeMetadataRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AnalyzeMetadataRequest' from JSON`, + ); +} + +/** @internal */ +export const AnalyzeMetadataResponse$inboundSchema: z.ZodType< + AnalyzeMetadataResponse, + 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 AnalyzeMetadataResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const AnalyzeMetadataResponse$outboundSchema: z.ZodType< + AnalyzeMetadataResponse$Outbound, + z.ZodTypeDef, + AnalyzeMetadataResponse +> = 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 AnalyzeMetadataResponse$ { + /** @deprecated use `AnalyzeMetadataResponse$inboundSchema` instead. */ + export const inboundSchema = AnalyzeMetadataResponse$inboundSchema; + /** @deprecated use `AnalyzeMetadataResponse$outboundSchema` instead. */ + export const outboundSchema = AnalyzeMetadataResponse$outboundSchema; + /** @deprecated use `AnalyzeMetadataResponse$Outbound` instead. */ + export type Outbound = AnalyzeMetadataResponse$Outbound; +} + +export function analyzeMetadataResponseToJSON( + analyzeMetadataResponse: AnalyzeMetadataResponse, +): string { + return JSON.stringify( + AnalyzeMetadataResponse$outboundSchema.parse(analyzeMetadataResponse), + ); +} + +export function analyzeMetadataResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AnalyzeMetadataResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AnalyzeMetadataResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/applyupdates.ts b/src/sdk/models/operations/applyupdates.ts index 40b2d43e..2719669f 100644 --- a/src/sdk/models/operations/applyupdates.ts +++ b/src/sdk/models/operations/applyupdates.ts @@ -7,32 +7,100 @@ import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.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, -} - -/** - * 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, -} +export type ApplyUpdatesGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; 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 + * An opaque identifier unique to the client */ - tonight?: Tonight | undefined; + xPlexClientIdentifier?: string | undefined; /** - * Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. + * The name of the client product */ - skip?: Skip | undefined; + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | 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 immediately. + */ + tonight?: shared.BoolInt | undefined; + /** + * Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. + */ + skip?: shared.BoolInt | undefined; }; export type ApplyUpdatesResponse = { @@ -51,42 +119,110 @@ export type ApplyUpdatesResponse = { }; /** @internal */ -export const Tonight$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(Tonight); +export const ApplyUpdatesGlobals$inboundSchema: z.ZodType< + ApplyUpdatesGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); /** @internal */ -export const Tonight$outboundSchema: z.ZodNativeEnum = - Tonight$inboundSchema; +export type ApplyUpdatesGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const ApplyUpdatesGlobals$outboundSchema: z.ZodType< + ApplyUpdatesGlobals$Outbound, + z.ZodTypeDef, + ApplyUpdatesGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); /** * @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; +export namespace ApplyUpdatesGlobals$ { + /** @deprecated use `ApplyUpdatesGlobals$inboundSchema` instead. */ + export const inboundSchema = ApplyUpdatesGlobals$inboundSchema; + /** @deprecated use `ApplyUpdatesGlobals$outboundSchema` instead. */ + export const outboundSchema = ApplyUpdatesGlobals$outboundSchema; + /** @deprecated use `ApplyUpdatesGlobals$Outbound` instead. */ + export type Outbound = ApplyUpdatesGlobals$Outbound; } -/** @internal */ -export const Skip$inboundSchema: z.ZodNativeEnum = z.nativeEnum( - Skip, -); +export function applyUpdatesGlobalsToJSON( + applyUpdatesGlobals: ApplyUpdatesGlobals, +): string { + return JSON.stringify( + ApplyUpdatesGlobals$outboundSchema.parse(applyUpdatesGlobals), + ); +} -/** @internal */ -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; +export function applyUpdatesGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ApplyUpdatesGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplyUpdatesGlobals' from JSON`, + ); } /** @internal */ @@ -95,12 +231,45 @@ export const ApplyUpdatesRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - tonight: Tonight$inboundSchema.optional(), - skip: Skip$inboundSchema.optional(), + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + tonight: shared.BoolInt$inboundSchema.optional(), + skip: shared.BoolInt$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); }); /** @internal */ export type ApplyUpdatesRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; tonight?: number | undefined; skip?: number | undefined; }; @@ -111,8 +280,31 @@ export const ApplyUpdatesRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ApplyUpdatesRequest > = z.object({ - tonight: Tonight$outboundSchema.optional(), - skip: Skip$outboundSchema.optional(), + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + tonight: shared.BoolInt$outboundSchema.optional(), + skip: shared.BoolInt$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); }); /** diff --git a/src/sdk/models/operations/autocomplete.ts b/src/sdk/models/operations/autocomplete.ts new file mode 100644 index 00000000..d059281b --- /dev/null +++ b/src/sdk/models/operations/autocomplete.ts @@ -0,0 +1,448 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type AutocompleteGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type AutocompleteRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * Section identifier + */ + sectionId: number; + /** + * Item type + */ + type?: number | undefined; + /** + * The "field" stands in for any field, the value is a partial string for matching + */ + fieldQuery?: string | undefined; + /** + * This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries + */ + mediaQuery?: shared.MediaQuery | undefined; +}; + +export type AutocompleteResponse = { + /** + * 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; + /** + * OK + */ + mediaContainerWithMetadata?: shared.MediaContainerWithMetadata | undefined; + headers: { [k: string]: Array }; +}; + +/** @internal */ +export const AutocompleteGlobals$inboundSchema: z.ZodType< + AutocompleteGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type AutocompleteGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const AutocompleteGlobals$outboundSchema: z.ZodType< + AutocompleteGlobals$Outbound, + z.ZodTypeDef, + AutocompleteGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AutocompleteGlobals$ { + /** @deprecated use `AutocompleteGlobals$inboundSchema` instead. */ + export const inboundSchema = AutocompleteGlobals$inboundSchema; + /** @deprecated use `AutocompleteGlobals$outboundSchema` instead. */ + export const outboundSchema = AutocompleteGlobals$outboundSchema; + /** @deprecated use `AutocompleteGlobals$Outbound` instead. */ + export type Outbound = AutocompleteGlobals$Outbound; +} + +export function autocompleteGlobalsToJSON( + autocompleteGlobals: AutocompleteGlobals, +): string { + return JSON.stringify( + AutocompleteGlobals$outboundSchema.parse(autocompleteGlobals), + ); +} + +export function autocompleteGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AutocompleteGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AutocompleteGlobals' from JSON`, + ); +} + +/** @internal */ +export const AutocompleteRequest$inboundSchema: z.ZodType< + AutocompleteRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + sectionId: z.number().int(), + type: z.number().int().optional(), + "field.query": z.string().optional(), + mediaQuery: shared.MediaQuery$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + "field.query": "fieldQuery", + }); +}); + +/** @internal */ +export type AutocompleteRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + sectionId: number; + type?: number | undefined; + "field.query"?: string | undefined; + mediaQuery?: shared.MediaQuery$Outbound | undefined; +}; + +/** @internal */ +export const AutocompleteRequest$outboundSchema: z.ZodType< + AutocompleteRequest$Outbound, + z.ZodTypeDef, + AutocompleteRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + sectionId: z.number().int(), + type: z.number().int().optional(), + fieldQuery: z.string().optional(), + mediaQuery: shared.MediaQuery$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + fieldQuery: "field.query", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AutocompleteRequest$ { + /** @deprecated use `AutocompleteRequest$inboundSchema` instead. */ + export const inboundSchema = AutocompleteRequest$inboundSchema; + /** @deprecated use `AutocompleteRequest$outboundSchema` instead. */ + export const outboundSchema = AutocompleteRequest$outboundSchema; + /** @deprecated use `AutocompleteRequest$Outbound` instead. */ + export type Outbound = AutocompleteRequest$Outbound; +} + +export function autocompleteRequestToJSON( + autocompleteRequest: AutocompleteRequest, +): string { + return JSON.stringify( + AutocompleteRequest$outboundSchema.parse(autocompleteRequest), + ); +} + +export function autocompleteRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AutocompleteRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AutocompleteRequest' from JSON`, + ); +} + +/** @internal */ +export const AutocompleteResponse$inboundSchema: z.ZodType< + AutocompleteResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + MediaContainerWithMetadata: shared.MediaContainerWithMetadata$inboundSchema + .optional(), + Headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "MediaContainerWithMetadata": "mediaContainerWithMetadata", + "Headers": "headers", + }); +}); + +/** @internal */ +export type AutocompleteResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + MediaContainerWithMetadata?: + | shared.MediaContainerWithMetadata$Outbound + | undefined; + Headers: { [k: string]: Array }; +}; + +/** @internal */ +export const AutocompleteResponse$outboundSchema: z.ZodType< + AutocompleteResponse$Outbound, + z.ZodTypeDef, + AutocompleteResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + mediaContainerWithMetadata: shared.MediaContainerWithMetadata$outboundSchema + .optional(), + headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + mediaContainerWithMetadata: "MediaContainerWithMetadata", + 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 AutocompleteResponse$ { + /** @deprecated use `AutocompleteResponse$inboundSchema` instead. */ + export const inboundSchema = AutocompleteResponse$inboundSchema; + /** @deprecated use `AutocompleteResponse$outboundSchema` instead. */ + export const outboundSchema = AutocompleteResponse$outboundSchema; + /** @deprecated use `AutocompleteResponse$Outbound` instead. */ + export type Outbound = AutocompleteResponse$Outbound; +} + +export function autocompleteResponseToJSON( + autocompleteResponse: AutocompleteResponse, +): string { + return JSON.stringify( + AutocompleteResponse$outboundSchema.parse(autocompleteResponse), + ); +} + +export function autocompleteResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AutocompleteResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AutocompleteResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/cancelactivity.ts b/src/sdk/models/operations/cancelactivity.ts new file mode 100644 index 00000000..7ea4c9f7 --- /dev/null +++ b/src/sdk/models/operations/cancelactivity.ts @@ -0,0 +1,405 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CancelActivityGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type CancelActivityRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The UUID of the activity to cancel. + */ + activityId: string; +}; + +export type CancelActivityResponse = { + /** + * 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 CancelActivityGlobals$inboundSchema: z.ZodType< + CancelActivityGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type CancelActivityGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const CancelActivityGlobals$outboundSchema: z.ZodType< + CancelActivityGlobals$Outbound, + z.ZodTypeDef, + CancelActivityGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CancelActivityGlobals$ { + /** @deprecated use `CancelActivityGlobals$inboundSchema` instead. */ + export const inboundSchema = CancelActivityGlobals$inboundSchema; + /** @deprecated use `CancelActivityGlobals$outboundSchema` instead. */ + export const outboundSchema = CancelActivityGlobals$outboundSchema; + /** @deprecated use `CancelActivityGlobals$Outbound` instead. */ + export type Outbound = CancelActivityGlobals$Outbound; +} + +export function cancelActivityGlobalsToJSON( + cancelActivityGlobals: CancelActivityGlobals, +): string { + return JSON.stringify( + CancelActivityGlobals$outboundSchema.parse(cancelActivityGlobals), + ); +} + +export function cancelActivityGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CancelActivityGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CancelActivityGlobals' from JSON`, + ); +} + +/** @internal */ +export const CancelActivityRequest$inboundSchema: z.ZodType< + CancelActivityRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + activityId: z.string(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type CancelActivityRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + activityId: string; +}; + +/** @internal */ +export const CancelActivityRequest$outboundSchema: z.ZodType< + CancelActivityRequest$Outbound, + z.ZodTypeDef, + CancelActivityRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + activityId: z.string(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CancelActivityRequest$ { + /** @deprecated use `CancelActivityRequest$inboundSchema` instead. */ + export const inboundSchema = CancelActivityRequest$inboundSchema; + /** @deprecated use `CancelActivityRequest$outboundSchema` instead. */ + export const outboundSchema = CancelActivityRequest$outboundSchema; + /** @deprecated use `CancelActivityRequest$Outbound` instead. */ + export type Outbound = CancelActivityRequest$Outbound; +} + +export function cancelActivityRequestToJSON( + cancelActivityRequest: CancelActivityRequest, +): string { + return JSON.stringify( + CancelActivityRequest$outboundSchema.parse(cancelActivityRequest), + ); +} + +export function cancelActivityRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CancelActivityRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CancelActivityRequest' from JSON`, + ); +} + +/** @internal */ +export const CancelActivityResponse$inboundSchema: z.ZodType< + CancelActivityResponse, + 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 CancelActivityResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const CancelActivityResponse$outboundSchema: z.ZodType< + CancelActivityResponse$Outbound, + z.ZodTypeDef, + CancelActivityResponse +> = 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 CancelActivityResponse$ { + /** @deprecated use `CancelActivityResponse$inboundSchema` instead. */ + export const inboundSchema = CancelActivityResponse$inboundSchema; + /** @deprecated use `CancelActivityResponse$outboundSchema` instead. */ + export const outboundSchema = CancelActivityResponse$outboundSchema; + /** @deprecated use `CancelActivityResponse$Outbound` instead. */ + export type Outbound = CancelActivityResponse$Outbound; +} + +export function cancelActivityResponseToJSON( + cancelActivityResponse: CancelActivityResponse, +): string { + return JSON.stringify( + CancelActivityResponse$outboundSchema.parse(cancelActivityResponse), + ); +} + +export function cancelActivityResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CancelActivityResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CancelActivityResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/cancelgrab.ts b/src/sdk/models/operations/cancelgrab.ts new file mode 100644 index 00000000..f4f9353a --- /dev/null +++ b/src/sdk/models/operations/cancelgrab.ts @@ -0,0 +1,405 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CancelGrabGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type CancelGrabRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The ID of the operation. + */ + operationId: string; +}; + +export type CancelGrabResponse = { + /** + * 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 CancelGrabGlobals$inboundSchema: z.ZodType< + CancelGrabGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type CancelGrabGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const CancelGrabGlobals$outboundSchema: z.ZodType< + CancelGrabGlobals$Outbound, + z.ZodTypeDef, + CancelGrabGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CancelGrabGlobals$ { + /** @deprecated use `CancelGrabGlobals$inboundSchema` instead. */ + export const inboundSchema = CancelGrabGlobals$inboundSchema; + /** @deprecated use `CancelGrabGlobals$outboundSchema` instead. */ + export const outboundSchema = CancelGrabGlobals$outboundSchema; + /** @deprecated use `CancelGrabGlobals$Outbound` instead. */ + export type Outbound = CancelGrabGlobals$Outbound; +} + +export function cancelGrabGlobalsToJSON( + cancelGrabGlobals: CancelGrabGlobals, +): string { + return JSON.stringify( + CancelGrabGlobals$outboundSchema.parse(cancelGrabGlobals), + ); +} + +export function cancelGrabGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CancelGrabGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CancelGrabGlobals' from JSON`, + ); +} + +/** @internal */ +export const CancelGrabRequest$inboundSchema: z.ZodType< + CancelGrabRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + operationId: z.string(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type CancelGrabRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + operationId: string; +}; + +/** @internal */ +export const CancelGrabRequest$outboundSchema: z.ZodType< + CancelGrabRequest$Outbound, + z.ZodTypeDef, + CancelGrabRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + operationId: z.string(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CancelGrabRequest$ { + /** @deprecated use `CancelGrabRequest$inboundSchema` instead. */ + export const inboundSchema = CancelGrabRequest$inboundSchema; + /** @deprecated use `CancelGrabRequest$outboundSchema` instead. */ + export const outboundSchema = CancelGrabRequest$outboundSchema; + /** @deprecated use `CancelGrabRequest$Outbound` instead. */ + export type Outbound = CancelGrabRequest$Outbound; +} + +export function cancelGrabRequestToJSON( + cancelGrabRequest: CancelGrabRequest, +): string { + return JSON.stringify( + CancelGrabRequest$outboundSchema.parse(cancelGrabRequest), + ); +} + +export function cancelGrabRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CancelGrabRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CancelGrabRequest' from JSON`, + ); +} + +/** @internal */ +export const CancelGrabResponse$inboundSchema: z.ZodType< + CancelGrabResponse, + 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 CancelGrabResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const CancelGrabResponse$outboundSchema: z.ZodType< + CancelGrabResponse$Outbound, + z.ZodTypeDef, + CancelGrabResponse +> = 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 CancelGrabResponse$ { + /** @deprecated use `CancelGrabResponse$inboundSchema` instead. */ + export const inboundSchema = CancelGrabResponse$inboundSchema; + /** @deprecated use `CancelGrabResponse$outboundSchema` instead. */ + export const outboundSchema = CancelGrabResponse$outboundSchema; + /** @deprecated use `CancelGrabResponse$Outbound` instead. */ + export type Outbound = CancelGrabResponse$Outbound; +} + +export function cancelGrabResponseToJSON( + cancelGrabResponse: CancelGrabResponse, +): string { + return JSON.stringify( + CancelGrabResponse$outboundSchema.parse(cancelGrabResponse), + ); +} + +export function cancelGrabResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CancelGrabResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CancelGrabResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/cancelrefresh.ts b/src/sdk/models/operations/cancelrefresh.ts new file mode 100644 index 00000000..3c721140 --- /dev/null +++ b/src/sdk/models/operations/cancelrefresh.ts @@ -0,0 +1,405 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CancelRefreshGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type CancelRefreshRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * Section identifier + */ + sectionId: number; +}; + +export type CancelRefreshResponse = { + /** + * 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 CancelRefreshGlobals$inboundSchema: z.ZodType< + CancelRefreshGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type CancelRefreshGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const CancelRefreshGlobals$outboundSchema: z.ZodType< + CancelRefreshGlobals$Outbound, + z.ZodTypeDef, + CancelRefreshGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CancelRefreshGlobals$ { + /** @deprecated use `CancelRefreshGlobals$inboundSchema` instead. */ + export const inboundSchema = CancelRefreshGlobals$inboundSchema; + /** @deprecated use `CancelRefreshGlobals$outboundSchema` instead. */ + export const outboundSchema = CancelRefreshGlobals$outboundSchema; + /** @deprecated use `CancelRefreshGlobals$Outbound` instead. */ + export type Outbound = CancelRefreshGlobals$Outbound; +} + +export function cancelRefreshGlobalsToJSON( + cancelRefreshGlobals: CancelRefreshGlobals, +): string { + return JSON.stringify( + CancelRefreshGlobals$outboundSchema.parse(cancelRefreshGlobals), + ); +} + +export function cancelRefreshGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CancelRefreshGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CancelRefreshGlobals' from JSON`, + ); +} + +/** @internal */ +export const CancelRefreshRequest$inboundSchema: z.ZodType< + CancelRefreshRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + sectionId: z.number().int(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type CancelRefreshRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + sectionId: number; +}; + +/** @internal */ +export const CancelRefreshRequest$outboundSchema: z.ZodType< + CancelRefreshRequest$Outbound, + z.ZodTypeDef, + CancelRefreshRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + sectionId: z.number().int(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CancelRefreshRequest$ { + /** @deprecated use `CancelRefreshRequest$inboundSchema` instead. */ + export const inboundSchema = CancelRefreshRequest$inboundSchema; + /** @deprecated use `CancelRefreshRequest$outboundSchema` instead. */ + export const outboundSchema = CancelRefreshRequest$outboundSchema; + /** @deprecated use `CancelRefreshRequest$Outbound` instead. */ + export type Outbound = CancelRefreshRequest$Outbound; +} + +export function cancelRefreshRequestToJSON( + cancelRefreshRequest: CancelRefreshRequest, +): string { + return JSON.stringify( + CancelRefreshRequest$outboundSchema.parse(cancelRefreshRequest), + ); +} + +export function cancelRefreshRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CancelRefreshRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CancelRefreshRequest' from JSON`, + ); +} + +/** @internal */ +export const CancelRefreshResponse$inboundSchema: z.ZodType< + CancelRefreshResponse, + 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 CancelRefreshResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const CancelRefreshResponse$outboundSchema: z.ZodType< + CancelRefreshResponse$Outbound, + z.ZodTypeDef, + CancelRefreshResponse +> = 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 CancelRefreshResponse$ { + /** @deprecated use `CancelRefreshResponse$inboundSchema` instead. */ + export const inboundSchema = CancelRefreshResponse$inboundSchema; + /** @deprecated use `CancelRefreshResponse$outboundSchema` instead. */ + export const outboundSchema = CancelRefreshResponse$outboundSchema; + /** @deprecated use `CancelRefreshResponse$Outbound` instead. */ + export type Outbound = CancelRefreshResponse$Outbound; +} + +export function cancelRefreshResponseToJSON( + cancelRefreshResponse: CancelRefreshResponse, +): string { + return JSON.stringify( + CancelRefreshResponse$outboundSchema.parse(cancelRefreshResponse), + ); +} + +export function cancelRefreshResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CancelRefreshResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CancelRefreshResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/cancelserveractivities.ts b/src/sdk/models/operations/cancelserveractivities.ts deleted file mode 100644 index f8bf94d1..00000000 --- a/src/sdk/models/operations/cancelserveractivities.ts +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type CancelServerActivitiesRequest = { - /** - * 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; -}; - -/** @internal */ -export const CancelServerActivitiesRequest$inboundSchema: z.ZodType< - CancelServerActivitiesRequest, - z.ZodTypeDef, - unknown -> = z.object({ - activityUUID: z.string(), -}); - -/** @internal */ -export type CancelServerActivitiesRequest$Outbound = { - activityUUID: string; -}; - -/** @internal */ -export const CancelServerActivitiesRequest$outboundSchema: z.ZodType< - CancelServerActivitiesRequest$Outbound, - z.ZodTypeDef, - CancelServerActivitiesRequest -> = z.object({ - activityUUID: 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 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; -} - -export function cancelServerActivitiesRequestToJSON( - cancelServerActivitiesRequest: CancelServerActivitiesRequest, -): string { - return JSON.stringify( - CancelServerActivitiesRequest$outboundSchema.parse( - cancelServerActivitiesRequest, - ), - ); -} - -export function cancelServerActivitiesRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CancelServerActivitiesRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CancelServerActivitiesRequest' from JSON`, - ); -} - -/** @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", - }); -}); - -/** @internal */ -export type CancelServerActivitiesResponse$Outbound = { - 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", - }); -}); - -/** - * @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; -} - -export function cancelServerActivitiesResponseToJSON( - cancelServerActivitiesResponse: CancelServerActivitiesResponse, -): string { - return JSON.stringify( - CancelServerActivitiesResponse$outboundSchema.parse( - cancelServerActivitiesResponse, - ), - ); -} - -export function cancelServerActivitiesResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CancelServerActivitiesResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CancelServerActivitiesResponse' from JSON`, - ); -} diff --git a/src/sdk/models/operations/checkforupdates.ts b/src/sdk/models/operations/checkforupdates.ts deleted file mode 100644 index 2167b26f..00000000 --- a/src/sdk/models/operations/checkforupdates.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Indicate that you want to start download any updates found. - */ -export enum Download { - Zero = 0, - One = 1, -} - -export type CheckForUpdatesRequest = { - /** - * 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; -}; - -/** @internal */ -export const Download$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(Download); - -/** @internal */ -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; -} - -/** @internal */ -export const CheckForUpdatesRequest$inboundSchema: z.ZodType< - CheckForUpdatesRequest, - z.ZodTypeDef, - unknown -> = z.object({ - download: Download$inboundSchema.optional(), -}); - -/** @internal */ -export type CheckForUpdatesRequest$Outbound = { - download?: number | undefined; -}; - -/** @internal */ -export const CheckForUpdatesRequest$outboundSchema: z.ZodType< - CheckForUpdatesRequest$Outbound, - z.ZodTypeDef, - CheckForUpdatesRequest -> = z.object({ - download: Download$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 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; -} - -export function checkForUpdatesRequestToJSON( - checkForUpdatesRequest: CheckForUpdatesRequest, -): string { - return JSON.stringify( - CheckForUpdatesRequest$outboundSchema.parse(checkForUpdatesRequest), - ); -} - -export function checkForUpdatesRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CheckForUpdatesRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CheckForUpdatesRequest' from JSON`, - ); -} - -/** @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", - }); -}); - -/** @internal */ -export type CheckForUpdatesResponse$Outbound = { - 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", - }); -}); - -/** - * @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; -} - -export function checkForUpdatesResponseToJSON( - checkForUpdatesResponse: CheckForUpdatesResponse, -): string { - return JSON.stringify( - CheckForUpdatesResponse$outboundSchema.parse(checkForUpdatesResponse), - ); -} - -export function checkForUpdatesResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CheckForUpdatesResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CheckForUpdatesResponse' from JSON`, - ); -} diff --git a/src/sdk/models/operations/checkupdates.ts b/src/sdk/models/operations/checkupdates.ts new file mode 100644 index 00000000..93aa81fa --- /dev/null +++ b/src/sdk/models/operations/checkupdates.ts @@ -0,0 +1,406 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type CheckUpdatesGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type CheckUpdatesRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * Indicate that you want to start download any updates found. + */ + download?: shared.BoolInt | undefined; +}; + +export type CheckUpdatesResponse = { + /** + * 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 CheckUpdatesGlobals$inboundSchema: z.ZodType< + CheckUpdatesGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type CheckUpdatesGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const CheckUpdatesGlobals$outboundSchema: z.ZodType< + CheckUpdatesGlobals$Outbound, + z.ZodTypeDef, + CheckUpdatesGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CheckUpdatesGlobals$ { + /** @deprecated use `CheckUpdatesGlobals$inboundSchema` instead. */ + export const inboundSchema = CheckUpdatesGlobals$inboundSchema; + /** @deprecated use `CheckUpdatesGlobals$outboundSchema` instead. */ + export const outboundSchema = CheckUpdatesGlobals$outboundSchema; + /** @deprecated use `CheckUpdatesGlobals$Outbound` instead. */ + export type Outbound = CheckUpdatesGlobals$Outbound; +} + +export function checkUpdatesGlobalsToJSON( + checkUpdatesGlobals: CheckUpdatesGlobals, +): string { + return JSON.stringify( + CheckUpdatesGlobals$outboundSchema.parse(checkUpdatesGlobals), + ); +} + +export function checkUpdatesGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CheckUpdatesGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CheckUpdatesGlobals' from JSON`, + ); +} + +/** @internal */ +export const CheckUpdatesRequest$inboundSchema: z.ZodType< + CheckUpdatesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + download: shared.BoolInt$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type CheckUpdatesRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + download?: number | undefined; +}; + +/** @internal */ +export const CheckUpdatesRequest$outboundSchema: z.ZodType< + CheckUpdatesRequest$Outbound, + z.ZodTypeDef, + CheckUpdatesRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + download: shared.BoolInt$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CheckUpdatesRequest$ { + /** @deprecated use `CheckUpdatesRequest$inboundSchema` instead. */ + export const inboundSchema = CheckUpdatesRequest$inboundSchema; + /** @deprecated use `CheckUpdatesRequest$outboundSchema` instead. */ + export const outboundSchema = CheckUpdatesRequest$outboundSchema; + /** @deprecated use `CheckUpdatesRequest$Outbound` instead. */ + export type Outbound = CheckUpdatesRequest$Outbound; +} + +export function checkUpdatesRequestToJSON( + checkUpdatesRequest: CheckUpdatesRequest, +): string { + return JSON.stringify( + CheckUpdatesRequest$outboundSchema.parse(checkUpdatesRequest), + ); +} + +export function checkUpdatesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CheckUpdatesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CheckUpdatesRequest' from JSON`, + ); +} + +/** @internal */ +export const CheckUpdatesResponse$inboundSchema: z.ZodType< + CheckUpdatesResponse, + 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 CheckUpdatesResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const CheckUpdatesResponse$outboundSchema: z.ZodType< + CheckUpdatesResponse$Outbound, + z.ZodTypeDef, + CheckUpdatesResponse +> = 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 CheckUpdatesResponse$ { + /** @deprecated use `CheckUpdatesResponse$inboundSchema` instead. */ + export const inboundSchema = CheckUpdatesResponse$inboundSchema; + /** @deprecated use `CheckUpdatesResponse$outboundSchema` instead. */ + export const outboundSchema = CheckUpdatesResponse$outboundSchema; + /** @deprecated use `CheckUpdatesResponse$Outbound` instead. */ + export type Outbound = CheckUpdatesResponse$Outbound; +} + +export function checkUpdatesResponseToJSON( + checkUpdatesResponse: CheckUpdatesResponse, +): string { + return JSON.stringify( + CheckUpdatesResponse$outboundSchema.parse(checkUpdatesResponse), + ); +} + +export function checkUpdatesResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CheckUpdatesResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CheckUpdatesResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/cleanbundles.ts b/src/sdk/models/operations/cleanbundles.ts new file mode 100644 index 00000000..23518c7b --- /dev/null +++ b/src/sdk/models/operations/cleanbundles.ts @@ -0,0 +1,98 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CleanBundlesResponse = { + /** + * 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 CleanBundlesResponse$inboundSchema: z.ZodType< + CleanBundlesResponse, + 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 CleanBundlesResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const CleanBundlesResponse$outboundSchema: z.ZodType< + CleanBundlesResponse$Outbound, + z.ZodTypeDef, + CleanBundlesResponse +> = 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 CleanBundlesResponse$ { + /** @deprecated use `CleanBundlesResponse$inboundSchema` instead. */ + export const inboundSchema = CleanBundlesResponse$inboundSchema; + /** @deprecated use `CleanBundlesResponse$outboundSchema` instead. */ + export const outboundSchema = CleanBundlesResponse$outboundSchema; + /** @deprecated use `CleanBundlesResponse$Outbound` instead. */ + export type Outbound = CleanBundlesResponse$Outbound; +} + +export function cleanBundlesResponseToJSON( + cleanBundlesResponse: CleanBundlesResponse, +): string { + return JSON.stringify( + CleanBundlesResponse$outboundSchema.parse(cleanBundlesResponse), + ); +} + +export function cleanBundlesResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CleanBundlesResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CleanBundlesResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/clearplaylistcontents.ts b/src/sdk/models/operations/clearplaylistcontents.ts deleted file mode 100644 index ee12e5ef..00000000 --- a/src/sdk/models/operations/clearplaylistcontents.ts +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ClearPlaylistContentsRequest = { - /** - * 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; -}; - -/** @internal */ -export const ClearPlaylistContentsRequest$inboundSchema: z.ZodType< - ClearPlaylistContentsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - playlistID: z.number(), -}); - -/** @internal */ -export type ClearPlaylistContentsRequest$Outbound = { - playlistID: number; -}; - -/** @internal */ -export const ClearPlaylistContentsRequest$outboundSchema: z.ZodType< - ClearPlaylistContentsRequest$Outbound, - z.ZodTypeDef, - ClearPlaylistContentsRequest -> = z.object({ - playlistID: z.number(), -}); - -/** - * @internal - * @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; -} - -export function clearPlaylistContentsRequestToJSON( - clearPlaylistContentsRequest: ClearPlaylistContentsRequest, -): string { - return JSON.stringify( - ClearPlaylistContentsRequest$outboundSchema.parse( - clearPlaylistContentsRequest, - ), - ); -} - -export function clearPlaylistContentsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ClearPlaylistContentsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ClearPlaylistContentsRequest' from JSON`, - ); -} - -/** @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", - }); -}); - -/** @internal */ -export type ClearPlaylistContentsResponse$Outbound = { - 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", - }); -}); - -/** - * @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; -} - -export function clearPlaylistContentsResponseToJSON( - clearPlaylistContentsResponse: ClearPlaylistContentsResponse, -): string { - return JSON.stringify( - ClearPlaylistContentsResponse$outboundSchema.parse( - clearPlaylistContentsResponse, - ), - ); -} - -export function clearPlaylistContentsResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ClearPlaylistContentsResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ClearPlaylistContentsResponse' from JSON`, - ); -} diff --git a/src/sdk/models/operations/clearplaylistitems.ts b/src/sdk/models/operations/clearplaylistitems.ts new file mode 100644 index 00000000..e7bcf667 --- /dev/null +++ b/src/sdk/models/operations/clearplaylistitems.ts @@ -0,0 +1,421 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type ClearPlaylistItemsGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type ClearPlaylistItemsRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The ID of the playlist + */ + playlistId: number; +}; + +export type ClearPlaylistItemsResponse = { + /** + * 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; + /** + * OK + */ + mediaContainerWithPlaylistMetadata?: + | shared.MediaContainerWithPlaylistMetadata + | undefined; +}; + +/** @internal */ +export const ClearPlaylistItemsGlobals$inboundSchema: z.ZodType< + ClearPlaylistItemsGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type ClearPlaylistItemsGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const ClearPlaylistItemsGlobals$outboundSchema: z.ZodType< + ClearPlaylistItemsGlobals$Outbound, + z.ZodTypeDef, + ClearPlaylistItemsGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ClearPlaylistItemsGlobals$ { + /** @deprecated use `ClearPlaylistItemsGlobals$inboundSchema` instead. */ + export const inboundSchema = ClearPlaylistItemsGlobals$inboundSchema; + /** @deprecated use `ClearPlaylistItemsGlobals$outboundSchema` instead. */ + export const outboundSchema = ClearPlaylistItemsGlobals$outboundSchema; + /** @deprecated use `ClearPlaylistItemsGlobals$Outbound` instead. */ + export type Outbound = ClearPlaylistItemsGlobals$Outbound; +} + +export function clearPlaylistItemsGlobalsToJSON( + clearPlaylistItemsGlobals: ClearPlaylistItemsGlobals, +): string { + return JSON.stringify( + ClearPlaylistItemsGlobals$outboundSchema.parse(clearPlaylistItemsGlobals), + ); +} + +export function clearPlaylistItemsGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ClearPlaylistItemsGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ClearPlaylistItemsGlobals' from JSON`, + ); +} + +/** @internal */ +export const ClearPlaylistItemsRequest$inboundSchema: z.ZodType< + ClearPlaylistItemsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + playlistId: z.number().int(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type ClearPlaylistItemsRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + playlistId: number; +}; + +/** @internal */ +export const ClearPlaylistItemsRequest$outboundSchema: z.ZodType< + ClearPlaylistItemsRequest$Outbound, + z.ZodTypeDef, + ClearPlaylistItemsRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + playlistId: z.number().int(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ClearPlaylistItemsRequest$ { + /** @deprecated use `ClearPlaylistItemsRequest$inboundSchema` instead. */ + export const inboundSchema = ClearPlaylistItemsRequest$inboundSchema; + /** @deprecated use `ClearPlaylistItemsRequest$outboundSchema` instead. */ + export const outboundSchema = ClearPlaylistItemsRequest$outboundSchema; + /** @deprecated use `ClearPlaylistItemsRequest$Outbound` instead. */ + export type Outbound = ClearPlaylistItemsRequest$Outbound; +} + +export function clearPlaylistItemsRequestToJSON( + clearPlaylistItemsRequest: ClearPlaylistItemsRequest, +): string { + return JSON.stringify( + ClearPlaylistItemsRequest$outboundSchema.parse(clearPlaylistItemsRequest), + ); +} + +export function clearPlaylistItemsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ClearPlaylistItemsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ClearPlaylistItemsRequest' from JSON`, + ); +} + +/** @internal */ +export const ClearPlaylistItemsResponse$inboundSchema: z.ZodType< + ClearPlaylistItemsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + MediaContainerWithPlaylistMetadata: shared + .MediaContainerWithPlaylistMetadata$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "MediaContainerWithPlaylistMetadata": "mediaContainerWithPlaylistMetadata", + }); +}); + +/** @internal */ +export type ClearPlaylistItemsResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + MediaContainerWithPlaylistMetadata?: + | shared.MediaContainerWithPlaylistMetadata$Outbound + | undefined; +}; + +/** @internal */ +export const ClearPlaylistItemsResponse$outboundSchema: z.ZodType< + ClearPlaylistItemsResponse$Outbound, + z.ZodTypeDef, + ClearPlaylistItemsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + mediaContainerWithPlaylistMetadata: shared + .MediaContainerWithPlaylistMetadata$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + mediaContainerWithPlaylistMetadata: "MediaContainerWithPlaylistMetadata", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ClearPlaylistItemsResponse$ { + /** @deprecated use `ClearPlaylistItemsResponse$inboundSchema` instead. */ + export const inboundSchema = ClearPlaylistItemsResponse$inboundSchema; + /** @deprecated use `ClearPlaylistItemsResponse$outboundSchema` instead. */ + export const outboundSchema = ClearPlaylistItemsResponse$outboundSchema; + /** @deprecated use `ClearPlaylistItemsResponse$Outbound` instead. */ + export type Outbound = ClearPlaylistItemsResponse$Outbound; +} + +export function clearPlaylistItemsResponseToJSON( + clearPlaylistItemsResponse: ClearPlaylistItemsResponse, +): string { + return JSON.stringify( + ClearPlaylistItemsResponse$outboundSchema.parse(clearPlaylistItemsResponse), + ); +} + +export function clearPlaylistItemsResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ClearPlaylistItemsResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ClearPlaylistItemsResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/clearplayqueue.ts b/src/sdk/models/operations/clearplayqueue.ts new file mode 100644 index 00000000..9fcc1016 --- /dev/null +++ b/src/sdk/models/operations/clearplayqueue.ts @@ -0,0 +1,421 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type ClearPlayQueueGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type ClearPlayQueueRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The ID of the play queue. + */ + playQueueId: number; +}; + +export type ClearPlayQueueResponse = { + /** + * 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; + /** + * OK + */ + mediaContainerWithPlaylistMetadata?: + | shared.MediaContainerWithPlaylistMetadata + | undefined; +}; + +/** @internal */ +export const ClearPlayQueueGlobals$inboundSchema: z.ZodType< + ClearPlayQueueGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type ClearPlayQueueGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const ClearPlayQueueGlobals$outboundSchema: z.ZodType< + ClearPlayQueueGlobals$Outbound, + z.ZodTypeDef, + ClearPlayQueueGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ClearPlayQueueGlobals$ { + /** @deprecated use `ClearPlayQueueGlobals$inboundSchema` instead. */ + export const inboundSchema = ClearPlayQueueGlobals$inboundSchema; + /** @deprecated use `ClearPlayQueueGlobals$outboundSchema` instead. */ + export const outboundSchema = ClearPlayQueueGlobals$outboundSchema; + /** @deprecated use `ClearPlayQueueGlobals$Outbound` instead. */ + export type Outbound = ClearPlayQueueGlobals$Outbound; +} + +export function clearPlayQueueGlobalsToJSON( + clearPlayQueueGlobals: ClearPlayQueueGlobals, +): string { + return JSON.stringify( + ClearPlayQueueGlobals$outboundSchema.parse(clearPlayQueueGlobals), + ); +} + +export function clearPlayQueueGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ClearPlayQueueGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ClearPlayQueueGlobals' from JSON`, + ); +} + +/** @internal */ +export const ClearPlayQueueRequest$inboundSchema: z.ZodType< + ClearPlayQueueRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + playQueueId: z.number().int(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type ClearPlayQueueRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + playQueueId: number; +}; + +/** @internal */ +export const ClearPlayQueueRequest$outboundSchema: z.ZodType< + ClearPlayQueueRequest$Outbound, + z.ZodTypeDef, + ClearPlayQueueRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + playQueueId: z.number().int(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ClearPlayQueueRequest$ { + /** @deprecated use `ClearPlayQueueRequest$inboundSchema` instead. */ + export const inboundSchema = ClearPlayQueueRequest$inboundSchema; + /** @deprecated use `ClearPlayQueueRequest$outboundSchema` instead. */ + export const outboundSchema = ClearPlayQueueRequest$outboundSchema; + /** @deprecated use `ClearPlayQueueRequest$Outbound` instead. */ + export type Outbound = ClearPlayQueueRequest$Outbound; +} + +export function clearPlayQueueRequestToJSON( + clearPlayQueueRequest: ClearPlayQueueRequest, +): string { + return JSON.stringify( + ClearPlayQueueRequest$outboundSchema.parse(clearPlayQueueRequest), + ); +} + +export function clearPlayQueueRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ClearPlayQueueRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ClearPlayQueueRequest' from JSON`, + ); +} + +/** @internal */ +export const ClearPlayQueueResponse$inboundSchema: z.ZodType< + ClearPlayQueueResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + MediaContainerWithPlaylistMetadata: shared + .MediaContainerWithPlaylistMetadata$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "MediaContainerWithPlaylistMetadata": "mediaContainerWithPlaylistMetadata", + }); +}); + +/** @internal */ +export type ClearPlayQueueResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + MediaContainerWithPlaylistMetadata?: + | shared.MediaContainerWithPlaylistMetadata$Outbound + | undefined; +}; + +/** @internal */ +export const ClearPlayQueueResponse$outboundSchema: z.ZodType< + ClearPlayQueueResponse$Outbound, + z.ZodTypeDef, + ClearPlayQueueResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + mediaContainerWithPlaylistMetadata: shared + .MediaContainerWithPlaylistMetadata$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + mediaContainerWithPlaylistMetadata: "MediaContainerWithPlaylistMetadata", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ClearPlayQueueResponse$ { + /** @deprecated use `ClearPlayQueueResponse$inboundSchema` instead. */ + export const inboundSchema = ClearPlayQueueResponse$inboundSchema; + /** @deprecated use `ClearPlayQueueResponse$outboundSchema` instead. */ + export const outboundSchema = ClearPlayQueueResponse$outboundSchema; + /** @deprecated use `ClearPlayQueueResponse$Outbound` instead. */ + export type Outbound = ClearPlayQueueResponse$Outbound; +} + +export function clearPlayQueueResponseToJSON( + clearPlayQueueResponse: ClearPlayQueueResponse, +): string { + return JSON.stringify( + ClearPlayQueueResponse$outboundSchema.parse(clearPlayQueueResponse), + ); +} + +export function clearPlayQueueResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ClearPlayQueueResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ClearPlayQueueResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/computechannelmap.ts b/src/sdk/models/operations/computechannelmap.ts new file mode 100644 index 00000000..7064c6d3 --- /dev/null +++ b/src/sdk/models/operations/computechannelmap.ts @@ -0,0 +1,681 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ComputeChannelMapGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type ComputeChannelMapRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The URI describing the device + */ + device: string; + /** + * The URI describing the lineup + */ + lineup: string; +}; + +export type ComputeChannelMapChannelMapping = { + channelKey?: string | undefined; + /** + * The channel description on the device + */ + deviceIdentifier?: string | undefined; + favorite?: boolean | undefined; + /** + * The channel identifier in the lineup + */ + lineupIdentifier?: string | undefined; +}; + +/** + * `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * + * @remarks + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +export type ComputeChannelMapMediaContainer = { + identifier?: string | undefined; + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + * + * @remarks + */ + offset?: number | undefined; + size?: number | undefined; + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + * + * @remarks + */ + totalSize?: number | undefined; + channelMapping?: Array | undefined; +}; + +/** + * OK + */ +export type ComputeChannelMapResponseBody = { + mediaContainer?: ComputeChannelMapMediaContainer | undefined; +}; + +export type ComputeChannelMapResponse = { + /** + * 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; + /** + * OK + */ + object?: ComputeChannelMapResponseBody | undefined; + headers: { [k: string]: Array }; +}; + +/** @internal */ +export const ComputeChannelMapGlobals$inboundSchema: z.ZodType< + ComputeChannelMapGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type ComputeChannelMapGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const ComputeChannelMapGlobals$outboundSchema: z.ZodType< + ComputeChannelMapGlobals$Outbound, + z.ZodTypeDef, + ComputeChannelMapGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ComputeChannelMapGlobals$ { + /** @deprecated use `ComputeChannelMapGlobals$inboundSchema` instead. */ + export const inboundSchema = ComputeChannelMapGlobals$inboundSchema; + /** @deprecated use `ComputeChannelMapGlobals$outboundSchema` instead. */ + export const outboundSchema = ComputeChannelMapGlobals$outboundSchema; + /** @deprecated use `ComputeChannelMapGlobals$Outbound` instead. */ + export type Outbound = ComputeChannelMapGlobals$Outbound; +} + +export function computeChannelMapGlobalsToJSON( + computeChannelMapGlobals: ComputeChannelMapGlobals, +): string { + return JSON.stringify( + ComputeChannelMapGlobals$outboundSchema.parse(computeChannelMapGlobals), + ); +} + +export function computeChannelMapGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ComputeChannelMapGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ComputeChannelMapGlobals' from JSON`, + ); +} + +/** @internal */ +export const ComputeChannelMapRequest$inboundSchema: z.ZodType< + ComputeChannelMapRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + device: z.string(), + lineup: z.string(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type ComputeChannelMapRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + device: string; + lineup: string; +}; + +/** @internal */ +export const ComputeChannelMapRequest$outboundSchema: z.ZodType< + ComputeChannelMapRequest$Outbound, + z.ZodTypeDef, + ComputeChannelMapRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + device: z.string(), + lineup: z.string(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ComputeChannelMapRequest$ { + /** @deprecated use `ComputeChannelMapRequest$inboundSchema` instead. */ + export const inboundSchema = ComputeChannelMapRequest$inboundSchema; + /** @deprecated use `ComputeChannelMapRequest$outboundSchema` instead. */ + export const outboundSchema = ComputeChannelMapRequest$outboundSchema; + /** @deprecated use `ComputeChannelMapRequest$Outbound` instead. */ + export type Outbound = ComputeChannelMapRequest$Outbound; +} + +export function computeChannelMapRequestToJSON( + computeChannelMapRequest: ComputeChannelMapRequest, +): string { + return JSON.stringify( + ComputeChannelMapRequest$outboundSchema.parse(computeChannelMapRequest), + ); +} + +export function computeChannelMapRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ComputeChannelMapRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ComputeChannelMapRequest' from JSON`, + ); +} + +/** @internal */ +export const ComputeChannelMapChannelMapping$inboundSchema: z.ZodType< + ComputeChannelMapChannelMapping, + z.ZodTypeDef, + unknown +> = z.object({ + channelKey: z.string().optional(), + deviceIdentifier: z.string().optional(), + favorite: z.boolean().optional(), + lineupIdentifier: z.string().optional(), +}); + +/** @internal */ +export type ComputeChannelMapChannelMapping$Outbound = { + channelKey?: string | undefined; + deviceIdentifier?: string | undefined; + favorite?: boolean | undefined; + lineupIdentifier?: string | undefined; +}; + +/** @internal */ +export const ComputeChannelMapChannelMapping$outboundSchema: z.ZodType< + ComputeChannelMapChannelMapping$Outbound, + z.ZodTypeDef, + ComputeChannelMapChannelMapping +> = z.object({ + channelKey: z.string().optional(), + deviceIdentifier: z.string().optional(), + favorite: z.boolean().optional(), + lineupIdentifier: 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 ComputeChannelMapChannelMapping$ { + /** @deprecated use `ComputeChannelMapChannelMapping$inboundSchema` instead. */ + export const inboundSchema = ComputeChannelMapChannelMapping$inboundSchema; + /** @deprecated use `ComputeChannelMapChannelMapping$outboundSchema` instead. */ + export const outboundSchema = ComputeChannelMapChannelMapping$outboundSchema; + /** @deprecated use `ComputeChannelMapChannelMapping$Outbound` instead. */ + export type Outbound = ComputeChannelMapChannelMapping$Outbound; +} + +export function computeChannelMapChannelMappingToJSON( + computeChannelMapChannelMapping: ComputeChannelMapChannelMapping, +): string { + return JSON.stringify( + ComputeChannelMapChannelMapping$outboundSchema.parse( + computeChannelMapChannelMapping, + ), + ); +} + +export function computeChannelMapChannelMappingFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ComputeChannelMapChannelMapping$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ComputeChannelMapChannelMapping' from JSON`, + ); +} + +/** @internal */ +export const ComputeChannelMapMediaContainer$inboundSchema: z.ZodType< + ComputeChannelMapMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + identifier: z.string().optional(), + offset: z.number().int().optional(), + size: z.number().int().optional(), + totalSize: z.number().int().optional(), + ChannelMapping: z.array( + z.lazy(() => ComputeChannelMapChannelMapping$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "ChannelMapping": "channelMapping", + }); +}); + +/** @internal */ +export type ComputeChannelMapMediaContainer$Outbound = { + identifier?: string | undefined; + offset?: number | undefined; + size?: number | undefined; + totalSize?: number | undefined; + ChannelMapping?: Array | undefined; +}; + +/** @internal */ +export const ComputeChannelMapMediaContainer$outboundSchema: z.ZodType< + ComputeChannelMapMediaContainer$Outbound, + z.ZodTypeDef, + ComputeChannelMapMediaContainer +> = z.object({ + identifier: z.string().optional(), + offset: z.number().int().optional(), + size: z.number().int().optional(), + totalSize: z.number().int().optional(), + channelMapping: z.array( + z.lazy(() => ComputeChannelMapChannelMapping$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + channelMapping: "ChannelMapping", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ComputeChannelMapMediaContainer$ { + /** @deprecated use `ComputeChannelMapMediaContainer$inboundSchema` instead. */ + export const inboundSchema = ComputeChannelMapMediaContainer$inboundSchema; + /** @deprecated use `ComputeChannelMapMediaContainer$outboundSchema` instead. */ + export const outboundSchema = ComputeChannelMapMediaContainer$outboundSchema; + /** @deprecated use `ComputeChannelMapMediaContainer$Outbound` instead. */ + export type Outbound = ComputeChannelMapMediaContainer$Outbound; +} + +export function computeChannelMapMediaContainerToJSON( + computeChannelMapMediaContainer: ComputeChannelMapMediaContainer, +): string { + return JSON.stringify( + ComputeChannelMapMediaContainer$outboundSchema.parse( + computeChannelMapMediaContainer, + ), + ); +} + +export function computeChannelMapMediaContainerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ComputeChannelMapMediaContainer$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ComputeChannelMapMediaContainer' from JSON`, + ); +} + +/** @internal */ +export const ComputeChannelMapResponseBody$inboundSchema: z.ZodType< + ComputeChannelMapResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => ComputeChannelMapMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); + +/** @internal */ +export type ComputeChannelMapResponseBody$Outbound = { + MediaContainer?: ComputeChannelMapMediaContainer$Outbound | undefined; +}; + +/** @internal */ +export const ComputeChannelMapResponseBody$outboundSchema: z.ZodType< + ComputeChannelMapResponseBody$Outbound, + z.ZodTypeDef, + ComputeChannelMapResponseBody +> = z.object({ + mediaContainer: z.lazy(() => ComputeChannelMapMediaContainer$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 ComputeChannelMapResponseBody$ { + /** @deprecated use `ComputeChannelMapResponseBody$inboundSchema` instead. */ + export const inboundSchema = ComputeChannelMapResponseBody$inboundSchema; + /** @deprecated use `ComputeChannelMapResponseBody$outboundSchema` instead. */ + export const outboundSchema = ComputeChannelMapResponseBody$outboundSchema; + /** @deprecated use `ComputeChannelMapResponseBody$Outbound` instead. */ + export type Outbound = ComputeChannelMapResponseBody$Outbound; +} + +export function computeChannelMapResponseBodyToJSON( + computeChannelMapResponseBody: ComputeChannelMapResponseBody, +): string { + return JSON.stringify( + ComputeChannelMapResponseBody$outboundSchema.parse( + computeChannelMapResponseBody, + ), + ); +} + +export function computeChannelMapResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ComputeChannelMapResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ComputeChannelMapResponseBody' from JSON`, + ); +} + +/** @internal */ +export const ComputeChannelMapResponse$inboundSchema: z.ZodType< + ComputeChannelMapResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => ComputeChannelMapResponseBody$inboundSchema).optional(), + Headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "Headers": "headers", + }); +}); + +/** @internal */ +export type ComputeChannelMapResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: ComputeChannelMapResponseBody$Outbound | undefined; + Headers: { [k: string]: Array }; +}; + +/** @internal */ +export const ComputeChannelMapResponse$outboundSchema: z.ZodType< + ComputeChannelMapResponse$Outbound, + z.ZodTypeDef, + ComputeChannelMapResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => ComputeChannelMapResponseBody$outboundSchema).optional(), + headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + 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 ComputeChannelMapResponse$ { + /** @deprecated use `ComputeChannelMapResponse$inboundSchema` instead. */ + export const inboundSchema = ComputeChannelMapResponse$inboundSchema; + /** @deprecated use `ComputeChannelMapResponse$outboundSchema` instead. */ + export const outboundSchema = ComputeChannelMapResponse$outboundSchema; + /** @deprecated use `ComputeChannelMapResponse$Outbound` instead. */ + export type Outbound = ComputeChannelMapResponse$Outbound; +} + +export function computeChannelMapResponseToJSON( + computeChannelMapResponse: ComputeChannelMapResponse, +): string { + return JSON.stringify( + ComputeChannelMapResponse$outboundSchema.parse(computeChannelMapResponse), + ); +} + +export function computeChannelMapResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ComputeChannelMapResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ComputeChannelMapResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/connectwebsocket.ts b/src/sdk/models/operations/connectwebsocket.ts new file mode 100644 index 00000000..54e87137 --- /dev/null +++ b/src/sdk/models/operations/connectwebsocket.ts @@ -0,0 +1,421 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ConnectWebSocketGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type ConnectWebSocketRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * By default, all events except logs are sent. A rich filtering mechanism is provided to allow clients to opt into or out of each event type using the `filters` parameter. For example: + * + * @remarks + * + * - `filters=-log`: All event types except logs (the default). + * - `filters=foo,bar`: Only the foo and bar event types. + * - `filters=`: All events types. + * - `filters=-foo,bar`: All event types except foo and bar. + */ + filter?: Array | undefined; +}; + +export type ConnectWebSocketResponse = { + /** + * 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; + /** + * OK + */ + responseStream?: ReadableStream | undefined; +}; + +/** @internal */ +export const ConnectWebSocketGlobals$inboundSchema: z.ZodType< + ConnectWebSocketGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type ConnectWebSocketGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const ConnectWebSocketGlobals$outboundSchema: z.ZodType< + ConnectWebSocketGlobals$Outbound, + z.ZodTypeDef, + ConnectWebSocketGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ConnectWebSocketGlobals$ { + /** @deprecated use `ConnectWebSocketGlobals$inboundSchema` instead. */ + export const inboundSchema = ConnectWebSocketGlobals$inboundSchema; + /** @deprecated use `ConnectWebSocketGlobals$outboundSchema` instead. */ + export const outboundSchema = ConnectWebSocketGlobals$outboundSchema; + /** @deprecated use `ConnectWebSocketGlobals$Outbound` instead. */ + export type Outbound = ConnectWebSocketGlobals$Outbound; +} + +export function connectWebSocketGlobalsToJSON( + connectWebSocketGlobals: ConnectWebSocketGlobals, +): string { + return JSON.stringify( + ConnectWebSocketGlobals$outboundSchema.parse(connectWebSocketGlobals), + ); +} + +export function connectWebSocketGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ConnectWebSocketGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ConnectWebSocketGlobals' from JSON`, + ); +} + +/** @internal */ +export const ConnectWebSocketRequest$inboundSchema: z.ZodType< + ConnectWebSocketRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + filter: z.array(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type ConnectWebSocketRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + filter?: Array | undefined; +}; + +/** @internal */ +export const ConnectWebSocketRequest$outboundSchema: z.ZodType< + ConnectWebSocketRequest$Outbound, + z.ZodTypeDef, + ConnectWebSocketRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + filter: z.array(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ConnectWebSocketRequest$ { + /** @deprecated use `ConnectWebSocketRequest$inboundSchema` instead. */ + export const inboundSchema = ConnectWebSocketRequest$inboundSchema; + /** @deprecated use `ConnectWebSocketRequest$outboundSchema` instead. */ + export const outboundSchema = ConnectWebSocketRequest$outboundSchema; + /** @deprecated use `ConnectWebSocketRequest$Outbound` instead. */ + export type Outbound = ConnectWebSocketRequest$Outbound; +} + +export function connectWebSocketRequestToJSON( + connectWebSocketRequest: ConnectWebSocketRequest, +): string { + return JSON.stringify( + ConnectWebSocketRequest$outboundSchema.parse(connectWebSocketRequest), + ); +} + +export function connectWebSocketRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ConnectWebSocketRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ConnectWebSocketRequest' from JSON`, + ); +} + +/** @internal */ +export const ConnectWebSocketResponse$inboundSchema: z.ZodType< + ConnectWebSocketResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + "response-stream": z.instanceof(ReadableStream).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "response-stream": "responseStream", + }); +}); + +/** @internal */ +export type ConnectWebSocketResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + "response-stream"?: ReadableStream | undefined; +}; + +/** @internal */ +export const ConnectWebSocketResponse$outboundSchema: z.ZodType< + ConnectWebSocketResponse$Outbound, + z.ZodTypeDef, + ConnectWebSocketResponse +> = 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(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + responseStream: "response-stream", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ConnectWebSocketResponse$ { + /** @deprecated use `ConnectWebSocketResponse$inboundSchema` instead. */ + export const inboundSchema = ConnectWebSocketResponse$inboundSchema; + /** @deprecated use `ConnectWebSocketResponse$outboundSchema` instead. */ + export const outboundSchema = ConnectWebSocketResponse$outboundSchema; + /** @deprecated use `ConnectWebSocketResponse$Outbound` instead. */ + export type Outbound = ConnectWebSocketResponse$Outbound; +} + +export function connectWebSocketResponseToJSON( + connectWebSocketResponse: ConnectWebSocketResponse, +): string { + return JSON.stringify( + ConnectWebSocketResponse$outboundSchema.parse(connectWebSocketResponse), + ); +} + +export function connectWebSocketResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ConnectWebSocketResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ConnectWebSocketResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/createcollection.ts b/src/sdk/models/operations/createcollection.ts new file mode 100644 index 00000000..47a4c679 --- /dev/null +++ b/src/sdk/models/operations/createcollection.ts @@ -0,0 +1,447 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type CreateCollectionGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type CreateCollectionRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The section where this collection will be created + */ + sectionId: string; + /** + * The title to filter by or assign + */ + title?: string | undefined; + /** + * Whether this is a smart collection/playlist + */ + smart?: boolean | undefined; + /** + * The URI for processing the smart collection. Required for a smart collection + */ + uri?: string | undefined; + /** + * The metadata type to filter by + */ + type?: number | undefined; +}; + +export type CreateCollectionResponse = { + /** + * 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; + /** + * OK + */ + mediaContainerWithMetadata?: shared.MediaContainerWithMetadata | undefined; +}; + +/** @internal */ +export const CreateCollectionGlobals$inboundSchema: z.ZodType< + CreateCollectionGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type CreateCollectionGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const CreateCollectionGlobals$outboundSchema: z.ZodType< + CreateCollectionGlobals$Outbound, + z.ZodTypeDef, + CreateCollectionGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateCollectionGlobals$ { + /** @deprecated use `CreateCollectionGlobals$inboundSchema` instead. */ + export const inboundSchema = CreateCollectionGlobals$inboundSchema; + /** @deprecated use `CreateCollectionGlobals$outboundSchema` instead. */ + export const outboundSchema = CreateCollectionGlobals$outboundSchema; + /** @deprecated use `CreateCollectionGlobals$Outbound` instead. */ + export type Outbound = CreateCollectionGlobals$Outbound; +} + +export function createCollectionGlobalsToJSON( + createCollectionGlobals: CreateCollectionGlobals, +): string { + return JSON.stringify( + CreateCollectionGlobals$outboundSchema.parse(createCollectionGlobals), + ); +} + +export function createCollectionGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateCollectionGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateCollectionGlobals' from JSON`, + ); +} + +/** @internal */ +export const CreateCollectionRequest$inboundSchema: z.ZodType< + CreateCollectionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + sectionId: z.string(), + title: z.string().optional(), + smart: z.boolean().optional(), + uri: z.string().optional(), + type: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type CreateCollectionRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + sectionId: string; + title?: string | undefined; + smart?: boolean | undefined; + uri?: string | undefined; + type?: number | undefined; +}; + +/** @internal */ +export const CreateCollectionRequest$outboundSchema: z.ZodType< + CreateCollectionRequest$Outbound, + z.ZodTypeDef, + CreateCollectionRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + sectionId: z.string(), + title: z.string().optional(), + smart: z.boolean().optional(), + uri: z.string().optional(), + type: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateCollectionRequest$ { + /** @deprecated use `CreateCollectionRequest$inboundSchema` instead. */ + export const inboundSchema = CreateCollectionRequest$inboundSchema; + /** @deprecated use `CreateCollectionRequest$outboundSchema` instead. */ + export const outboundSchema = CreateCollectionRequest$outboundSchema; + /** @deprecated use `CreateCollectionRequest$Outbound` instead. */ + export type Outbound = CreateCollectionRequest$Outbound; +} + +export function createCollectionRequestToJSON( + createCollectionRequest: CreateCollectionRequest, +): string { + return JSON.stringify( + CreateCollectionRequest$outboundSchema.parse(createCollectionRequest), + ); +} + +export function createCollectionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateCollectionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateCollectionRequest' from JSON`, + ); +} + +/** @internal */ +export const CreateCollectionResponse$inboundSchema: z.ZodType< + CreateCollectionResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + MediaContainerWithMetadata: shared.MediaContainerWithMetadata$inboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "MediaContainerWithMetadata": "mediaContainerWithMetadata", + }); +}); + +/** @internal */ +export type CreateCollectionResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + MediaContainerWithMetadata?: + | shared.MediaContainerWithMetadata$Outbound + | undefined; +}; + +/** @internal */ +export const CreateCollectionResponse$outboundSchema: z.ZodType< + CreateCollectionResponse$Outbound, + z.ZodTypeDef, + CreateCollectionResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + mediaContainerWithMetadata: shared.MediaContainerWithMetadata$outboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + mediaContainerWithMetadata: "MediaContainerWithMetadata", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateCollectionResponse$ { + /** @deprecated use `CreateCollectionResponse$inboundSchema` instead. */ + export const inboundSchema = CreateCollectionResponse$inboundSchema; + /** @deprecated use `CreateCollectionResponse$outboundSchema` instead. */ + export const outboundSchema = CreateCollectionResponse$outboundSchema; + /** @deprecated use `CreateCollectionResponse$Outbound` instead. */ + export type Outbound = CreateCollectionResponse$Outbound; +} + +export function createCollectionResponseToJSON( + createCollectionResponse: CreateCollectionResponse, +): string { + return JSON.stringify( + CreateCollectionResponse$outboundSchema.parse(createCollectionResponse), + ); +} + +export function createCollectionResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateCollectionResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateCollectionResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/createcustomhub.ts b/src/sdk/models/operations/createcustomhub.ts new file mode 100644 index 00000000..19cd496e --- /dev/null +++ b/src/sdk/models/operations/createcustomhub.ts @@ -0,0 +1,434 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type CreateCustomHubGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type CreateCustomHubRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The section ID for the hubs to reorder + */ + sectionId: number; + /** + * The metadata item on which to base this hub. This must currently be a collection + */ + metadataItemId: number; + /** + * Whether this hub should be displayed in recommended + */ + promotedToRecommended?: shared.BoolInt | undefined; + /** + * Whether this hub should be displayed in admin's home + */ + promotedToOwnHome?: shared.BoolInt | undefined; + /** + * Whether this hub should be displayed in shared user's home + */ + promotedToSharedHome?: shared.BoolInt | undefined; +}; + +export type CreateCustomHubResponse = { + /** + * 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 CreateCustomHubGlobals$inboundSchema: z.ZodType< + CreateCustomHubGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type CreateCustomHubGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const CreateCustomHubGlobals$outboundSchema: z.ZodType< + CreateCustomHubGlobals$Outbound, + z.ZodTypeDef, + CreateCustomHubGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateCustomHubGlobals$ { + /** @deprecated use `CreateCustomHubGlobals$inboundSchema` instead. */ + export const inboundSchema = CreateCustomHubGlobals$inboundSchema; + /** @deprecated use `CreateCustomHubGlobals$outboundSchema` instead. */ + export const outboundSchema = CreateCustomHubGlobals$outboundSchema; + /** @deprecated use `CreateCustomHubGlobals$Outbound` instead. */ + export type Outbound = CreateCustomHubGlobals$Outbound; +} + +export function createCustomHubGlobalsToJSON( + createCustomHubGlobals: CreateCustomHubGlobals, +): string { + return JSON.stringify( + CreateCustomHubGlobals$outboundSchema.parse(createCustomHubGlobals), + ); +} + +export function createCustomHubGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateCustomHubGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateCustomHubGlobals' from JSON`, + ); +} + +/** @internal */ +export const CreateCustomHubRequest$inboundSchema: z.ZodType< + CreateCustomHubRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + sectionId: z.number().int(), + metadataItemId: z.number().int(), + promotedToRecommended: shared.BoolInt$inboundSchema.optional(), + promotedToOwnHome: shared.BoolInt$inboundSchema.optional(), + promotedToSharedHome: shared.BoolInt$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type CreateCustomHubRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + sectionId: number; + metadataItemId: number; + promotedToRecommended?: number | undefined; + promotedToOwnHome?: number | undefined; + promotedToSharedHome?: number | undefined; +}; + +/** @internal */ +export const CreateCustomHubRequest$outboundSchema: z.ZodType< + CreateCustomHubRequest$Outbound, + z.ZodTypeDef, + CreateCustomHubRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + sectionId: z.number().int(), + metadataItemId: z.number().int(), + promotedToRecommended: shared.BoolInt$outboundSchema.optional(), + promotedToOwnHome: shared.BoolInt$outboundSchema.optional(), + promotedToSharedHome: shared.BoolInt$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateCustomHubRequest$ { + /** @deprecated use `CreateCustomHubRequest$inboundSchema` instead. */ + export const inboundSchema = CreateCustomHubRequest$inboundSchema; + /** @deprecated use `CreateCustomHubRequest$outboundSchema` instead. */ + export const outboundSchema = CreateCustomHubRequest$outboundSchema; + /** @deprecated use `CreateCustomHubRequest$Outbound` instead. */ + export type Outbound = CreateCustomHubRequest$Outbound; +} + +export function createCustomHubRequestToJSON( + createCustomHubRequest: CreateCustomHubRequest, +): string { + return JSON.stringify( + CreateCustomHubRequest$outboundSchema.parse(createCustomHubRequest), + ); +} + +export function createCustomHubRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateCustomHubRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateCustomHubRequest' from JSON`, + ); +} + +/** @internal */ +export const CreateCustomHubResponse$inboundSchema: z.ZodType< + CreateCustomHubResponse, + 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 CreateCustomHubResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const CreateCustomHubResponse$outboundSchema: z.ZodType< + CreateCustomHubResponse$Outbound, + z.ZodTypeDef, + CreateCustomHubResponse +> = 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 CreateCustomHubResponse$ { + /** @deprecated use `CreateCustomHubResponse$inboundSchema` instead. */ + export const inboundSchema = CreateCustomHubResponse$inboundSchema; + /** @deprecated use `CreateCustomHubResponse$outboundSchema` instead. */ + export const outboundSchema = CreateCustomHubResponse$outboundSchema; + /** @deprecated use `CreateCustomHubResponse$Outbound` instead. */ + export type Outbound = CreateCustomHubResponse$Outbound; +} + +export function createCustomHubResponseToJSON( + createCustomHubResponse: CreateCustomHubResponse, +): string { + return JSON.stringify( + CreateCustomHubResponse$outboundSchema.parse(createCustomHubResponse), + ); +} + +export function createCustomHubResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateCustomHubResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateCustomHubResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/createdownloadqueue.ts b/src/sdk/models/operations/createdownloadqueue.ts new file mode 100644 index 00000000..b58fdd53 --- /dev/null +++ b/src/sdk/models/operations/createdownloadqueue.ts @@ -0,0 +1,405 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * The state of this queue + * + * @remarks + * - deciding: At least one item is still being decided + * - waiting: At least one item is waiting for transcode and none are currently transcoding + * - processing: At least one item is being transcoded + * - done: All items are available (or potentially expired) + * - error: At least one item has encountered an error + */ +export enum CreateDownloadQueueStatus { + Deciding = "deciding", + Waiting = "waiting", + Processing = "processing", + Done = "done", + Error = "error", +} + +export type CreateDownloadQueueDownloadQueue = { + id?: number | undefined; + itemCount?: number | undefined; + /** + * The state of this queue + * + * @remarks + * - deciding: At least one item is still being decided + * - waiting: At least one item is waiting for transcode and none are currently transcoding + * - processing: At least one item is being transcoded + * - done: All items are available (or potentially expired) + * - error: At least one item has encountered an error + */ + status?: CreateDownloadQueueStatus | undefined; +}; + +/** + * `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * + * @remarks + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +export type CreateDownloadQueueMediaContainer = { + identifier?: string | undefined; + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + * + * @remarks + */ + offset?: number | undefined; + size?: number | undefined; + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + * + * @remarks + */ + totalSize?: number | undefined; + downloadQueue?: Array | undefined; +}; + +/** + * OK + */ +export type CreateDownloadQueueResponseBody = { + mediaContainer?: CreateDownloadQueueMediaContainer | undefined; +}; + +export type CreateDownloadQueueResponse = { + /** + * 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; + /** + * OK + */ + object?: CreateDownloadQueueResponseBody | undefined; +}; + +/** @internal */ +export const CreateDownloadQueueStatus$inboundSchema: z.ZodNativeEnum< + typeof CreateDownloadQueueStatus +> = z.nativeEnum(CreateDownloadQueueStatus); + +/** @internal */ +export const CreateDownloadQueueStatus$outboundSchema: z.ZodNativeEnum< + typeof CreateDownloadQueueStatus +> = CreateDownloadQueueStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateDownloadQueueStatus$ { + /** @deprecated use `CreateDownloadQueueStatus$inboundSchema` instead. */ + export const inboundSchema = CreateDownloadQueueStatus$inboundSchema; + /** @deprecated use `CreateDownloadQueueStatus$outboundSchema` instead. */ + export const outboundSchema = CreateDownloadQueueStatus$outboundSchema; +} + +/** @internal */ +export const CreateDownloadQueueDownloadQueue$inboundSchema: z.ZodType< + CreateDownloadQueueDownloadQueue, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + itemCount: z.number().int().optional(), + status: CreateDownloadQueueStatus$inboundSchema.optional(), +}); + +/** @internal */ +export type CreateDownloadQueueDownloadQueue$Outbound = { + id?: number | undefined; + itemCount?: number | undefined; + status?: string | undefined; +}; + +/** @internal */ +export const CreateDownloadQueueDownloadQueue$outboundSchema: z.ZodType< + CreateDownloadQueueDownloadQueue$Outbound, + z.ZodTypeDef, + CreateDownloadQueueDownloadQueue +> = z.object({ + id: z.number().int().optional(), + itemCount: z.number().int().optional(), + status: CreateDownloadQueueStatus$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 CreateDownloadQueueDownloadQueue$ { + /** @deprecated use `CreateDownloadQueueDownloadQueue$inboundSchema` instead. */ + export const inboundSchema = CreateDownloadQueueDownloadQueue$inboundSchema; + /** @deprecated use `CreateDownloadQueueDownloadQueue$outboundSchema` instead. */ + export const outboundSchema = CreateDownloadQueueDownloadQueue$outboundSchema; + /** @deprecated use `CreateDownloadQueueDownloadQueue$Outbound` instead. */ + export type Outbound = CreateDownloadQueueDownloadQueue$Outbound; +} + +export function createDownloadQueueDownloadQueueToJSON( + createDownloadQueueDownloadQueue: CreateDownloadQueueDownloadQueue, +): string { + return JSON.stringify( + CreateDownloadQueueDownloadQueue$outboundSchema.parse( + createDownloadQueueDownloadQueue, + ), + ); +} + +export function createDownloadQueueDownloadQueueFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateDownloadQueueDownloadQueue$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateDownloadQueueDownloadQueue' from JSON`, + ); +} + +/** @internal */ +export const CreateDownloadQueueMediaContainer$inboundSchema: z.ZodType< + CreateDownloadQueueMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + identifier: z.string().optional(), + offset: z.number().int().optional(), + size: z.number().int().optional(), + totalSize: z.number().int().optional(), + DownloadQueue: z.array( + z.lazy(() => CreateDownloadQueueDownloadQueue$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "DownloadQueue": "downloadQueue", + }); +}); + +/** @internal */ +export type CreateDownloadQueueMediaContainer$Outbound = { + identifier?: string | undefined; + offset?: number | undefined; + size?: number | undefined; + totalSize?: number | undefined; + DownloadQueue?: Array | undefined; +}; + +/** @internal */ +export const CreateDownloadQueueMediaContainer$outboundSchema: z.ZodType< + CreateDownloadQueueMediaContainer$Outbound, + z.ZodTypeDef, + CreateDownloadQueueMediaContainer +> = z.object({ + identifier: z.string().optional(), + offset: z.number().int().optional(), + size: z.number().int().optional(), + totalSize: z.number().int().optional(), + downloadQueue: z.array( + z.lazy(() => CreateDownloadQueueDownloadQueue$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + downloadQueue: "DownloadQueue", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateDownloadQueueMediaContainer$ { + /** @deprecated use `CreateDownloadQueueMediaContainer$inboundSchema` instead. */ + export const inboundSchema = CreateDownloadQueueMediaContainer$inboundSchema; + /** @deprecated use `CreateDownloadQueueMediaContainer$outboundSchema` instead. */ + export const outboundSchema = + CreateDownloadQueueMediaContainer$outboundSchema; + /** @deprecated use `CreateDownloadQueueMediaContainer$Outbound` instead. */ + export type Outbound = CreateDownloadQueueMediaContainer$Outbound; +} + +export function createDownloadQueueMediaContainerToJSON( + createDownloadQueueMediaContainer: CreateDownloadQueueMediaContainer, +): string { + return JSON.stringify( + CreateDownloadQueueMediaContainer$outboundSchema.parse( + createDownloadQueueMediaContainer, + ), + ); +} + +export function createDownloadQueueMediaContainerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateDownloadQueueMediaContainer$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateDownloadQueueMediaContainer' from JSON`, + ); +} + +/** @internal */ +export const CreateDownloadQueueResponseBody$inboundSchema: z.ZodType< + CreateDownloadQueueResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => CreateDownloadQueueMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); + +/** @internal */ +export type CreateDownloadQueueResponseBody$Outbound = { + MediaContainer?: CreateDownloadQueueMediaContainer$Outbound | undefined; +}; + +/** @internal */ +export const CreateDownloadQueueResponseBody$outboundSchema: z.ZodType< + CreateDownloadQueueResponseBody$Outbound, + z.ZodTypeDef, + CreateDownloadQueueResponseBody +> = z.object({ + mediaContainer: z.lazy(() => CreateDownloadQueueMediaContainer$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 CreateDownloadQueueResponseBody$ { + /** @deprecated use `CreateDownloadQueueResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateDownloadQueueResponseBody$inboundSchema; + /** @deprecated use `CreateDownloadQueueResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreateDownloadQueueResponseBody$outboundSchema; + /** @deprecated use `CreateDownloadQueueResponseBody$Outbound` instead. */ + export type Outbound = CreateDownloadQueueResponseBody$Outbound; +} + +export function createDownloadQueueResponseBodyToJSON( + createDownloadQueueResponseBody: CreateDownloadQueueResponseBody, +): string { + return JSON.stringify( + CreateDownloadQueueResponseBody$outboundSchema.parse( + createDownloadQueueResponseBody, + ), + ); +} + +export function createDownloadQueueResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateDownloadQueueResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateDownloadQueueResponseBody' from JSON`, + ); +} + +/** @internal */ +export const CreateDownloadQueueResponse$inboundSchema: z.ZodType< + CreateDownloadQueueResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => CreateDownloadQueueResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); + +/** @internal */ +export type CreateDownloadQueueResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: CreateDownloadQueueResponseBody$Outbound | undefined; +}; + +/** @internal */ +export const CreateDownloadQueueResponse$outboundSchema: z.ZodType< + CreateDownloadQueueResponse$Outbound, + z.ZodTypeDef, + CreateDownloadQueueResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => CreateDownloadQueueResponseBody$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 CreateDownloadQueueResponse$ { + /** @deprecated use `CreateDownloadQueueResponse$inboundSchema` instead. */ + export const inboundSchema = CreateDownloadQueueResponse$inboundSchema; + /** @deprecated use `CreateDownloadQueueResponse$outboundSchema` instead. */ + export const outboundSchema = CreateDownloadQueueResponse$outboundSchema; + /** @deprecated use `CreateDownloadQueueResponse$Outbound` instead. */ + export type Outbound = CreateDownloadQueueResponse$Outbound; +} + +export function createDownloadQueueResponseToJSON( + createDownloadQueueResponse: CreateDownloadQueueResponse, +): string { + return JSON.stringify( + CreateDownloadQueueResponse$outboundSchema.parse( + createDownloadQueueResponse, + ), + ); +} + +export function createDownloadQueueResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateDownloadQueueResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateDownloadQueueResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/createdvr.ts b/src/sdk/models/operations/createdvr.ts new file mode 100644 index 00000000..38f9c4ae --- /dev/null +++ b/src/sdk/models/operations/createdvr.ts @@ -0,0 +1,443 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type CreateDVRGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type CreateDVRRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The EPG lineup. + */ + lineup?: string | undefined; + /** + * The device. + */ + device?: Array | undefined; + /** + * The language. + */ + language?: string | undefined; +}; + +export type CreateDVRResponse = { + /** + * 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; + /** + * OK + */ + dvrRequestHandlerSlashGetResponses200?: + | shared.DvrRequestHandlerSlashGetResponses200 + | undefined; + headers: { [k: string]: Array }; +}; + +/** @internal */ +export const CreateDVRGlobals$inboundSchema: z.ZodType< + CreateDVRGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type CreateDVRGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const CreateDVRGlobals$outboundSchema: z.ZodType< + CreateDVRGlobals$Outbound, + z.ZodTypeDef, + CreateDVRGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateDVRGlobals$ { + /** @deprecated use `CreateDVRGlobals$inboundSchema` instead. */ + export const inboundSchema = CreateDVRGlobals$inboundSchema; + /** @deprecated use `CreateDVRGlobals$outboundSchema` instead. */ + export const outboundSchema = CreateDVRGlobals$outboundSchema; + /** @deprecated use `CreateDVRGlobals$Outbound` instead. */ + export type Outbound = CreateDVRGlobals$Outbound; +} + +export function createDVRGlobalsToJSON( + createDVRGlobals: CreateDVRGlobals, +): string { + return JSON.stringify( + CreateDVRGlobals$outboundSchema.parse(createDVRGlobals), + ); +} + +export function createDVRGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateDVRGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateDVRGlobals' from JSON`, + ); +} + +/** @internal */ +export const CreateDVRRequest$inboundSchema: z.ZodType< + CreateDVRRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + lineup: z.string().optional(), + device: z.array(z.string()).optional(), + language: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type CreateDVRRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + lineup?: string | undefined; + device?: Array | undefined; + language?: string | undefined; +}; + +/** @internal */ +export const CreateDVRRequest$outboundSchema: z.ZodType< + CreateDVRRequest$Outbound, + z.ZodTypeDef, + CreateDVRRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + lineup: z.string().optional(), + device: z.array(z.string()).optional(), + language: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateDVRRequest$ { + /** @deprecated use `CreateDVRRequest$inboundSchema` instead. */ + export const inboundSchema = CreateDVRRequest$inboundSchema; + /** @deprecated use `CreateDVRRequest$outboundSchema` instead. */ + export const outboundSchema = CreateDVRRequest$outboundSchema; + /** @deprecated use `CreateDVRRequest$Outbound` instead. */ + export type Outbound = CreateDVRRequest$Outbound; +} + +export function createDVRRequestToJSON( + createDVRRequest: CreateDVRRequest, +): string { + return JSON.stringify( + CreateDVRRequest$outboundSchema.parse(createDVRRequest), + ); +} + +export function createDVRRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateDVRRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateDVRRequest' from JSON`, + ); +} + +/** @internal */ +export const CreateDVRResponse$inboundSchema: z.ZodType< + CreateDVRResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + "dvrRequestHandler_slash-get-responses-200": shared + .DvrRequestHandlerSlashGetResponses200$inboundSchema.optional(), + Headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "dvrRequestHandler_slash-get-responses-200": + "dvrRequestHandlerSlashGetResponses200", + "Headers": "headers", + }); +}); + +/** @internal */ +export type CreateDVRResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + "dvrRequestHandler_slash-get-responses-200"?: + | shared.DvrRequestHandlerSlashGetResponses200$Outbound + | undefined; + Headers: { [k: string]: Array }; +}; + +/** @internal */ +export const CreateDVRResponse$outboundSchema: z.ZodType< + CreateDVRResponse$Outbound, + z.ZodTypeDef, + CreateDVRResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + dvrRequestHandlerSlashGetResponses200: shared + .DvrRequestHandlerSlashGetResponses200$outboundSchema.optional(), + headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + dvrRequestHandlerSlashGetResponses200: + "dvrRequestHandler_slash-get-responses-200", + 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 CreateDVRResponse$ { + /** @deprecated use `CreateDVRResponse$inboundSchema` instead. */ + export const inboundSchema = CreateDVRResponse$inboundSchema; + /** @deprecated use `CreateDVRResponse$outboundSchema` instead. */ + export const outboundSchema = CreateDVRResponse$outboundSchema; + /** @deprecated use `CreateDVRResponse$Outbound` instead. */ + export type Outbound = CreateDVRResponse$Outbound; +} + +export function createDVRResponseToJSON( + createDVRResponse: CreateDVRResponse, +): string { + return JSON.stringify( + CreateDVRResponse$outboundSchema.parse(createDVRResponse), + ); +} + +export function createDVRResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateDVRResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateDVRResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/createmarker.ts b/src/sdk/models/operations/createmarker.ts new file mode 100644 index 00000000..d136f679 --- /dev/null +++ b/src/sdk/models/operations/createmarker.ts @@ -0,0 +1,718 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { + collectExtraKeys as collectExtraKeys$, + safeParse, +} from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateMarkerGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +/** + * The attributes to assign to this marker + */ +export type CreateMarkerAttributes = {}; + +export type CreateMarkerRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + ids: string; + /** + * The type of marker to edit/create + */ + type: number; + /** + * The start time of the marker + */ + startTimeOffset: number; + /** + * The end time of the marker + */ + endTimeOffset?: number | undefined; + /** + * The attributes to assign to this marker + */ + attributes?: CreateMarkerAttributes | undefined; +}; + +export enum CreateMarkerType { + Intro = "intro", + Commercial = "commercial", + Bookmark = "bookmark", + Resume = "resume", + Credit = "credit", +} + +/** + * `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * + * @remarks + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +export type CreateMarkerMediaContainer = { + identifier?: string | undefined; + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + * + * @remarks + */ + offset?: number | undefined; + size?: number | undefined; + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + * + * @remarks + */ + totalSize?: number | undefined; + color?: string | undefined; + endTimeOffset?: number | undefined; + id?: number | undefined; + startTimeOffset?: number | undefined; + title?: string | undefined; + type?: CreateMarkerType | undefined; + additionalProperties?: { [k: string]: any }; +}; + +/** + * OK + */ +export type CreateMarkerResponseBody = { + mediaContainer?: CreateMarkerMediaContainer | undefined; +}; + +export type CreateMarkerResponse = { + /** + * 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; + /** + * OK + */ + object?: CreateMarkerResponseBody | undefined; +}; + +/** @internal */ +export const CreateMarkerGlobals$inboundSchema: z.ZodType< + CreateMarkerGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type CreateMarkerGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const CreateMarkerGlobals$outboundSchema: z.ZodType< + CreateMarkerGlobals$Outbound, + z.ZodTypeDef, + CreateMarkerGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateMarkerGlobals$ { + /** @deprecated use `CreateMarkerGlobals$inboundSchema` instead. */ + export const inboundSchema = CreateMarkerGlobals$inboundSchema; + /** @deprecated use `CreateMarkerGlobals$outboundSchema` instead. */ + export const outboundSchema = CreateMarkerGlobals$outboundSchema; + /** @deprecated use `CreateMarkerGlobals$Outbound` instead. */ + export type Outbound = CreateMarkerGlobals$Outbound; +} + +export function createMarkerGlobalsToJSON( + createMarkerGlobals: CreateMarkerGlobals, +): string { + return JSON.stringify( + CreateMarkerGlobals$outboundSchema.parse(createMarkerGlobals), + ); +} + +export function createMarkerGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateMarkerGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateMarkerGlobals' from JSON`, + ); +} + +/** @internal */ +export const CreateMarkerAttributes$inboundSchema: z.ZodType< + CreateMarkerAttributes, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type CreateMarkerAttributes$Outbound = {}; + +/** @internal */ +export const CreateMarkerAttributes$outboundSchema: z.ZodType< + CreateMarkerAttributes$Outbound, + z.ZodTypeDef, + CreateMarkerAttributes +> = 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 CreateMarkerAttributes$ { + /** @deprecated use `CreateMarkerAttributes$inboundSchema` instead. */ + export const inboundSchema = CreateMarkerAttributes$inboundSchema; + /** @deprecated use `CreateMarkerAttributes$outboundSchema` instead. */ + export const outboundSchema = CreateMarkerAttributes$outboundSchema; + /** @deprecated use `CreateMarkerAttributes$Outbound` instead. */ + export type Outbound = CreateMarkerAttributes$Outbound; +} + +export function createMarkerAttributesToJSON( + createMarkerAttributes: CreateMarkerAttributes, +): string { + return JSON.stringify( + CreateMarkerAttributes$outboundSchema.parse(createMarkerAttributes), + ); +} + +export function createMarkerAttributesFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateMarkerAttributes$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateMarkerAttributes' from JSON`, + ); +} + +/** @internal */ +export const CreateMarkerRequest$inboundSchema: z.ZodType< + CreateMarkerRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + ids: z.string(), + type: z.number().int(), + startTimeOffset: z.number().int(), + endTimeOffset: z.number().int().optional(), + attributes: z.lazy(() => CreateMarkerAttributes$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type CreateMarkerRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + ids: string; + type: number; + startTimeOffset: number; + endTimeOffset?: number | undefined; + attributes?: CreateMarkerAttributes$Outbound | undefined; +}; + +/** @internal */ +export const CreateMarkerRequest$outboundSchema: z.ZodType< + CreateMarkerRequest$Outbound, + z.ZodTypeDef, + CreateMarkerRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + ids: z.string(), + type: z.number().int(), + startTimeOffset: z.number().int(), + endTimeOffset: z.number().int().optional(), + attributes: z.lazy(() => CreateMarkerAttributes$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateMarkerRequest$ { + /** @deprecated use `CreateMarkerRequest$inboundSchema` instead. */ + export const inboundSchema = CreateMarkerRequest$inboundSchema; + /** @deprecated use `CreateMarkerRequest$outboundSchema` instead. */ + export const outboundSchema = CreateMarkerRequest$outboundSchema; + /** @deprecated use `CreateMarkerRequest$Outbound` instead. */ + export type Outbound = CreateMarkerRequest$Outbound; +} + +export function createMarkerRequestToJSON( + createMarkerRequest: CreateMarkerRequest, +): string { + return JSON.stringify( + CreateMarkerRequest$outboundSchema.parse(createMarkerRequest), + ); +} + +export function createMarkerRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateMarkerRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateMarkerRequest' from JSON`, + ); +} + +/** @internal */ +export const CreateMarkerType$inboundSchema: z.ZodNativeEnum< + typeof CreateMarkerType +> = z.nativeEnum(CreateMarkerType); + +/** @internal */ +export const CreateMarkerType$outboundSchema: z.ZodNativeEnum< + typeof CreateMarkerType +> = CreateMarkerType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateMarkerType$ { + /** @deprecated use `CreateMarkerType$inboundSchema` instead. */ + export const inboundSchema = CreateMarkerType$inboundSchema; + /** @deprecated use `CreateMarkerType$outboundSchema` instead. */ + export const outboundSchema = CreateMarkerType$outboundSchema; +} + +/** @internal */ +export const CreateMarkerMediaContainer$inboundSchema: z.ZodType< + CreateMarkerMediaContainer, + z.ZodTypeDef, + unknown +> = collectExtraKeys$( + z.object({ + identifier: z.string().optional(), + offset: z.number().int().optional(), + size: z.number().int().optional(), + totalSize: z.number().int().optional(), + color: z.string().optional(), + endTimeOffset: z.number().int().optional(), + id: z.number().int().optional(), + startTimeOffset: z.number().int().optional(), + title: z.string().optional(), + type: CreateMarkerType$inboundSchema.optional(), + }).catchall(z.any()), + "additionalProperties", + true, +); + +/** @internal */ +export type CreateMarkerMediaContainer$Outbound = { + identifier?: string | undefined; + offset?: number | undefined; + size?: number | undefined; + totalSize?: number | undefined; + color?: string | undefined; + endTimeOffset?: number | undefined; + id?: number | undefined; + startTimeOffset?: number | undefined; + title?: string | undefined; + type?: string | undefined; + [additionalProperties: string]: unknown; +}; + +/** @internal */ +export const CreateMarkerMediaContainer$outboundSchema: z.ZodType< + CreateMarkerMediaContainer$Outbound, + z.ZodTypeDef, + CreateMarkerMediaContainer +> = z.object({ + identifier: z.string().optional(), + offset: z.number().int().optional(), + size: z.number().int().optional(), + totalSize: z.number().int().optional(), + color: z.string().optional(), + endTimeOffset: z.number().int().optional(), + id: z.number().int().optional(), + startTimeOffset: z.number().int().optional(), + title: z.string().optional(), + type: CreateMarkerType$outboundSchema.optional(), + additionalProperties: z.record(z.any()), +}).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateMarkerMediaContainer$ { + /** @deprecated use `CreateMarkerMediaContainer$inboundSchema` instead. */ + export const inboundSchema = CreateMarkerMediaContainer$inboundSchema; + /** @deprecated use `CreateMarkerMediaContainer$outboundSchema` instead. */ + export const outboundSchema = CreateMarkerMediaContainer$outboundSchema; + /** @deprecated use `CreateMarkerMediaContainer$Outbound` instead. */ + export type Outbound = CreateMarkerMediaContainer$Outbound; +} + +export function createMarkerMediaContainerToJSON( + createMarkerMediaContainer: CreateMarkerMediaContainer, +): string { + return JSON.stringify( + CreateMarkerMediaContainer$outboundSchema.parse(createMarkerMediaContainer), + ); +} + +export function createMarkerMediaContainerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateMarkerMediaContainer$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateMarkerMediaContainer' from JSON`, + ); +} + +/** @internal */ +export const CreateMarkerResponseBody$inboundSchema: z.ZodType< + CreateMarkerResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => CreateMarkerMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); + +/** @internal */ +export type CreateMarkerResponseBody$Outbound = { + MediaContainer?: CreateMarkerMediaContainer$Outbound | undefined; +}; + +/** @internal */ +export const CreateMarkerResponseBody$outboundSchema: z.ZodType< + CreateMarkerResponseBody$Outbound, + z.ZodTypeDef, + CreateMarkerResponseBody +> = z.object({ + mediaContainer: z.lazy(() => CreateMarkerMediaContainer$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 CreateMarkerResponseBody$ { + /** @deprecated use `CreateMarkerResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateMarkerResponseBody$inboundSchema; + /** @deprecated use `CreateMarkerResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreateMarkerResponseBody$outboundSchema; + /** @deprecated use `CreateMarkerResponseBody$Outbound` instead. */ + export type Outbound = CreateMarkerResponseBody$Outbound; +} + +export function createMarkerResponseBodyToJSON( + createMarkerResponseBody: CreateMarkerResponseBody, +): string { + return JSON.stringify( + CreateMarkerResponseBody$outboundSchema.parse(createMarkerResponseBody), + ); +} + +export function createMarkerResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateMarkerResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateMarkerResponseBody' from JSON`, + ); +} + +/** @internal */ +export const CreateMarkerResponse$inboundSchema: z.ZodType< + CreateMarkerResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => CreateMarkerResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); + +/** @internal */ +export type CreateMarkerResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: CreateMarkerResponseBody$Outbound | undefined; +}; + +/** @internal */ +export const CreateMarkerResponse$outboundSchema: z.ZodType< + CreateMarkerResponse$Outbound, + z.ZodTypeDef, + CreateMarkerResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => CreateMarkerResponseBody$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 CreateMarkerResponse$ { + /** @deprecated use `CreateMarkerResponse$inboundSchema` instead. */ + export const inboundSchema = CreateMarkerResponse$inboundSchema; + /** @deprecated use `CreateMarkerResponse$outboundSchema` instead. */ + export const outboundSchema = CreateMarkerResponse$outboundSchema; + /** @deprecated use `CreateMarkerResponse$Outbound` instead. */ + export type Outbound = CreateMarkerResponse$Outbound; +} + +export function createMarkerResponseToJSON( + createMarkerResponse: CreateMarkerResponse, +): string { + return JSON.stringify( + CreateMarkerResponse$outboundSchema.parse(createMarkerResponse), + ); +} + +export function createMarkerResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateMarkerResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateMarkerResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/createplaylist.ts b/src/sdk/models/operations/createplaylist.ts index 330b9b7f..12e8e8a2 100644 --- a/src/sdk/models/operations/createplaylist.ts +++ b/src/sdk/models/operations/createplaylist.ts @@ -5,91 +5,104 @@ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; -/** - * type of playlist to create - */ -export enum CreatePlaylistQueryParamType { - Audio = "audio", - Video = "video", - Photo = "photo", -} -/** - * type of playlist to create - */ -export type CreatePlaylistQueryParamTypeOpen = OpenEnum< - typeof CreatePlaylistQueryParamType ->; - -/** - * whether the playlist is smart or not - */ -export enum Smart { - Zero = 0, - One = 1, -} +export type CreatePlaylistGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; export type CreatePlaylistRequest = { /** - * name of the playlist + * An opaque identifier unique to the client */ - title: string; + xPlexClientIdentifier?: string | undefined; /** - * type of playlist to create + * The name of the client product */ - type: CreatePlaylistQueryParamTypeOpen; + xPlexProduct?: string | undefined; /** - * whether the playlist is smart or not + * The version of the client application */ - smart: Smart; + xPlexVersion?: string | undefined; /** - * the content URI for the playlist + * The platform of the client */ - uri: string; + xPlexPlatform?: string | undefined; /** - * the play queue to copy to a playlist + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The content URI for what we're playing (e.g. `library://...`). + */ + uri?: string | undefined; + /** + * To create a playlist from an existing play queue. */ 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; -}; - -export type CreatePlaylistMediaContainer = { - size?: number | undefined; - metadata?: Array | undefined; -}; - -/** - * returns all playlists - */ -export type CreatePlaylistResponseBody = { - mediaContainer?: CreatePlaylistMediaContainer | undefined; -}; - export type CreatePlaylistResponse = { /** * HTTP response content type for this operation @@ -104,61 +117,118 @@ export type CreatePlaylistResponse = { */ rawResponse: Response; /** - * returns all playlists + * OK */ - object?: CreatePlaylistResponseBody | undefined; + mediaContainerWithPlaylistMetadata?: + | shared.MediaContainerWithPlaylistMetadata + | undefined; }; /** @internal */ -export const CreatePlaylistQueryParamType$inboundSchema: z.ZodType< - CreatePlaylistQueryParamTypeOpen, +export const CreatePlaylistGlobals$inboundSchema: z.ZodType< + CreatePlaylistGlobals, z.ZodTypeDef, unknown -> = z - .union([ - z.nativeEnum(CreatePlaylistQueryParamType), - z.string().transform(catchUnrecognizedEnum), - ]); +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); /** @internal */ -export const CreatePlaylistQueryParamType$outboundSchema: z.ZodType< - CreatePlaylistQueryParamTypeOpen, +export type CreatePlaylistGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const CreatePlaylistGlobals$outboundSchema: z.ZodType< + CreatePlaylistGlobals$Outbound, z.ZodTypeDef, - CreatePlaylistQueryParamTypeOpen -> = z.union([ - z.nativeEnum(CreatePlaylistQueryParamType), - z.string().and(z.custom>()), -]); + CreatePlaylistGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); /** * @internal * @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; +export namespace CreatePlaylistGlobals$ { + /** @deprecated use `CreatePlaylistGlobals$inboundSchema` instead. */ + export const inboundSchema = CreatePlaylistGlobals$inboundSchema; + /** @deprecated use `CreatePlaylistGlobals$outboundSchema` instead. */ + export const outboundSchema = CreatePlaylistGlobals$outboundSchema; + /** @deprecated use `CreatePlaylistGlobals$Outbound` instead. */ + export type Outbound = CreatePlaylistGlobals$Outbound; } -/** @internal */ -export const Smart$inboundSchema: z.ZodNativeEnum = z.nativeEnum( - Smart, -); +export function createPlaylistGlobalsToJSON( + createPlaylistGlobals: CreatePlaylistGlobals, +): string { + return JSON.stringify( + CreatePlaylistGlobals$outboundSchema.parse(createPlaylistGlobals), + ); +} -/** @internal */ -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; +export function createPlaylistGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreatePlaylistGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreatePlaylistGlobals' from JSON`, + ); } /** @internal */ @@ -167,19 +237,46 @@ export const CreatePlaylistRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - title: z.string(), - type: CreatePlaylistQueryParamType$inboundSchema, - smart: Smart$inboundSchema, - uri: z.string(), - playQueueID: z.number().optional(), + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + uri: z.string().optional(), + playQueueID: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); }); /** @internal */ export type CreatePlaylistRequest$Outbound = { - title: string; - type: string; - smart: number; - uri: string; + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + uri?: string | undefined; playQueueID?: number | undefined; }; @@ -189,11 +286,31 @@ export const CreatePlaylistRequest$outboundSchema: z.ZodType< z.ZodTypeDef, CreatePlaylistRequest > = z.object({ - title: z.string(), - type: CreatePlaylistQueryParamType$outboundSchema, - smart: Smart$outboundSchema, - uri: z.string(), - playQueueID: z.number().optional(), + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + uri: z.string().optional(), + playQueueID: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); }); /** @@ -227,238 +344,6 @@ export function createPlaylistRequestFromJSON( ); } -/** @internal */ -export const CreatePlaylistMetadata$inboundSchema: z.ZodType< - 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(), -}); - -/** @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; -}; - -/** @internal */ -export const CreatePlaylistMetadata$outboundSchema: z.ZodType< - 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(), -}); - -/** - * @internal - * @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; -} - -export function createPlaylistMetadataToJSON( - createPlaylistMetadata: CreatePlaylistMetadata, -): string { - return JSON.stringify( - CreatePlaylistMetadata$outboundSchema.parse(createPlaylistMetadata), - ); -} - -export function createPlaylistMetadataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreatePlaylistMetadata$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreatePlaylistMetadata' from JSON`, - ); -} - -/** @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", - }); -}); - -/** @internal */ -export type CreatePlaylistMediaContainer$Outbound = { - 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", - }); -}); - -/** - * @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; -} - -export function createPlaylistMediaContainerToJSON( - createPlaylistMediaContainer: CreatePlaylistMediaContainer, -): string { - return JSON.stringify( - CreatePlaylistMediaContainer$outboundSchema.parse( - createPlaylistMediaContainer, - ), - ); -} - -export function createPlaylistMediaContainerFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreatePlaylistMediaContainer$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreatePlaylistMediaContainer' from JSON`, - ); -} - -/** @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", - }); -}); - -/** @internal */ -export type CreatePlaylistResponseBody$Outbound = { - 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", - }); -}); - -/** - * @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 function createPlaylistResponseBodyToJSON( - createPlaylistResponseBody: CreatePlaylistResponseBody, -): string { - return JSON.stringify( - CreatePlaylistResponseBody$outboundSchema.parse(createPlaylistResponseBody), - ); -} - -export function createPlaylistResponseBodyFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreatePlaylistResponseBody$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreatePlaylistResponseBody' from JSON`, - ); -} - /** @internal */ export const CreatePlaylistResponse$inboundSchema: z.ZodType< CreatePlaylistResponse, @@ -468,12 +353,14 @@ export const CreatePlaylistResponse$inboundSchema: z.ZodType< ContentType: z.string(), StatusCode: z.number().int(), RawResponse: z.instanceof(Response), - object: z.lazy(() => CreatePlaylistResponseBody$inboundSchema).optional(), + MediaContainerWithPlaylistMetadata: shared + .MediaContainerWithPlaylistMetadata$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "ContentType": "contentType", "StatusCode": "statusCode", "RawResponse": "rawResponse", + "MediaContainerWithPlaylistMetadata": "mediaContainerWithPlaylistMetadata", }); }); @@ -482,7 +369,9 @@ export type CreatePlaylistResponse$Outbound = { ContentType: string; StatusCode: number; RawResponse: never; - object?: CreatePlaylistResponseBody$Outbound | undefined; + MediaContainerWithPlaylistMetadata?: + | shared.MediaContainerWithPlaylistMetadata$Outbound + | undefined; }; /** @internal */ @@ -496,12 +385,14 @@ export const CreatePlaylistResponse$outboundSchema: z.ZodType< rawResponse: z.instanceof(Response).transform(() => { throw new Error("Response cannot be serialized"); }), - object: z.lazy(() => CreatePlaylistResponseBody$outboundSchema).optional(), + mediaContainerWithPlaylistMetadata: shared + .MediaContainerWithPlaylistMetadata$outboundSchema.optional(), }).transform((v) => { return remap$(v, { contentType: "ContentType", statusCode: "StatusCode", rawResponse: "RawResponse", + mediaContainerWithPlaylistMetadata: "MediaContainerWithPlaylistMetadata", }); }); diff --git a/src/sdk/models/operations/createplayqueue.ts b/src/sdk/models/operations/createplayqueue.ts new file mode 100644 index 00000000..00bb2d69 --- /dev/null +++ b/src/sdk/models/operations/createplayqueue.ts @@ -0,0 +1,737 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type CreatePlayQueueGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +/** + * The type of play queue to create + */ +export enum CreatePlayQueueType { + Audio = "audio", + Video = "video", + Photo = "photo", +} + +export type CreatePlayQueueRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The content URI for what we're playing. + */ + uri?: string | undefined; + /** + * the ID of the playlist we're playing. + */ + playlistID?: number | undefined; + /** + * The type of play queue to create + */ + type: CreatePlayQueueType; + /** + * The key of the first item to play, defaults to the first in the play queue. + */ + key?: string | undefined; + /** + * Whether to shuffle the playlist, defaults to 0. + */ + shuffle?: shared.BoolInt | undefined; + /** + * If the PQ is bigger than the window, fill any empty space with wraparound items, defaults to 0. + */ + repeat?: shared.BoolInt | undefined; + /** + * Whether to create a continuous play queue (e.g. from an episode), defaults to 0. + */ + continuous?: shared.BoolInt | undefined; + /** + * Number of trailers to prepend a movie with not including the pre-roll. If omitted the pre-roll will not be returned in the play queue. When resuming a movie `extrasPrefixCount` should be omitted as a parameter instead of passing 0. + */ + extrasPrefixCount?: number | undefined; + /** + * Only applies to queues of type photo, whether to retrieve all descendent photos from an album or section, defaults to 1. + */ + recursive?: shared.BoolInt | undefined; + /** + * Only applies to queues of type show or seasons, whether to return a queue that is started on the On Deck episode if one exists. Otherwise begins the play queue on the beginning of the show or season. + */ + onDeck?: shared.BoolInt | undefined; +}; + +/** + * `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * + * @remarks + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +export type CreatePlayQueueMediaContainer = { + identifier?: string | undefined; + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + * + * @remarks + */ + offset?: number | undefined; + size?: number | undefined; + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + * + * @remarks + */ + totalSize?: number | undefined; + /** + * The ID of the play queue, which is used in subsequent requests. + */ + playQueueID?: number | undefined; + /** + * Defines where the "Up Next" region starts + */ + playQueueLastAddedItemID?: string | undefined; + /** + * The queue item ID of the currently selected item. + */ + playQueueSelectedItemID?: number | undefined; + /** + * The offset of the selected item in the play queue, from the beginning of the queue. + */ + playQueueSelectedItemOffset?: number | undefined; + /** + * The metadata item ID of the currently selected item (matches `ratingKey` attribute in metadata item if the media provider is a library). + */ + playQueueSelectedMetadataItemID?: number | undefined; + /** + * Whether or not the queue is shuffled. + */ + playQueueShuffled?: boolean | undefined; + /** + * The original URI used to create the play queue. + */ + playQueueSourceURI?: string | undefined; + /** + * The total number of items in the play queue. + */ + playQueueTotalCount?: number | undefined; + /** + * The version of the play queue. It increments every time a change is made to the play queue to assist clients in knowing when to refresh. + */ + playQueueVersion?: number | undefined; +}; + +/** + * OK + */ +export type CreatePlayQueueResponseBody = { + mediaContainer?: CreatePlayQueueMediaContainer | undefined; +}; + +export type CreatePlayQueueResponse = { + /** + * 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; + /** + * OK + */ + object?: CreatePlayQueueResponseBody | undefined; + headers: { [k: string]: Array }; +}; + +/** @internal */ +export const CreatePlayQueueGlobals$inboundSchema: z.ZodType< + CreatePlayQueueGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type CreatePlayQueueGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const CreatePlayQueueGlobals$outboundSchema: z.ZodType< + CreatePlayQueueGlobals$Outbound, + z.ZodTypeDef, + CreatePlayQueueGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreatePlayQueueGlobals$ { + /** @deprecated use `CreatePlayQueueGlobals$inboundSchema` instead. */ + export const inboundSchema = CreatePlayQueueGlobals$inboundSchema; + /** @deprecated use `CreatePlayQueueGlobals$outboundSchema` instead. */ + export const outboundSchema = CreatePlayQueueGlobals$outboundSchema; + /** @deprecated use `CreatePlayQueueGlobals$Outbound` instead. */ + export type Outbound = CreatePlayQueueGlobals$Outbound; +} + +export function createPlayQueueGlobalsToJSON( + createPlayQueueGlobals: CreatePlayQueueGlobals, +): string { + return JSON.stringify( + CreatePlayQueueGlobals$outboundSchema.parse(createPlayQueueGlobals), + ); +} + +export function createPlayQueueGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreatePlayQueueGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreatePlayQueueGlobals' from JSON`, + ); +} + +/** @internal */ +export const CreatePlayQueueType$inboundSchema: z.ZodNativeEnum< + typeof CreatePlayQueueType +> = z.nativeEnum(CreatePlayQueueType); + +/** @internal */ +export const CreatePlayQueueType$outboundSchema: z.ZodNativeEnum< + typeof CreatePlayQueueType +> = CreatePlayQueueType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreatePlayQueueType$ { + /** @deprecated use `CreatePlayQueueType$inboundSchema` instead. */ + export const inboundSchema = CreatePlayQueueType$inboundSchema; + /** @deprecated use `CreatePlayQueueType$outboundSchema` instead. */ + export const outboundSchema = CreatePlayQueueType$outboundSchema; +} + +/** @internal */ +export const CreatePlayQueueRequest$inboundSchema: z.ZodType< + CreatePlayQueueRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + uri: z.string().optional(), + playlistID: z.number().int().optional(), + type: CreatePlayQueueType$inboundSchema, + key: z.string().optional(), + shuffle: shared.BoolInt$inboundSchema.optional(), + repeat: shared.BoolInt$inboundSchema.optional(), + continuous: shared.BoolInt$inboundSchema.optional(), + extrasPrefixCount: z.number().int().optional(), + recursive: shared.BoolInt$inboundSchema.optional(), + onDeck: shared.BoolInt$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type CreatePlayQueueRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + uri?: string | undefined; + playlistID?: number | undefined; + type: string; + key?: string | undefined; + shuffle?: number | undefined; + repeat?: number | undefined; + continuous?: number | undefined; + extrasPrefixCount?: number | undefined; + recursive?: number | undefined; + onDeck?: number | undefined; +}; + +/** @internal */ +export const CreatePlayQueueRequest$outboundSchema: z.ZodType< + CreatePlayQueueRequest$Outbound, + z.ZodTypeDef, + CreatePlayQueueRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + uri: z.string().optional(), + playlistID: z.number().int().optional(), + type: CreatePlayQueueType$outboundSchema, + key: z.string().optional(), + shuffle: shared.BoolInt$outboundSchema.optional(), + repeat: shared.BoolInt$outboundSchema.optional(), + continuous: shared.BoolInt$outboundSchema.optional(), + extrasPrefixCount: z.number().int().optional(), + recursive: shared.BoolInt$outboundSchema.optional(), + onDeck: shared.BoolInt$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreatePlayQueueRequest$ { + /** @deprecated use `CreatePlayQueueRequest$inboundSchema` instead. */ + export const inboundSchema = CreatePlayQueueRequest$inboundSchema; + /** @deprecated use `CreatePlayQueueRequest$outboundSchema` instead. */ + export const outboundSchema = CreatePlayQueueRequest$outboundSchema; + /** @deprecated use `CreatePlayQueueRequest$Outbound` instead. */ + export type Outbound = CreatePlayQueueRequest$Outbound; +} + +export function createPlayQueueRequestToJSON( + createPlayQueueRequest: CreatePlayQueueRequest, +): string { + return JSON.stringify( + CreatePlayQueueRequest$outboundSchema.parse(createPlayQueueRequest), + ); +} + +export function createPlayQueueRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreatePlayQueueRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreatePlayQueueRequest' from JSON`, + ); +} + +/** @internal */ +export const CreatePlayQueueMediaContainer$inboundSchema: z.ZodType< + CreatePlayQueueMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + identifier: z.string().optional(), + offset: z.number().int().optional(), + size: z.number().int().optional(), + totalSize: z.number().int().optional(), + playQueueID: z.number().int().optional(), + playQueueLastAddedItemID: z.string().optional(), + playQueueSelectedItemID: z.number().int().optional(), + playQueueSelectedItemOffset: z.number().int().optional(), + playQueueSelectedMetadataItemID: z.number().int().optional(), + playQueueShuffled: z.boolean().optional(), + playQueueSourceURI: z.string().optional(), + playQueueTotalCount: z.number().int().optional(), + playQueueVersion: z.number().int().optional(), +}); + +/** @internal */ +export type CreatePlayQueueMediaContainer$Outbound = { + identifier?: string | undefined; + offset?: number | undefined; + size?: number | undefined; + totalSize?: number | undefined; + playQueueID?: number | undefined; + playQueueLastAddedItemID?: string | undefined; + playQueueSelectedItemID?: number | undefined; + playQueueSelectedItemOffset?: number | undefined; + playQueueSelectedMetadataItemID?: number | undefined; + playQueueShuffled?: boolean | undefined; + playQueueSourceURI?: string | undefined; + playQueueTotalCount?: number | undefined; + playQueueVersion?: number | undefined; +}; + +/** @internal */ +export const CreatePlayQueueMediaContainer$outboundSchema: z.ZodType< + CreatePlayQueueMediaContainer$Outbound, + z.ZodTypeDef, + CreatePlayQueueMediaContainer +> = z.object({ + identifier: z.string().optional(), + offset: z.number().int().optional(), + size: z.number().int().optional(), + totalSize: z.number().int().optional(), + playQueueID: z.number().int().optional(), + playQueueLastAddedItemID: z.string().optional(), + playQueueSelectedItemID: z.number().int().optional(), + playQueueSelectedItemOffset: z.number().int().optional(), + playQueueSelectedMetadataItemID: z.number().int().optional(), + playQueueShuffled: z.boolean().optional(), + playQueueSourceURI: z.string().optional(), + playQueueTotalCount: z.number().int().optional(), + playQueueVersion: 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 CreatePlayQueueMediaContainer$ { + /** @deprecated use `CreatePlayQueueMediaContainer$inboundSchema` instead. */ + export const inboundSchema = CreatePlayQueueMediaContainer$inboundSchema; + /** @deprecated use `CreatePlayQueueMediaContainer$outboundSchema` instead. */ + export const outboundSchema = CreatePlayQueueMediaContainer$outboundSchema; + /** @deprecated use `CreatePlayQueueMediaContainer$Outbound` instead. */ + export type Outbound = CreatePlayQueueMediaContainer$Outbound; +} + +export function createPlayQueueMediaContainerToJSON( + createPlayQueueMediaContainer: CreatePlayQueueMediaContainer, +): string { + return JSON.stringify( + CreatePlayQueueMediaContainer$outboundSchema.parse( + createPlayQueueMediaContainer, + ), + ); +} + +export function createPlayQueueMediaContainerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreatePlayQueueMediaContainer$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreatePlayQueueMediaContainer' from JSON`, + ); +} + +/** @internal */ +export const CreatePlayQueueResponseBody$inboundSchema: z.ZodType< + CreatePlayQueueResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => CreatePlayQueueMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); + +/** @internal */ +export type CreatePlayQueueResponseBody$Outbound = { + MediaContainer?: CreatePlayQueueMediaContainer$Outbound | undefined; +}; + +/** @internal */ +export const CreatePlayQueueResponseBody$outboundSchema: z.ZodType< + CreatePlayQueueResponseBody$Outbound, + z.ZodTypeDef, + CreatePlayQueueResponseBody +> = z.object({ + mediaContainer: z.lazy(() => CreatePlayQueueMediaContainer$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 CreatePlayQueueResponseBody$ { + /** @deprecated use `CreatePlayQueueResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreatePlayQueueResponseBody$inboundSchema; + /** @deprecated use `CreatePlayQueueResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreatePlayQueueResponseBody$outboundSchema; + /** @deprecated use `CreatePlayQueueResponseBody$Outbound` instead. */ + export type Outbound = CreatePlayQueueResponseBody$Outbound; +} + +export function createPlayQueueResponseBodyToJSON( + createPlayQueueResponseBody: CreatePlayQueueResponseBody, +): string { + return JSON.stringify( + CreatePlayQueueResponseBody$outboundSchema.parse( + createPlayQueueResponseBody, + ), + ); +} + +export function createPlayQueueResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreatePlayQueueResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreatePlayQueueResponseBody' from JSON`, + ); +} + +/** @internal */ +export const CreatePlayQueueResponse$inboundSchema: z.ZodType< + CreatePlayQueueResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => CreatePlayQueueResponseBody$inboundSchema).optional(), + Headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "Headers": "headers", + }); +}); + +/** @internal */ +export type CreatePlayQueueResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: CreatePlayQueueResponseBody$Outbound | undefined; + Headers: { [k: string]: Array }; +}; + +/** @internal */ +export const CreatePlayQueueResponse$outboundSchema: z.ZodType< + CreatePlayQueueResponse$Outbound, + z.ZodTypeDef, + CreatePlayQueueResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => CreatePlayQueueResponseBody$outboundSchema).optional(), + headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + 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 CreatePlayQueueResponse$ { + /** @deprecated use `CreatePlayQueueResponse$inboundSchema` instead. */ + export const inboundSchema = CreatePlayQueueResponse$inboundSchema; + /** @deprecated use `CreatePlayQueueResponse$outboundSchema` instead. */ + export const outboundSchema = CreatePlayQueueResponse$outboundSchema; + /** @deprecated use `CreatePlayQueueResponse$Outbound` instead. */ + export type Outbound = CreatePlayQueueResponse$Outbound; +} + +export function createPlayQueueResponseToJSON( + createPlayQueueResponse: CreatePlayQueueResponse, +): string { + return JSON.stringify( + CreatePlayQueueResponse$outboundSchema.parse(createPlayQueueResponse), + ); +} + +export function createPlayQueueResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreatePlayQueueResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreatePlayQueueResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/createsubscription.ts b/src/sdk/models/operations/createsubscription.ts new file mode 100644 index 00000000..5177951a --- /dev/null +++ b/src/sdk/models/operations/createsubscription.ts @@ -0,0 +1,783 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type CreateSubscriptionGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +/** + * Hints describing what we're looking for. Note: The hint `ratingKey` is required for downloading from a PMS remote. + */ +export type Hints = {}; + +/** + * Subscription preferences. + */ +export type CreateSubscriptionPrefs = {}; + +/** + * Subscription parameters. + * + * @remarks + * - `mediaProviderID`: Required for downloads to indicate which MP the subscription will download into + * - `source`: Required for downloads to indicate the source of the downloaded content. + */ +export type Params = {}; + +export type CreateSubscriptionRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The library section into which we'll grab the media. Not actually required when the subscription is to a playlist. + */ + targetLibrarySectionID?: number | undefined; + /** + * The section location into which to grab. + */ + targetSectionLocationID?: number | undefined; + /** + * The type of the thing we're subscribing too (e.g. show, season). + */ + type?: number | undefined; + /** + * Hints describing what we're looking for. Note: The hint `ratingKey` is required for downloading from a PMS remote. + */ + hints?: Hints | undefined; + /** + * Subscription preferences. + */ + prefs?: CreateSubscriptionPrefs | undefined; + /** + * Subscription parameters. + * + * @remarks + * - `mediaProviderID`: Required for downloads to indicate which MP the subscription will download into + * - `source`: Required for downloads to indicate the source of the downloaded content. + */ + params?: Params | undefined; +}; + +/** + * `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * + * @remarks + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +export type CreateSubscriptionMediaContainer = { + identifier?: string | undefined; + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + * + * @remarks + */ + offset?: number | undefined; + size?: number | undefined; + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + * + * @remarks + */ + totalSize?: number | undefined; + mediaSubscription?: Array | undefined; +}; + +/** + * OK + */ +export type CreateSubscriptionResponseBody = { + mediaContainer?: CreateSubscriptionMediaContainer | undefined; +}; + +export type CreateSubscriptionResponse = { + /** + * 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; + /** + * OK + */ + object?: CreateSubscriptionResponseBody | undefined; + headers: { [k: string]: Array }; +}; + +/** @internal */ +export const CreateSubscriptionGlobals$inboundSchema: z.ZodType< + CreateSubscriptionGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type CreateSubscriptionGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const CreateSubscriptionGlobals$outboundSchema: z.ZodType< + CreateSubscriptionGlobals$Outbound, + z.ZodTypeDef, + CreateSubscriptionGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateSubscriptionGlobals$ { + /** @deprecated use `CreateSubscriptionGlobals$inboundSchema` instead. */ + export const inboundSchema = CreateSubscriptionGlobals$inboundSchema; + /** @deprecated use `CreateSubscriptionGlobals$outboundSchema` instead. */ + export const outboundSchema = CreateSubscriptionGlobals$outboundSchema; + /** @deprecated use `CreateSubscriptionGlobals$Outbound` instead. */ + export type Outbound = CreateSubscriptionGlobals$Outbound; +} + +export function createSubscriptionGlobalsToJSON( + createSubscriptionGlobals: CreateSubscriptionGlobals, +): string { + return JSON.stringify( + CreateSubscriptionGlobals$outboundSchema.parse(createSubscriptionGlobals), + ); +} + +export function createSubscriptionGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateSubscriptionGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateSubscriptionGlobals' from JSON`, + ); +} + +/** @internal */ +export const Hints$inboundSchema: z.ZodType = z + .object({}); + +/** @internal */ +export type Hints$Outbound = {}; + +/** @internal */ +export const Hints$outboundSchema: z.ZodType< + Hints$Outbound, + z.ZodTypeDef, + Hints +> = 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 Hints$ { + /** @deprecated use `Hints$inboundSchema` instead. */ + export const inboundSchema = Hints$inboundSchema; + /** @deprecated use `Hints$outboundSchema` instead. */ + export const outboundSchema = Hints$outboundSchema; + /** @deprecated use `Hints$Outbound` instead. */ + export type Outbound = Hints$Outbound; +} + +export function hintsToJSON(hints: Hints): string { + return JSON.stringify(Hints$outboundSchema.parse(hints)); +} + +export function hintsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Hints$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Hints' from JSON`, + ); +} + +/** @internal */ +export const CreateSubscriptionPrefs$inboundSchema: z.ZodType< + CreateSubscriptionPrefs, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type CreateSubscriptionPrefs$Outbound = {}; + +/** @internal */ +export const CreateSubscriptionPrefs$outboundSchema: z.ZodType< + CreateSubscriptionPrefs$Outbound, + z.ZodTypeDef, + CreateSubscriptionPrefs +> = 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 CreateSubscriptionPrefs$ { + /** @deprecated use `CreateSubscriptionPrefs$inboundSchema` instead. */ + export const inboundSchema = CreateSubscriptionPrefs$inboundSchema; + /** @deprecated use `CreateSubscriptionPrefs$outboundSchema` instead. */ + export const outboundSchema = CreateSubscriptionPrefs$outboundSchema; + /** @deprecated use `CreateSubscriptionPrefs$Outbound` instead. */ + export type Outbound = CreateSubscriptionPrefs$Outbound; +} + +export function createSubscriptionPrefsToJSON( + createSubscriptionPrefs: CreateSubscriptionPrefs, +): string { + return JSON.stringify( + CreateSubscriptionPrefs$outboundSchema.parse(createSubscriptionPrefs), + ); +} + +export function createSubscriptionPrefsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateSubscriptionPrefs$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateSubscriptionPrefs' from JSON`, + ); +} + +/** @internal */ +export const Params$inboundSchema: z.ZodType = z + .object({}); + +/** @internal */ +export type Params$Outbound = {}; + +/** @internal */ +export const Params$outboundSchema: z.ZodType< + Params$Outbound, + z.ZodTypeDef, + Params +> = 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 Params$ { + /** @deprecated use `Params$inboundSchema` instead. */ + export const inboundSchema = Params$inboundSchema; + /** @deprecated use `Params$outboundSchema` instead. */ + export const outboundSchema = Params$outboundSchema; + /** @deprecated use `Params$Outbound` instead. */ + export type Outbound = Params$Outbound; +} + +export function paramsToJSON(params: Params): string { + return JSON.stringify(Params$outboundSchema.parse(params)); +} + +export function paramsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Params$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Params' from JSON`, + ); +} + +/** @internal */ +export const CreateSubscriptionRequest$inboundSchema: z.ZodType< + CreateSubscriptionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + targetLibrarySectionID: z.number().int().optional(), + targetSectionLocationID: z.number().int().optional(), + type: z.number().int().optional(), + hints: z.lazy(() => Hints$inboundSchema).optional(), + prefs: z.lazy(() => CreateSubscriptionPrefs$inboundSchema).optional(), + params: z.lazy(() => Params$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type CreateSubscriptionRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + targetLibrarySectionID?: number | undefined; + targetSectionLocationID?: number | undefined; + type?: number | undefined; + hints?: Hints$Outbound | undefined; + prefs?: CreateSubscriptionPrefs$Outbound | undefined; + params?: Params$Outbound | undefined; +}; + +/** @internal */ +export const CreateSubscriptionRequest$outboundSchema: z.ZodType< + CreateSubscriptionRequest$Outbound, + z.ZodTypeDef, + CreateSubscriptionRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + targetLibrarySectionID: z.number().int().optional(), + targetSectionLocationID: z.number().int().optional(), + type: z.number().int().optional(), + hints: z.lazy(() => Hints$outboundSchema).optional(), + prefs: z.lazy(() => CreateSubscriptionPrefs$outboundSchema).optional(), + params: z.lazy(() => Params$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateSubscriptionRequest$ { + /** @deprecated use `CreateSubscriptionRequest$inboundSchema` instead. */ + export const inboundSchema = CreateSubscriptionRequest$inboundSchema; + /** @deprecated use `CreateSubscriptionRequest$outboundSchema` instead. */ + export const outboundSchema = CreateSubscriptionRequest$outboundSchema; + /** @deprecated use `CreateSubscriptionRequest$Outbound` instead. */ + export type Outbound = CreateSubscriptionRequest$Outbound; +} + +export function createSubscriptionRequestToJSON( + createSubscriptionRequest: CreateSubscriptionRequest, +): string { + return JSON.stringify( + CreateSubscriptionRequest$outboundSchema.parse(createSubscriptionRequest), + ); +} + +export function createSubscriptionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateSubscriptionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateSubscriptionRequest' from JSON`, + ); +} + +/** @internal */ +export const CreateSubscriptionMediaContainer$inboundSchema: z.ZodType< + CreateSubscriptionMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + identifier: z.string().optional(), + offset: z.number().int().optional(), + size: z.number().int().optional(), + totalSize: z.number().int().optional(), + MediaSubscription: z.array(shared.MediaSubscription$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "MediaSubscription": "mediaSubscription", + }); +}); + +/** @internal */ +export type CreateSubscriptionMediaContainer$Outbound = { + identifier?: string | undefined; + offset?: number | undefined; + size?: number | undefined; + totalSize?: number | undefined; + MediaSubscription?: Array | undefined; +}; + +/** @internal */ +export const CreateSubscriptionMediaContainer$outboundSchema: z.ZodType< + CreateSubscriptionMediaContainer$Outbound, + z.ZodTypeDef, + CreateSubscriptionMediaContainer +> = z.object({ + identifier: z.string().optional(), + offset: z.number().int().optional(), + size: z.number().int().optional(), + totalSize: z.number().int().optional(), + mediaSubscription: z.array(shared.MediaSubscription$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaSubscription: "MediaSubscription", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateSubscriptionMediaContainer$ { + /** @deprecated use `CreateSubscriptionMediaContainer$inboundSchema` instead. */ + export const inboundSchema = CreateSubscriptionMediaContainer$inboundSchema; + /** @deprecated use `CreateSubscriptionMediaContainer$outboundSchema` instead. */ + export const outboundSchema = CreateSubscriptionMediaContainer$outboundSchema; + /** @deprecated use `CreateSubscriptionMediaContainer$Outbound` instead. */ + export type Outbound = CreateSubscriptionMediaContainer$Outbound; +} + +export function createSubscriptionMediaContainerToJSON( + createSubscriptionMediaContainer: CreateSubscriptionMediaContainer, +): string { + return JSON.stringify( + CreateSubscriptionMediaContainer$outboundSchema.parse( + createSubscriptionMediaContainer, + ), + ); +} + +export function createSubscriptionMediaContainerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateSubscriptionMediaContainer$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateSubscriptionMediaContainer' from JSON`, + ); +} + +/** @internal */ +export const CreateSubscriptionResponseBody$inboundSchema: z.ZodType< + CreateSubscriptionResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => CreateSubscriptionMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); + +/** @internal */ +export type CreateSubscriptionResponseBody$Outbound = { + MediaContainer?: CreateSubscriptionMediaContainer$Outbound | undefined; +}; + +/** @internal */ +export const CreateSubscriptionResponseBody$outboundSchema: z.ZodType< + CreateSubscriptionResponseBody$Outbound, + z.ZodTypeDef, + CreateSubscriptionResponseBody +> = z.object({ + mediaContainer: z.lazy(() => CreateSubscriptionMediaContainer$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 CreateSubscriptionResponseBody$ { + /** @deprecated use `CreateSubscriptionResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateSubscriptionResponseBody$inboundSchema; + /** @deprecated use `CreateSubscriptionResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreateSubscriptionResponseBody$outboundSchema; + /** @deprecated use `CreateSubscriptionResponseBody$Outbound` instead. */ + export type Outbound = CreateSubscriptionResponseBody$Outbound; +} + +export function createSubscriptionResponseBodyToJSON( + createSubscriptionResponseBody: CreateSubscriptionResponseBody, +): string { + return JSON.stringify( + CreateSubscriptionResponseBody$outboundSchema.parse( + createSubscriptionResponseBody, + ), + ); +} + +export function createSubscriptionResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateSubscriptionResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateSubscriptionResponseBody' from JSON`, + ); +} + +/** @internal */ +export const CreateSubscriptionResponse$inboundSchema: z.ZodType< + CreateSubscriptionResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => CreateSubscriptionResponseBody$inboundSchema).optional(), + Headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "Headers": "headers", + }); +}); + +/** @internal */ +export type CreateSubscriptionResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: CreateSubscriptionResponseBody$Outbound | undefined; + Headers: { [k: string]: Array }; +}; + +/** @internal */ +export const CreateSubscriptionResponse$outboundSchema: z.ZodType< + CreateSubscriptionResponse$Outbound, + z.ZodTypeDef, + CreateSubscriptionResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => CreateSubscriptionResponseBody$outboundSchema) + .optional(), + headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + 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 CreateSubscriptionResponse$ { + /** @deprecated use `CreateSubscriptionResponse$inboundSchema` instead. */ + export const inboundSchema = CreateSubscriptionResponse$inboundSchema; + /** @deprecated use `CreateSubscriptionResponse$outboundSchema` instead. */ + export const outboundSchema = CreateSubscriptionResponse$outboundSchema; + /** @deprecated use `CreateSubscriptionResponse$Outbound` instead. */ + export type Outbound = CreateSubscriptionResponse$Outbound; +} + +export function createSubscriptionResponseToJSON( + createSubscriptionResponse: CreateSubscriptionResponse, +): string { + return JSON.stringify( + CreateSubscriptionResponse$outboundSchema.parse(createSubscriptionResponse), + ); +} + +export function createSubscriptionResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateSubscriptionResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateSubscriptionResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/deletecaches.ts b/src/sdk/models/operations/deletecaches.ts new file mode 100644 index 00000000..e2cac088 --- /dev/null +++ b/src/sdk/models/operations/deletecaches.ts @@ -0,0 +1,98 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteCachesResponse = { + /** + * 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 DeleteCachesResponse$inboundSchema: z.ZodType< + DeleteCachesResponse, + 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 DeleteCachesResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const DeleteCachesResponse$outboundSchema: z.ZodType< + DeleteCachesResponse$Outbound, + z.ZodTypeDef, + DeleteCachesResponse +> = 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 DeleteCachesResponse$ { + /** @deprecated use `DeleteCachesResponse$inboundSchema` instead. */ + export const inboundSchema = DeleteCachesResponse$inboundSchema; + /** @deprecated use `DeleteCachesResponse$outboundSchema` instead. */ + export const outboundSchema = DeleteCachesResponse$outboundSchema; + /** @deprecated use `DeleteCachesResponse$Outbound` instead. */ + export type Outbound = DeleteCachesResponse$Outbound; +} + +export function deleteCachesResponseToJSON( + deleteCachesResponse: DeleteCachesResponse, +): string { + return JSON.stringify( + DeleteCachesResponse$outboundSchema.parse(deleteCachesResponse), + ); +} + +export function deleteCachesResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteCachesResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteCachesResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/deletecollection.ts b/src/sdk/models/operations/deletecollection.ts new file mode 100644 index 00000000..5483fde8 --- /dev/null +++ b/src/sdk/models/operations/deletecollection.ts @@ -0,0 +1,412 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteCollectionGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type DeleteCollectionRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * Section identifier + */ + sectionId: number; + /** + * Collection Id + */ + collectionId: number; +}; + +export type DeleteCollectionResponse = { + /** + * 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 DeleteCollectionGlobals$inboundSchema: z.ZodType< + DeleteCollectionGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteCollectionGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const DeleteCollectionGlobals$outboundSchema: z.ZodType< + DeleteCollectionGlobals$Outbound, + z.ZodTypeDef, + DeleteCollectionGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteCollectionGlobals$ { + /** @deprecated use `DeleteCollectionGlobals$inboundSchema` instead. */ + export const inboundSchema = DeleteCollectionGlobals$inboundSchema; + /** @deprecated use `DeleteCollectionGlobals$outboundSchema` instead. */ + export const outboundSchema = DeleteCollectionGlobals$outboundSchema; + /** @deprecated use `DeleteCollectionGlobals$Outbound` instead. */ + export type Outbound = DeleteCollectionGlobals$Outbound; +} + +export function deleteCollectionGlobalsToJSON( + deleteCollectionGlobals: DeleteCollectionGlobals, +): string { + return JSON.stringify( + DeleteCollectionGlobals$outboundSchema.parse(deleteCollectionGlobals), + ); +} + +export function deleteCollectionGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteCollectionGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteCollectionGlobals' from JSON`, + ); +} + +/** @internal */ +export const DeleteCollectionRequest$inboundSchema: z.ZodType< + DeleteCollectionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + sectionId: z.number().int(), + collectionId: z.number().int(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteCollectionRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + sectionId: number; + collectionId: number; +}; + +/** @internal */ +export const DeleteCollectionRequest$outboundSchema: z.ZodType< + DeleteCollectionRequest$Outbound, + z.ZodTypeDef, + DeleteCollectionRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + sectionId: z.number().int(), + collectionId: z.number().int(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteCollectionRequest$ { + /** @deprecated use `DeleteCollectionRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteCollectionRequest$inboundSchema; + /** @deprecated use `DeleteCollectionRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteCollectionRequest$outboundSchema; + /** @deprecated use `DeleteCollectionRequest$Outbound` instead. */ + export type Outbound = DeleteCollectionRequest$Outbound; +} + +export function deleteCollectionRequestToJSON( + deleteCollectionRequest: DeleteCollectionRequest, +): string { + return JSON.stringify( + DeleteCollectionRequest$outboundSchema.parse(deleteCollectionRequest), + ); +} + +export function deleteCollectionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteCollectionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteCollectionRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteCollectionResponse$inboundSchema: z.ZodType< + DeleteCollectionResponse, + 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 DeleteCollectionResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const DeleteCollectionResponse$outboundSchema: z.ZodType< + DeleteCollectionResponse$Outbound, + z.ZodTypeDef, + DeleteCollectionResponse +> = 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 DeleteCollectionResponse$ { + /** @deprecated use `DeleteCollectionResponse$inboundSchema` instead. */ + export const inboundSchema = DeleteCollectionResponse$inboundSchema; + /** @deprecated use `DeleteCollectionResponse$outboundSchema` instead. */ + export const outboundSchema = DeleteCollectionResponse$outboundSchema; + /** @deprecated use `DeleteCollectionResponse$Outbound` instead. */ + export type Outbound = DeleteCollectionResponse$Outbound; +} + +export function deleteCollectionResponseToJSON( + deleteCollectionResponse: DeleteCollectionResponse, +): string { + return JSON.stringify( + DeleteCollectionResponse$outboundSchema.parse(deleteCollectionResponse), + ); +} + +export function deleteCollectionResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteCollectionResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteCollectionResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/deletecollectionitem.ts b/src/sdk/models/operations/deletecollectionitem.ts new file mode 100644 index 00000000..bc34bc51 --- /dev/null +++ b/src/sdk/models/operations/deletecollectionitem.ts @@ -0,0 +1,432 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type DeleteCollectionItemGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type DeleteCollectionItemRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The collection id + */ + collectionId: number; + /** + * The item to delete + */ + itemId: number; +}; + +export type DeleteCollectionItemResponse = { + /** + * 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; + /** + * OK + */ + mediaContainerWithMetadata?: shared.MediaContainerWithMetadata | undefined; +}; + +/** @internal */ +export const DeleteCollectionItemGlobals$inboundSchema: z.ZodType< + DeleteCollectionItemGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteCollectionItemGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const DeleteCollectionItemGlobals$outboundSchema: z.ZodType< + DeleteCollectionItemGlobals$Outbound, + z.ZodTypeDef, + DeleteCollectionItemGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteCollectionItemGlobals$ { + /** @deprecated use `DeleteCollectionItemGlobals$inboundSchema` instead. */ + export const inboundSchema = DeleteCollectionItemGlobals$inboundSchema; + /** @deprecated use `DeleteCollectionItemGlobals$outboundSchema` instead. */ + export const outboundSchema = DeleteCollectionItemGlobals$outboundSchema; + /** @deprecated use `DeleteCollectionItemGlobals$Outbound` instead. */ + export type Outbound = DeleteCollectionItemGlobals$Outbound; +} + +export function deleteCollectionItemGlobalsToJSON( + deleteCollectionItemGlobals: DeleteCollectionItemGlobals, +): string { + return JSON.stringify( + DeleteCollectionItemGlobals$outboundSchema.parse( + deleteCollectionItemGlobals, + ), + ); +} + +export function deleteCollectionItemGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteCollectionItemGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteCollectionItemGlobals' from JSON`, + ); +} + +/** @internal */ +export const DeleteCollectionItemRequest$inboundSchema: z.ZodType< + DeleteCollectionItemRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + collectionId: z.number().int(), + itemId: z.number().int(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteCollectionItemRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + collectionId: number; + itemId: number; +}; + +/** @internal */ +export const DeleteCollectionItemRequest$outboundSchema: z.ZodType< + DeleteCollectionItemRequest$Outbound, + z.ZodTypeDef, + DeleteCollectionItemRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + collectionId: z.number().int(), + itemId: z.number().int(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteCollectionItemRequest$ { + /** @deprecated use `DeleteCollectionItemRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteCollectionItemRequest$inboundSchema; + /** @deprecated use `DeleteCollectionItemRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteCollectionItemRequest$outboundSchema; + /** @deprecated use `DeleteCollectionItemRequest$Outbound` instead. */ + export type Outbound = DeleteCollectionItemRequest$Outbound; +} + +export function deleteCollectionItemRequestToJSON( + deleteCollectionItemRequest: DeleteCollectionItemRequest, +): string { + return JSON.stringify( + DeleteCollectionItemRequest$outboundSchema.parse( + deleteCollectionItemRequest, + ), + ); +} + +export function deleteCollectionItemRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteCollectionItemRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteCollectionItemRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteCollectionItemResponse$inboundSchema: z.ZodType< + DeleteCollectionItemResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + MediaContainerWithMetadata: shared.MediaContainerWithMetadata$inboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "MediaContainerWithMetadata": "mediaContainerWithMetadata", + }); +}); + +/** @internal */ +export type DeleteCollectionItemResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + MediaContainerWithMetadata?: + | shared.MediaContainerWithMetadata$Outbound + | undefined; +}; + +/** @internal */ +export const DeleteCollectionItemResponse$outboundSchema: z.ZodType< + DeleteCollectionItemResponse$Outbound, + z.ZodTypeDef, + DeleteCollectionItemResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + mediaContainerWithMetadata: shared.MediaContainerWithMetadata$outboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + mediaContainerWithMetadata: "MediaContainerWithMetadata", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteCollectionItemResponse$ { + /** @deprecated use `DeleteCollectionItemResponse$inboundSchema` instead. */ + export const inboundSchema = DeleteCollectionItemResponse$inboundSchema; + /** @deprecated use `DeleteCollectionItemResponse$outboundSchema` instead. */ + export const outboundSchema = DeleteCollectionItemResponse$outboundSchema; + /** @deprecated use `DeleteCollectionItemResponse$Outbound` instead. */ + export type Outbound = DeleteCollectionItemResponse$Outbound; +} + +export function deleteCollectionItemResponseToJSON( + deleteCollectionItemResponse: DeleteCollectionItemResponse, +): string { + return JSON.stringify( + DeleteCollectionItemResponse$outboundSchema.parse( + deleteCollectionItemResponse, + ), + ); +} + +export function deleteCollectionItemResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteCollectionItemResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteCollectionItemResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/deletecustomhub.ts b/src/sdk/models/operations/deletecustomhub.ts new file mode 100644 index 00000000..4cab5ad7 --- /dev/null +++ b/src/sdk/models/operations/deletecustomhub.ts @@ -0,0 +1,412 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteCustomHubGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type DeleteCustomHubRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The section ID for the hubs to change + */ + sectionId: number; + /** + * The identifier of the hub to change + */ + identifier: string; +}; + +export type DeleteCustomHubResponse = { + /** + * 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 DeleteCustomHubGlobals$inboundSchema: z.ZodType< + DeleteCustomHubGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteCustomHubGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const DeleteCustomHubGlobals$outboundSchema: z.ZodType< + DeleteCustomHubGlobals$Outbound, + z.ZodTypeDef, + DeleteCustomHubGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteCustomHubGlobals$ { + /** @deprecated use `DeleteCustomHubGlobals$inboundSchema` instead. */ + export const inboundSchema = DeleteCustomHubGlobals$inboundSchema; + /** @deprecated use `DeleteCustomHubGlobals$outboundSchema` instead. */ + export const outboundSchema = DeleteCustomHubGlobals$outboundSchema; + /** @deprecated use `DeleteCustomHubGlobals$Outbound` instead. */ + export type Outbound = DeleteCustomHubGlobals$Outbound; +} + +export function deleteCustomHubGlobalsToJSON( + deleteCustomHubGlobals: DeleteCustomHubGlobals, +): string { + return JSON.stringify( + DeleteCustomHubGlobals$outboundSchema.parse(deleteCustomHubGlobals), + ); +} + +export function deleteCustomHubGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteCustomHubGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteCustomHubGlobals' from JSON`, + ); +} + +/** @internal */ +export const DeleteCustomHubRequest$inboundSchema: z.ZodType< + DeleteCustomHubRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + sectionId: z.number().int(), + identifier: z.string(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteCustomHubRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + sectionId: number; + identifier: string; +}; + +/** @internal */ +export const DeleteCustomHubRequest$outboundSchema: z.ZodType< + DeleteCustomHubRequest$Outbound, + z.ZodTypeDef, + DeleteCustomHubRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + sectionId: z.number().int(), + identifier: z.string(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteCustomHubRequest$ { + /** @deprecated use `DeleteCustomHubRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteCustomHubRequest$inboundSchema; + /** @deprecated use `DeleteCustomHubRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteCustomHubRequest$outboundSchema; + /** @deprecated use `DeleteCustomHubRequest$Outbound` instead. */ + export type Outbound = DeleteCustomHubRequest$Outbound; +} + +export function deleteCustomHubRequestToJSON( + deleteCustomHubRequest: DeleteCustomHubRequest, +): string { + return JSON.stringify( + DeleteCustomHubRequest$outboundSchema.parse(deleteCustomHubRequest), + ); +} + +export function deleteCustomHubRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteCustomHubRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteCustomHubRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteCustomHubResponse$inboundSchema: z.ZodType< + DeleteCustomHubResponse, + 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 DeleteCustomHubResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const DeleteCustomHubResponse$outboundSchema: z.ZodType< + DeleteCustomHubResponse$Outbound, + z.ZodTypeDef, + DeleteCustomHubResponse +> = 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 DeleteCustomHubResponse$ { + /** @deprecated use `DeleteCustomHubResponse$inboundSchema` instead. */ + export const inboundSchema = DeleteCustomHubResponse$inboundSchema; + /** @deprecated use `DeleteCustomHubResponse$outboundSchema` instead. */ + export const outboundSchema = DeleteCustomHubResponse$outboundSchema; + /** @deprecated use `DeleteCustomHubResponse$Outbound` instead. */ + export type Outbound = DeleteCustomHubResponse$Outbound; +} + +export function deleteCustomHubResponseToJSON( + deleteCustomHubResponse: DeleteCustomHubResponse, +): string { + return JSON.stringify( + DeleteCustomHubResponse$outboundSchema.parse(deleteCustomHubResponse), + ); +} + +export function deleteCustomHubResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteCustomHubResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteCustomHubResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/deletedvr.ts b/src/sdk/models/operations/deletedvr.ts new file mode 100644 index 00000000..965100c3 --- /dev/null +++ b/src/sdk/models/operations/deletedvr.ts @@ -0,0 +1,405 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteDVRGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type DeleteDVRRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The ID of the DVR. + */ + dvrId: number; +}; + +export type DeleteDVRResponse = { + /** + * 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 DeleteDVRGlobals$inboundSchema: z.ZodType< + DeleteDVRGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteDVRGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const DeleteDVRGlobals$outboundSchema: z.ZodType< + DeleteDVRGlobals$Outbound, + z.ZodTypeDef, + DeleteDVRGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteDVRGlobals$ { + /** @deprecated use `DeleteDVRGlobals$inboundSchema` instead. */ + export const inboundSchema = DeleteDVRGlobals$inboundSchema; + /** @deprecated use `DeleteDVRGlobals$outboundSchema` instead. */ + export const outboundSchema = DeleteDVRGlobals$outboundSchema; + /** @deprecated use `DeleteDVRGlobals$Outbound` instead. */ + export type Outbound = DeleteDVRGlobals$Outbound; +} + +export function deleteDVRGlobalsToJSON( + deleteDVRGlobals: DeleteDVRGlobals, +): string { + return JSON.stringify( + DeleteDVRGlobals$outboundSchema.parse(deleteDVRGlobals), + ); +} + +export function deleteDVRGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteDVRGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteDVRGlobals' from JSON`, + ); +} + +/** @internal */ +export const DeleteDVRRequest$inboundSchema: z.ZodType< + DeleteDVRRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + dvrId: z.number().int(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteDVRRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + dvrId: number; +}; + +/** @internal */ +export const DeleteDVRRequest$outboundSchema: z.ZodType< + DeleteDVRRequest$Outbound, + z.ZodTypeDef, + DeleteDVRRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + dvrId: z.number().int(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteDVRRequest$ { + /** @deprecated use `DeleteDVRRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteDVRRequest$inboundSchema; + /** @deprecated use `DeleteDVRRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteDVRRequest$outboundSchema; + /** @deprecated use `DeleteDVRRequest$Outbound` instead. */ + export type Outbound = DeleteDVRRequest$Outbound; +} + +export function deleteDVRRequestToJSON( + deleteDVRRequest: DeleteDVRRequest, +): string { + return JSON.stringify( + DeleteDVRRequest$outboundSchema.parse(deleteDVRRequest), + ); +} + +export function deleteDVRRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteDVRRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteDVRRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteDVRResponse$inboundSchema: z.ZodType< + DeleteDVRResponse, + 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 DeleteDVRResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const DeleteDVRResponse$outboundSchema: z.ZodType< + DeleteDVRResponse$Outbound, + z.ZodTypeDef, + DeleteDVRResponse +> = 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 DeleteDVRResponse$ { + /** @deprecated use `DeleteDVRResponse$inboundSchema` instead. */ + export const inboundSchema = DeleteDVRResponse$inboundSchema; + /** @deprecated use `DeleteDVRResponse$outboundSchema` instead. */ + export const outboundSchema = DeleteDVRResponse$outboundSchema; + /** @deprecated use `DeleteDVRResponse$Outbound` instead. */ + export type Outbound = DeleteDVRResponse$Outbound; +} + +export function deleteDVRResponseToJSON( + deleteDVRResponse: DeleteDVRResponse, +): string { + return JSON.stringify( + DeleteDVRResponse$outboundSchema.parse(deleteDVRResponse), + ); +} + +export function deleteDVRResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteDVRResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteDVRResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/deletehistory.ts b/src/sdk/models/operations/deletehistory.ts new file mode 100644 index 00000000..bbfb9778 --- /dev/null +++ b/src/sdk/models/operations/deletehistory.ts @@ -0,0 +1,421 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type DeleteHistoryGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type DeleteHistoryRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The id of the history item (the `historyKey` from above) + */ + historyId: number; +}; + +export type DeleteHistoryResponse = { + /** + * 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; + /** + * OK + */ + mediaContainer?: shared.MediaContainer | undefined; + headers: { [k: string]: Array }; +}; + +/** @internal */ +export const DeleteHistoryGlobals$inboundSchema: z.ZodType< + DeleteHistoryGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteHistoryGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const DeleteHistoryGlobals$outboundSchema: z.ZodType< + DeleteHistoryGlobals$Outbound, + z.ZodTypeDef, + DeleteHistoryGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteHistoryGlobals$ { + /** @deprecated use `DeleteHistoryGlobals$inboundSchema` instead. */ + export const inboundSchema = DeleteHistoryGlobals$inboundSchema; + /** @deprecated use `DeleteHistoryGlobals$outboundSchema` instead. */ + export const outboundSchema = DeleteHistoryGlobals$outboundSchema; + /** @deprecated use `DeleteHistoryGlobals$Outbound` instead. */ + export type Outbound = DeleteHistoryGlobals$Outbound; +} + +export function deleteHistoryGlobalsToJSON( + deleteHistoryGlobals: DeleteHistoryGlobals, +): string { + return JSON.stringify( + DeleteHistoryGlobals$outboundSchema.parse(deleteHistoryGlobals), + ); +} + +export function deleteHistoryGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteHistoryGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteHistoryGlobals' from JSON`, + ); +} + +/** @internal */ +export const DeleteHistoryRequest$inboundSchema: z.ZodType< + DeleteHistoryRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + historyId: z.number().int(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteHistoryRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + historyId: number; +}; + +/** @internal */ +export const DeleteHistoryRequest$outboundSchema: z.ZodType< + DeleteHistoryRequest$Outbound, + z.ZodTypeDef, + DeleteHistoryRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + historyId: z.number().int(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteHistoryRequest$ { + /** @deprecated use `DeleteHistoryRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteHistoryRequest$inboundSchema; + /** @deprecated use `DeleteHistoryRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteHistoryRequest$outboundSchema; + /** @deprecated use `DeleteHistoryRequest$Outbound` instead. */ + export type Outbound = DeleteHistoryRequest$Outbound; +} + +export function deleteHistoryRequestToJSON( + deleteHistoryRequest: DeleteHistoryRequest, +): string { + return JSON.stringify( + DeleteHistoryRequest$outboundSchema.parse(deleteHistoryRequest), + ); +} + +export function deleteHistoryRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteHistoryRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteHistoryRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteHistoryResponse$inboundSchema: z.ZodType< + DeleteHistoryResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + MediaContainer: shared.MediaContainer$inboundSchema.optional(), + Headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "MediaContainer": "mediaContainer", + "Headers": "headers", + }); +}); + +/** @internal */ +export type DeleteHistoryResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + MediaContainer?: shared.MediaContainer$Outbound | undefined; + Headers: { [k: string]: Array }; +}; + +/** @internal */ +export const DeleteHistoryResponse$outboundSchema: z.ZodType< + DeleteHistoryResponse$Outbound, + z.ZodTypeDef, + DeleteHistoryResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + mediaContainer: shared.MediaContainer$outboundSchema.optional(), + headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + mediaContainer: "MediaContainer", + 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 DeleteHistoryResponse$ { + /** @deprecated use `DeleteHistoryResponse$inboundSchema` instead. */ + export const inboundSchema = DeleteHistoryResponse$inboundSchema; + /** @deprecated use `DeleteHistoryResponse$outboundSchema` instead. */ + export const outboundSchema = DeleteHistoryResponse$outboundSchema; + /** @deprecated use `DeleteHistoryResponse$Outbound` instead. */ + export type Outbound = DeleteHistoryResponse$Outbound; +} + +export function deleteHistoryResponseToJSON( + deleteHistoryResponse: DeleteHistoryResponse, +): string { + return JSON.stringify( + DeleteHistoryResponse$outboundSchema.parse(deleteHistoryResponse), + ); +} + +export function deleteHistoryResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteHistoryResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteHistoryResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/deleteindexes.ts b/src/sdk/models/operations/deleteindexes.ts new file mode 100644 index 00000000..9925d8f8 --- /dev/null +++ b/src/sdk/models/operations/deleteindexes.ts @@ -0,0 +1,405 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteIndexesGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type DeleteIndexesRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * Section identifier + */ + sectionId: number; +}; + +export type DeleteIndexesResponse = { + /** + * 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 DeleteIndexesGlobals$inboundSchema: z.ZodType< + DeleteIndexesGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteIndexesGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const DeleteIndexesGlobals$outboundSchema: z.ZodType< + DeleteIndexesGlobals$Outbound, + z.ZodTypeDef, + DeleteIndexesGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteIndexesGlobals$ { + /** @deprecated use `DeleteIndexesGlobals$inboundSchema` instead. */ + export const inboundSchema = DeleteIndexesGlobals$inboundSchema; + /** @deprecated use `DeleteIndexesGlobals$outboundSchema` instead. */ + export const outboundSchema = DeleteIndexesGlobals$outboundSchema; + /** @deprecated use `DeleteIndexesGlobals$Outbound` instead. */ + export type Outbound = DeleteIndexesGlobals$Outbound; +} + +export function deleteIndexesGlobalsToJSON( + deleteIndexesGlobals: DeleteIndexesGlobals, +): string { + return JSON.stringify( + DeleteIndexesGlobals$outboundSchema.parse(deleteIndexesGlobals), + ); +} + +export function deleteIndexesGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteIndexesGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteIndexesGlobals' from JSON`, + ); +} + +/** @internal */ +export const DeleteIndexesRequest$inboundSchema: z.ZodType< + DeleteIndexesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + sectionId: z.number().int(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteIndexesRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + sectionId: number; +}; + +/** @internal */ +export const DeleteIndexesRequest$outboundSchema: z.ZodType< + DeleteIndexesRequest$Outbound, + z.ZodTypeDef, + DeleteIndexesRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + sectionId: z.number().int(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteIndexesRequest$ { + /** @deprecated use `DeleteIndexesRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteIndexesRequest$inboundSchema; + /** @deprecated use `DeleteIndexesRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteIndexesRequest$outboundSchema; + /** @deprecated use `DeleteIndexesRequest$Outbound` instead. */ + export type Outbound = DeleteIndexesRequest$Outbound; +} + +export function deleteIndexesRequestToJSON( + deleteIndexesRequest: DeleteIndexesRequest, +): string { + return JSON.stringify( + DeleteIndexesRequest$outboundSchema.parse(deleteIndexesRequest), + ); +} + +export function deleteIndexesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteIndexesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteIndexesRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteIndexesResponse$inboundSchema: z.ZodType< + DeleteIndexesResponse, + 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 DeleteIndexesResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const DeleteIndexesResponse$outboundSchema: z.ZodType< + DeleteIndexesResponse$Outbound, + z.ZodTypeDef, + DeleteIndexesResponse +> = 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 DeleteIndexesResponse$ { + /** @deprecated use `DeleteIndexesResponse$inboundSchema` instead. */ + export const inboundSchema = DeleteIndexesResponse$inboundSchema; + /** @deprecated use `DeleteIndexesResponse$outboundSchema` instead. */ + export const outboundSchema = DeleteIndexesResponse$outboundSchema; + /** @deprecated use `DeleteIndexesResponse$Outbound` instead. */ + export type Outbound = DeleteIndexesResponse$Outbound; +} + +export function deleteIndexesResponseToJSON( + deleteIndexesResponse: DeleteIndexesResponse, +): string { + return JSON.stringify( + DeleteIndexesResponse$outboundSchema.parse(deleteIndexesResponse), + ); +} + +export function deleteIndexesResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteIndexesResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteIndexesResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/deleteintros.ts b/src/sdk/models/operations/deleteintros.ts new file mode 100644 index 00000000..29a51d4c --- /dev/null +++ b/src/sdk/models/operations/deleteintros.ts @@ -0,0 +1,405 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteIntrosGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type DeleteIntrosRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * Section identifier + */ + sectionId: number; +}; + +export type DeleteIntrosResponse = { + /** + * 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 DeleteIntrosGlobals$inboundSchema: z.ZodType< + DeleteIntrosGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteIntrosGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const DeleteIntrosGlobals$outboundSchema: z.ZodType< + DeleteIntrosGlobals$Outbound, + z.ZodTypeDef, + DeleteIntrosGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteIntrosGlobals$ { + /** @deprecated use `DeleteIntrosGlobals$inboundSchema` instead. */ + export const inboundSchema = DeleteIntrosGlobals$inboundSchema; + /** @deprecated use `DeleteIntrosGlobals$outboundSchema` instead. */ + export const outboundSchema = DeleteIntrosGlobals$outboundSchema; + /** @deprecated use `DeleteIntrosGlobals$Outbound` instead. */ + export type Outbound = DeleteIntrosGlobals$Outbound; +} + +export function deleteIntrosGlobalsToJSON( + deleteIntrosGlobals: DeleteIntrosGlobals, +): string { + return JSON.stringify( + DeleteIntrosGlobals$outboundSchema.parse(deleteIntrosGlobals), + ); +} + +export function deleteIntrosGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteIntrosGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteIntrosGlobals' from JSON`, + ); +} + +/** @internal */ +export const DeleteIntrosRequest$inboundSchema: z.ZodType< + DeleteIntrosRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + sectionId: z.number().int(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteIntrosRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + sectionId: number; +}; + +/** @internal */ +export const DeleteIntrosRequest$outboundSchema: z.ZodType< + DeleteIntrosRequest$Outbound, + z.ZodTypeDef, + DeleteIntrosRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + sectionId: z.number().int(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteIntrosRequest$ { + /** @deprecated use `DeleteIntrosRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteIntrosRequest$inboundSchema; + /** @deprecated use `DeleteIntrosRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteIntrosRequest$outboundSchema; + /** @deprecated use `DeleteIntrosRequest$Outbound` instead. */ + export type Outbound = DeleteIntrosRequest$Outbound; +} + +export function deleteIntrosRequestToJSON( + deleteIntrosRequest: DeleteIntrosRequest, +): string { + return JSON.stringify( + DeleteIntrosRequest$outboundSchema.parse(deleteIntrosRequest), + ); +} + +export function deleteIntrosRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteIntrosRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteIntrosRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteIntrosResponse$inboundSchema: z.ZodType< + DeleteIntrosResponse, + 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 DeleteIntrosResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const DeleteIntrosResponse$outboundSchema: z.ZodType< + DeleteIntrosResponse$Outbound, + z.ZodTypeDef, + DeleteIntrosResponse +> = 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 DeleteIntrosResponse$ { + /** @deprecated use `DeleteIntrosResponse$inboundSchema` instead. */ + export const inboundSchema = DeleteIntrosResponse$inboundSchema; + /** @deprecated use `DeleteIntrosResponse$outboundSchema` instead. */ + export const outboundSchema = DeleteIntrosResponse$outboundSchema; + /** @deprecated use `DeleteIntrosResponse$Outbound` instead. */ + export type Outbound = DeleteIntrosResponse$Outbound; +} + +export function deleteIntrosResponseToJSON( + deleteIntrosResponse: DeleteIntrosResponse, +): string { + return JSON.stringify( + DeleteIntrosResponse$outboundSchema.parse(deleteIntrosResponse), + ); +} + +export function deleteIntrosResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteIntrosResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteIntrosResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/deletelibrary.ts b/src/sdk/models/operations/deletelibrary.ts deleted file mode 100644 index 933ad843..00000000 --- a/src/sdk/models/operations/deletelibrary.ts +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.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; -}; - -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; -}; - -/** @internal */ -export const DeleteLibraryRequest$inboundSchema: z.ZodType< - DeleteLibraryRequest, - z.ZodTypeDef, - unknown -> = z.object({ - sectionKey: z.number().int(), -}); - -/** @internal */ -export type DeleteLibraryRequest$Outbound = { - sectionKey: number; -}; - -/** @internal */ -export const DeleteLibraryRequest$outboundSchema: z.ZodType< - DeleteLibraryRequest$Outbound, - z.ZodTypeDef, - DeleteLibraryRequest -> = z.object({ - sectionKey: z.number().int(), -}); - -/** - * @internal - * @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; -} - -export function deleteLibraryRequestToJSON( - deleteLibraryRequest: DeleteLibraryRequest, -): string { - return JSON.stringify( - DeleteLibraryRequest$outboundSchema.parse(deleteLibraryRequest), - ); -} - -export function deleteLibraryRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DeleteLibraryRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeleteLibraryRequest' from JSON`, - ); -} - -/** @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", - }); -}); - -/** @internal */ -export type DeleteLibraryResponse$Outbound = { - 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", - }); -}); - -/** - * @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; -} - -export function deleteLibraryResponseToJSON( - deleteLibraryResponse: DeleteLibraryResponse, -): string { - return JSON.stringify( - DeleteLibraryResponse$outboundSchema.parse(deleteLibraryResponse), - ); -} - -export function deleteLibraryResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DeleteLibraryResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeleteLibraryResponse' from JSON`, - ); -} diff --git a/src/sdk/models/operations/deletelibrarysection.ts b/src/sdk/models/operations/deletelibrarysection.ts new file mode 100644 index 00000000..673b033a --- /dev/null +++ b/src/sdk/models/operations/deletelibrarysection.ts @@ -0,0 +1,419 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type DeleteLibrarySectionGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type DeleteLibrarySectionRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The section identifier + */ + sectionId: string; + /** + * If set, response will return an activity with the actual deletion process. Otherwise request will return when deletion is complete + */ + async?: shared.BoolInt | undefined; +}; + +export type DeleteLibrarySectionResponse = { + /** + * 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 DeleteLibrarySectionGlobals$inboundSchema: z.ZodType< + DeleteLibrarySectionGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteLibrarySectionGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const DeleteLibrarySectionGlobals$outboundSchema: z.ZodType< + DeleteLibrarySectionGlobals$Outbound, + z.ZodTypeDef, + DeleteLibrarySectionGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteLibrarySectionGlobals$ { + /** @deprecated use `DeleteLibrarySectionGlobals$inboundSchema` instead. */ + export const inboundSchema = DeleteLibrarySectionGlobals$inboundSchema; + /** @deprecated use `DeleteLibrarySectionGlobals$outboundSchema` instead. */ + export const outboundSchema = DeleteLibrarySectionGlobals$outboundSchema; + /** @deprecated use `DeleteLibrarySectionGlobals$Outbound` instead. */ + export type Outbound = DeleteLibrarySectionGlobals$Outbound; +} + +export function deleteLibrarySectionGlobalsToJSON( + deleteLibrarySectionGlobals: DeleteLibrarySectionGlobals, +): string { + return JSON.stringify( + DeleteLibrarySectionGlobals$outboundSchema.parse( + deleteLibrarySectionGlobals, + ), + ); +} + +export function deleteLibrarySectionGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteLibrarySectionGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteLibrarySectionGlobals' from JSON`, + ); +} + +/** @internal */ +export const DeleteLibrarySectionRequest$inboundSchema: z.ZodType< + DeleteLibrarySectionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + sectionId: z.string(), + async: shared.BoolInt$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteLibrarySectionRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + sectionId: string; + async?: number | undefined; +}; + +/** @internal */ +export const DeleteLibrarySectionRequest$outboundSchema: z.ZodType< + DeleteLibrarySectionRequest$Outbound, + z.ZodTypeDef, + DeleteLibrarySectionRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + sectionId: z.string(), + async: shared.BoolInt$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteLibrarySectionRequest$ { + /** @deprecated use `DeleteLibrarySectionRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteLibrarySectionRequest$inboundSchema; + /** @deprecated use `DeleteLibrarySectionRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteLibrarySectionRequest$outboundSchema; + /** @deprecated use `DeleteLibrarySectionRequest$Outbound` instead. */ + export type Outbound = DeleteLibrarySectionRequest$Outbound; +} + +export function deleteLibrarySectionRequestToJSON( + deleteLibrarySectionRequest: DeleteLibrarySectionRequest, +): string { + return JSON.stringify( + DeleteLibrarySectionRequest$outboundSchema.parse( + deleteLibrarySectionRequest, + ), + ); +} + +export function deleteLibrarySectionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteLibrarySectionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteLibrarySectionRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteLibrarySectionResponse$inboundSchema: z.ZodType< + DeleteLibrarySectionResponse, + 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 DeleteLibrarySectionResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const DeleteLibrarySectionResponse$outboundSchema: z.ZodType< + DeleteLibrarySectionResponse$Outbound, + z.ZodTypeDef, + DeleteLibrarySectionResponse +> = 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 DeleteLibrarySectionResponse$ { + /** @deprecated use `DeleteLibrarySectionResponse$inboundSchema` instead. */ + export const inboundSchema = DeleteLibrarySectionResponse$inboundSchema; + /** @deprecated use `DeleteLibrarySectionResponse$outboundSchema` instead. */ + export const outboundSchema = DeleteLibrarySectionResponse$outboundSchema; + /** @deprecated use `DeleteLibrarySectionResponse$Outbound` instead. */ + export type Outbound = DeleteLibrarySectionResponse$Outbound; +} + +export function deleteLibrarySectionResponseToJSON( + deleteLibrarySectionResponse: DeleteLibrarySectionResponse, +): string { + return JSON.stringify( + DeleteLibrarySectionResponse$outboundSchema.parse( + deleteLibrarySectionResponse, + ), + ); +} + +export function deleteLibrarySectionResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteLibrarySectionResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteLibrarySectionResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/deletelineup.ts b/src/sdk/models/operations/deletelineup.ts new file mode 100644 index 00000000..d0040b05 --- /dev/null +++ b/src/sdk/models/operations/deletelineup.ts @@ -0,0 +1,760 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type DeleteLineupGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type DeleteLineupRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The ID of the DVR. + */ + dvrId: number; + /** + * The lineup to delete + */ + lineup: string; +}; + +/** + * `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * + * @remarks + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +export type DeleteLineupMediaContainerMediaContainer = { + identifier?: string | undefined; + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + * + * @remarks + */ + offset?: number | undefined; + size?: number | undefined; + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + * + * @remarks + */ + totalSize?: number | undefined; + /** + * A status indicator. If present and non-zero, indicates an error + */ + status?: number | undefined; +}; + +export type DeleteLineupDVR = { + device?: Array | undefined; + key?: string | undefined; + language?: string | undefined; + lineup?: string | undefined; + uuid?: string | undefined; +}; + +export type DeleteLineupMediaContainer = { + mediaContainer?: DeleteLineupMediaContainerMediaContainer | undefined; + dvr?: Array | undefined; +}; + +/** + * OK + */ +export type DeleteLineupResponseBody = { + mediaContainer?: DeleteLineupMediaContainer | undefined; +}; + +export type DeleteLineupResponse = { + /** + * 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; + /** + * OK + */ + object?: DeleteLineupResponseBody | undefined; + headers: { [k: string]: Array }; +}; + +/** @internal */ +export const DeleteLineupGlobals$inboundSchema: z.ZodType< + DeleteLineupGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteLineupGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const DeleteLineupGlobals$outboundSchema: z.ZodType< + DeleteLineupGlobals$Outbound, + z.ZodTypeDef, + DeleteLineupGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteLineupGlobals$ { + /** @deprecated use `DeleteLineupGlobals$inboundSchema` instead. */ + export const inboundSchema = DeleteLineupGlobals$inboundSchema; + /** @deprecated use `DeleteLineupGlobals$outboundSchema` instead. */ + export const outboundSchema = DeleteLineupGlobals$outboundSchema; + /** @deprecated use `DeleteLineupGlobals$Outbound` instead. */ + export type Outbound = DeleteLineupGlobals$Outbound; +} + +export function deleteLineupGlobalsToJSON( + deleteLineupGlobals: DeleteLineupGlobals, +): string { + return JSON.stringify( + DeleteLineupGlobals$outboundSchema.parse(deleteLineupGlobals), + ); +} + +export function deleteLineupGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteLineupGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteLineupGlobals' from JSON`, + ); +} + +/** @internal */ +export const DeleteLineupRequest$inboundSchema: z.ZodType< + DeleteLineupRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + dvrId: z.number().int(), + lineup: z.string(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteLineupRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + dvrId: number; + lineup: string; +}; + +/** @internal */ +export const DeleteLineupRequest$outboundSchema: z.ZodType< + DeleteLineupRequest$Outbound, + z.ZodTypeDef, + DeleteLineupRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + dvrId: z.number().int(), + lineup: z.string(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteLineupRequest$ { + /** @deprecated use `DeleteLineupRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteLineupRequest$inboundSchema; + /** @deprecated use `DeleteLineupRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteLineupRequest$outboundSchema; + /** @deprecated use `DeleteLineupRequest$Outbound` instead. */ + export type Outbound = DeleteLineupRequest$Outbound; +} + +export function deleteLineupRequestToJSON( + deleteLineupRequest: DeleteLineupRequest, +): string { + return JSON.stringify( + DeleteLineupRequest$outboundSchema.parse(deleteLineupRequest), + ); +} + +export function deleteLineupRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteLineupRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteLineupRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteLineupMediaContainerMediaContainer$inboundSchema: z.ZodType< + DeleteLineupMediaContainerMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + identifier: z.string().optional(), + offset: z.number().int().optional(), + size: z.number().int().optional(), + totalSize: z.number().int().optional(), + status: z.number().int().optional(), +}); + +/** @internal */ +export type DeleteLineupMediaContainerMediaContainer$Outbound = { + identifier?: string | undefined; + offset?: number | undefined; + size?: number | undefined; + totalSize?: number | undefined; + status?: number | undefined; +}; + +/** @internal */ +export const DeleteLineupMediaContainerMediaContainer$outboundSchema: z.ZodType< + DeleteLineupMediaContainerMediaContainer$Outbound, + z.ZodTypeDef, + DeleteLineupMediaContainerMediaContainer +> = z.object({ + identifier: z.string().optional(), + offset: z.number().int().optional(), + size: z.number().int().optional(), + totalSize: z.number().int().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 DeleteLineupMediaContainerMediaContainer$ { + /** @deprecated use `DeleteLineupMediaContainerMediaContainer$inboundSchema` instead. */ + export const inboundSchema = + DeleteLineupMediaContainerMediaContainer$inboundSchema; + /** @deprecated use `DeleteLineupMediaContainerMediaContainer$outboundSchema` instead. */ + export const outboundSchema = + DeleteLineupMediaContainerMediaContainer$outboundSchema; + /** @deprecated use `DeleteLineupMediaContainerMediaContainer$Outbound` instead. */ + export type Outbound = DeleteLineupMediaContainerMediaContainer$Outbound; +} + +export function deleteLineupMediaContainerMediaContainerToJSON( + deleteLineupMediaContainerMediaContainer: + DeleteLineupMediaContainerMediaContainer, +): string { + return JSON.stringify( + DeleteLineupMediaContainerMediaContainer$outboundSchema.parse( + deleteLineupMediaContainerMediaContainer, + ), + ); +} + +export function deleteLineupMediaContainerMediaContainerFromJSON( + jsonString: string, +): SafeParseResult< + DeleteLineupMediaContainerMediaContainer, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + DeleteLineupMediaContainerMediaContainer$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'DeleteLineupMediaContainerMediaContainer' from JSON`, + ); +} + +/** @internal */ +export const DeleteLineupDVR$inboundSchema: z.ZodType< + DeleteLineupDVR, + z.ZodTypeDef, + unknown +> = z.object({ + Device: z.array(shared.Device$inboundSchema).optional(), + key: z.string().optional(), + language: z.string().optional(), + lineup: z.string().optional(), + uuid: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "Device": "device", + }); +}); + +/** @internal */ +export type DeleteLineupDVR$Outbound = { + Device?: Array | undefined; + key?: string | undefined; + language?: string | undefined; + lineup?: string | undefined; + uuid?: string | undefined; +}; + +/** @internal */ +export const DeleteLineupDVR$outboundSchema: z.ZodType< + DeleteLineupDVR$Outbound, + z.ZodTypeDef, + DeleteLineupDVR +> = z.object({ + device: z.array(shared.Device$outboundSchema).optional(), + key: z.string().optional(), + language: z.string().optional(), + lineup: z.string().optional(), + uuid: z.string().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 DeleteLineupDVR$ { + /** @deprecated use `DeleteLineupDVR$inboundSchema` instead. */ + export const inboundSchema = DeleteLineupDVR$inboundSchema; + /** @deprecated use `DeleteLineupDVR$outboundSchema` instead. */ + export const outboundSchema = DeleteLineupDVR$outboundSchema; + /** @deprecated use `DeleteLineupDVR$Outbound` instead. */ + export type Outbound = DeleteLineupDVR$Outbound; +} + +export function deleteLineupDVRToJSON( + deleteLineupDVR: DeleteLineupDVR, +): string { + return JSON.stringify(DeleteLineupDVR$outboundSchema.parse(deleteLineupDVR)); +} + +export function deleteLineupDVRFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteLineupDVR$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteLineupDVR' from JSON`, + ); +} + +/** @internal */ +export const DeleteLineupMediaContainer$inboundSchema: z.ZodType< + DeleteLineupMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => + DeleteLineupMediaContainerMediaContainer$inboundSchema + ).optional(), + DVR: z.array(z.lazy(() => DeleteLineupDVR$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + "DVR": "dvr", + }); +}); + +/** @internal */ +export type DeleteLineupMediaContainer$Outbound = { + MediaContainer?: + | DeleteLineupMediaContainerMediaContainer$Outbound + | undefined; + DVR?: Array | undefined; +}; + +/** @internal */ +export const DeleteLineupMediaContainer$outboundSchema: z.ZodType< + DeleteLineupMediaContainer$Outbound, + z.ZodTypeDef, + DeleteLineupMediaContainer +> = z.object({ + mediaContainer: z.lazy(() => + DeleteLineupMediaContainerMediaContainer$outboundSchema + ).optional(), + dvr: z.array(z.lazy(() => DeleteLineupDVR$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + dvr: "DVR", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteLineupMediaContainer$ { + /** @deprecated use `DeleteLineupMediaContainer$inboundSchema` instead. */ + export const inboundSchema = DeleteLineupMediaContainer$inboundSchema; + /** @deprecated use `DeleteLineupMediaContainer$outboundSchema` instead. */ + export const outboundSchema = DeleteLineupMediaContainer$outboundSchema; + /** @deprecated use `DeleteLineupMediaContainer$Outbound` instead. */ + export type Outbound = DeleteLineupMediaContainer$Outbound; +} + +export function deleteLineupMediaContainerToJSON( + deleteLineupMediaContainer: DeleteLineupMediaContainer, +): string { + return JSON.stringify( + DeleteLineupMediaContainer$outboundSchema.parse(deleteLineupMediaContainer), + ); +} + +export function deleteLineupMediaContainerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteLineupMediaContainer$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteLineupMediaContainer' from JSON`, + ); +} + +/** @internal */ +export const DeleteLineupResponseBody$inboundSchema: z.ZodType< + DeleteLineupResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => DeleteLineupMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); + +/** @internal */ +export type DeleteLineupResponseBody$Outbound = { + MediaContainer?: DeleteLineupMediaContainer$Outbound | undefined; +}; + +/** @internal */ +export const DeleteLineupResponseBody$outboundSchema: z.ZodType< + DeleteLineupResponseBody$Outbound, + z.ZodTypeDef, + DeleteLineupResponseBody +> = z.object({ + mediaContainer: z.lazy(() => DeleteLineupMediaContainer$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 DeleteLineupResponseBody$ { + /** @deprecated use `DeleteLineupResponseBody$inboundSchema` instead. */ + export const inboundSchema = DeleteLineupResponseBody$inboundSchema; + /** @deprecated use `DeleteLineupResponseBody$outboundSchema` instead. */ + export const outboundSchema = DeleteLineupResponseBody$outboundSchema; + /** @deprecated use `DeleteLineupResponseBody$Outbound` instead. */ + export type Outbound = DeleteLineupResponseBody$Outbound; +} + +export function deleteLineupResponseBodyToJSON( + deleteLineupResponseBody: DeleteLineupResponseBody, +): string { + return JSON.stringify( + DeleteLineupResponseBody$outboundSchema.parse(deleteLineupResponseBody), + ); +} + +export function deleteLineupResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteLineupResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteLineupResponseBody' from JSON`, + ); +} + +/** @internal */ +export const DeleteLineupResponse$inboundSchema: z.ZodType< + DeleteLineupResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => DeleteLineupResponseBody$inboundSchema).optional(), + Headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "Headers": "headers", + }); +}); + +/** @internal */ +export type DeleteLineupResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: DeleteLineupResponseBody$Outbound | undefined; + Headers: { [k: string]: Array }; +}; + +/** @internal */ +export const DeleteLineupResponse$outboundSchema: z.ZodType< + DeleteLineupResponse$Outbound, + z.ZodTypeDef, + DeleteLineupResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => DeleteLineupResponseBody$outboundSchema).optional(), + headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + 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 DeleteLineupResponse$ { + /** @deprecated use `DeleteLineupResponse$inboundSchema` instead. */ + export const inboundSchema = DeleteLineupResponse$inboundSchema; + /** @deprecated use `DeleteLineupResponse$outboundSchema` instead. */ + export const outboundSchema = DeleteLineupResponse$outboundSchema; + /** @deprecated use `DeleteLineupResponse$Outbound` instead. */ + export type Outbound = DeleteLineupResponse$Outbound; +} + +export function deleteLineupResponseToJSON( + deleteLineupResponse: DeleteLineupResponse, +): string { + return JSON.stringify( + DeleteLineupResponse$outboundSchema.parse(deleteLineupResponse), + ); +} + +export function deleteLineupResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteLineupResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteLineupResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/deletemarker.ts b/src/sdk/models/operations/deletemarker.ts new file mode 100644 index 00000000..6cab7cc8 --- /dev/null +++ b/src/sdk/models/operations/deletemarker.ts @@ -0,0 +1,406 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteMarkerGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type DeleteMarkerRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + ids: string; + marker: string; +}; + +export type DeleteMarkerResponse = { + /** + * 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 DeleteMarkerGlobals$inboundSchema: z.ZodType< + DeleteMarkerGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteMarkerGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const DeleteMarkerGlobals$outboundSchema: z.ZodType< + DeleteMarkerGlobals$Outbound, + z.ZodTypeDef, + DeleteMarkerGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteMarkerGlobals$ { + /** @deprecated use `DeleteMarkerGlobals$inboundSchema` instead. */ + export const inboundSchema = DeleteMarkerGlobals$inboundSchema; + /** @deprecated use `DeleteMarkerGlobals$outboundSchema` instead. */ + export const outboundSchema = DeleteMarkerGlobals$outboundSchema; + /** @deprecated use `DeleteMarkerGlobals$Outbound` instead. */ + export type Outbound = DeleteMarkerGlobals$Outbound; +} + +export function deleteMarkerGlobalsToJSON( + deleteMarkerGlobals: DeleteMarkerGlobals, +): string { + return JSON.stringify( + DeleteMarkerGlobals$outboundSchema.parse(deleteMarkerGlobals), + ); +} + +export function deleteMarkerGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteMarkerGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteMarkerGlobals' from JSON`, + ); +} + +/** @internal */ +export const DeleteMarkerRequest$inboundSchema: z.ZodType< + DeleteMarkerRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + ids: z.string(), + marker: z.string(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteMarkerRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + ids: string; + marker: string; +}; + +/** @internal */ +export const DeleteMarkerRequest$outboundSchema: z.ZodType< + DeleteMarkerRequest$Outbound, + z.ZodTypeDef, + DeleteMarkerRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + ids: z.string(), + marker: z.string(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteMarkerRequest$ { + /** @deprecated use `DeleteMarkerRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteMarkerRequest$inboundSchema; + /** @deprecated use `DeleteMarkerRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteMarkerRequest$outboundSchema; + /** @deprecated use `DeleteMarkerRequest$Outbound` instead. */ + export type Outbound = DeleteMarkerRequest$Outbound; +} + +export function deleteMarkerRequestToJSON( + deleteMarkerRequest: DeleteMarkerRequest, +): string { + return JSON.stringify( + DeleteMarkerRequest$outboundSchema.parse(deleteMarkerRequest), + ); +} + +export function deleteMarkerRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteMarkerRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteMarkerRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteMarkerResponse$inboundSchema: z.ZodType< + DeleteMarkerResponse, + 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 DeleteMarkerResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const DeleteMarkerResponse$outboundSchema: z.ZodType< + DeleteMarkerResponse$Outbound, + z.ZodTypeDef, + DeleteMarkerResponse +> = 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 DeleteMarkerResponse$ { + /** @deprecated use `DeleteMarkerResponse$inboundSchema` instead. */ + export const inboundSchema = DeleteMarkerResponse$inboundSchema; + /** @deprecated use `DeleteMarkerResponse$outboundSchema` instead. */ + export const outboundSchema = DeleteMarkerResponse$outboundSchema; + /** @deprecated use `DeleteMarkerResponse$Outbound` instead. */ + export type Outbound = DeleteMarkerResponse$Outbound; +} + +export function deleteMarkerResponseToJSON( + deleteMarkerResponse: DeleteMarkerResponse, +): string { + return JSON.stringify( + DeleteMarkerResponse$outboundSchema.parse(deleteMarkerResponse), + ); +} + +export function deleteMarkerResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteMarkerResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteMarkerResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/deletemediaitem.ts b/src/sdk/models/operations/deletemediaitem.ts new file mode 100644 index 00000000..4a8214d2 --- /dev/null +++ b/src/sdk/models/operations/deletemediaitem.ts @@ -0,0 +1,414 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type DeleteMediaItemGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type DeleteMediaItemRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + ids: string; + mediaItem: string; + /** + * Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false. + */ + proxy?: shared.BoolInt | undefined; +}; + +export type DeleteMediaItemResponse = { + /** + * 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 DeleteMediaItemGlobals$inboundSchema: z.ZodType< + DeleteMediaItemGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteMediaItemGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const DeleteMediaItemGlobals$outboundSchema: z.ZodType< + DeleteMediaItemGlobals$Outbound, + z.ZodTypeDef, + DeleteMediaItemGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteMediaItemGlobals$ { + /** @deprecated use `DeleteMediaItemGlobals$inboundSchema` instead. */ + export const inboundSchema = DeleteMediaItemGlobals$inboundSchema; + /** @deprecated use `DeleteMediaItemGlobals$outboundSchema` instead. */ + export const outboundSchema = DeleteMediaItemGlobals$outboundSchema; + /** @deprecated use `DeleteMediaItemGlobals$Outbound` instead. */ + export type Outbound = DeleteMediaItemGlobals$Outbound; +} + +export function deleteMediaItemGlobalsToJSON( + deleteMediaItemGlobals: DeleteMediaItemGlobals, +): string { + return JSON.stringify( + DeleteMediaItemGlobals$outboundSchema.parse(deleteMediaItemGlobals), + ); +} + +export function deleteMediaItemGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteMediaItemGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteMediaItemGlobals' from JSON`, + ); +} + +/** @internal */ +export const DeleteMediaItemRequest$inboundSchema: z.ZodType< + DeleteMediaItemRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + ids: z.string(), + mediaItem: z.string(), + proxy: shared.BoolInt$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteMediaItemRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + ids: string; + mediaItem: string; + proxy?: number | undefined; +}; + +/** @internal */ +export const DeleteMediaItemRequest$outboundSchema: z.ZodType< + DeleteMediaItemRequest$Outbound, + z.ZodTypeDef, + DeleteMediaItemRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + ids: z.string(), + mediaItem: z.string(), + proxy: shared.BoolInt$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteMediaItemRequest$ { + /** @deprecated use `DeleteMediaItemRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteMediaItemRequest$inboundSchema; + /** @deprecated use `DeleteMediaItemRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteMediaItemRequest$outboundSchema; + /** @deprecated use `DeleteMediaItemRequest$Outbound` instead. */ + export type Outbound = DeleteMediaItemRequest$Outbound; +} + +export function deleteMediaItemRequestToJSON( + deleteMediaItemRequest: DeleteMediaItemRequest, +): string { + return JSON.stringify( + DeleteMediaItemRequest$outboundSchema.parse(deleteMediaItemRequest), + ); +} + +export function deleteMediaItemRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteMediaItemRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteMediaItemRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteMediaItemResponse$inboundSchema: z.ZodType< + DeleteMediaItemResponse, + 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 DeleteMediaItemResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const DeleteMediaItemResponse$outboundSchema: z.ZodType< + DeleteMediaItemResponse$Outbound, + z.ZodTypeDef, + DeleteMediaItemResponse +> = 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 DeleteMediaItemResponse$ { + /** @deprecated use `DeleteMediaItemResponse$inboundSchema` instead. */ + export const inboundSchema = DeleteMediaItemResponse$inboundSchema; + /** @deprecated use `DeleteMediaItemResponse$outboundSchema` instead. */ + export const outboundSchema = DeleteMediaItemResponse$outboundSchema; + /** @deprecated use `DeleteMediaItemResponse$Outbound` instead. */ + export type Outbound = DeleteMediaItemResponse$Outbound; +} + +export function deleteMediaItemResponseToJSON( + deleteMediaItemResponse: DeleteMediaItemResponse, +): string { + return JSON.stringify( + DeleteMediaItemResponse$outboundSchema.parse(deleteMediaItemResponse), + ); +} + +export function deleteMediaItemResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteMediaItemResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteMediaItemResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/deletemediaprovider.ts b/src/sdk/models/operations/deletemediaprovider.ts new file mode 100644 index 00000000..a44e1f88 --- /dev/null +++ b/src/sdk/models/operations/deletemediaprovider.ts @@ -0,0 +1,407 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteMediaProviderGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type DeleteMediaProviderRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The ID of the media provider to delete + */ + provider: string; +}; + +export type DeleteMediaProviderResponse = { + /** + * 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 DeleteMediaProviderGlobals$inboundSchema: z.ZodType< + DeleteMediaProviderGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteMediaProviderGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const DeleteMediaProviderGlobals$outboundSchema: z.ZodType< + DeleteMediaProviderGlobals$Outbound, + z.ZodTypeDef, + DeleteMediaProviderGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteMediaProviderGlobals$ { + /** @deprecated use `DeleteMediaProviderGlobals$inboundSchema` instead. */ + export const inboundSchema = DeleteMediaProviderGlobals$inboundSchema; + /** @deprecated use `DeleteMediaProviderGlobals$outboundSchema` instead. */ + export const outboundSchema = DeleteMediaProviderGlobals$outboundSchema; + /** @deprecated use `DeleteMediaProviderGlobals$Outbound` instead. */ + export type Outbound = DeleteMediaProviderGlobals$Outbound; +} + +export function deleteMediaProviderGlobalsToJSON( + deleteMediaProviderGlobals: DeleteMediaProviderGlobals, +): string { + return JSON.stringify( + DeleteMediaProviderGlobals$outboundSchema.parse(deleteMediaProviderGlobals), + ); +} + +export function deleteMediaProviderGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteMediaProviderGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteMediaProviderGlobals' from JSON`, + ); +} + +/** @internal */ +export const DeleteMediaProviderRequest$inboundSchema: z.ZodType< + DeleteMediaProviderRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + provider: z.string(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteMediaProviderRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + provider: string; +}; + +/** @internal */ +export const DeleteMediaProviderRequest$outboundSchema: z.ZodType< + DeleteMediaProviderRequest$Outbound, + z.ZodTypeDef, + DeleteMediaProviderRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + provider: z.string(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteMediaProviderRequest$ { + /** @deprecated use `DeleteMediaProviderRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteMediaProviderRequest$inboundSchema; + /** @deprecated use `DeleteMediaProviderRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteMediaProviderRequest$outboundSchema; + /** @deprecated use `DeleteMediaProviderRequest$Outbound` instead. */ + export type Outbound = DeleteMediaProviderRequest$Outbound; +} + +export function deleteMediaProviderRequestToJSON( + deleteMediaProviderRequest: DeleteMediaProviderRequest, +): string { + return JSON.stringify( + DeleteMediaProviderRequest$outboundSchema.parse(deleteMediaProviderRequest), + ); +} + +export function deleteMediaProviderRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteMediaProviderRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteMediaProviderRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteMediaProviderResponse$inboundSchema: z.ZodType< + DeleteMediaProviderResponse, + 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 DeleteMediaProviderResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const DeleteMediaProviderResponse$outboundSchema: z.ZodType< + DeleteMediaProviderResponse$Outbound, + z.ZodTypeDef, + DeleteMediaProviderResponse +> = 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 DeleteMediaProviderResponse$ { + /** @deprecated use `DeleteMediaProviderResponse$inboundSchema` instead. */ + export const inboundSchema = DeleteMediaProviderResponse$inboundSchema; + /** @deprecated use `DeleteMediaProviderResponse$outboundSchema` instead. */ + export const outboundSchema = DeleteMediaProviderResponse$outboundSchema; + /** @deprecated use `DeleteMediaProviderResponse$Outbound` instead. */ + export type Outbound = DeleteMediaProviderResponse$Outbound; +} + +export function deleteMediaProviderResponseToJSON( + deleteMediaProviderResponse: DeleteMediaProviderResponse, +): string { + return JSON.stringify( + DeleteMediaProviderResponse$outboundSchema.parse( + deleteMediaProviderResponse, + ), + ); +} + +export function deleteMediaProviderResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteMediaProviderResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteMediaProviderResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/deletemetadataitem.ts b/src/sdk/models/operations/deletemetadataitem.ts new file mode 100644 index 00000000..dfdd4937 --- /dev/null +++ b/src/sdk/models/operations/deletemetadataitem.ts @@ -0,0 +1,410 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type DeleteMetadataItemGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type DeleteMetadataItemRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + ids: string; + /** + * Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false. + */ + proxy?: shared.BoolInt | undefined; +}; + +export type DeleteMetadataItemResponse = { + /** + * 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 DeleteMetadataItemGlobals$inboundSchema: z.ZodType< + DeleteMetadataItemGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteMetadataItemGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const DeleteMetadataItemGlobals$outboundSchema: z.ZodType< + DeleteMetadataItemGlobals$Outbound, + z.ZodTypeDef, + DeleteMetadataItemGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteMetadataItemGlobals$ { + /** @deprecated use `DeleteMetadataItemGlobals$inboundSchema` instead. */ + export const inboundSchema = DeleteMetadataItemGlobals$inboundSchema; + /** @deprecated use `DeleteMetadataItemGlobals$outboundSchema` instead. */ + export const outboundSchema = DeleteMetadataItemGlobals$outboundSchema; + /** @deprecated use `DeleteMetadataItemGlobals$Outbound` instead. */ + export type Outbound = DeleteMetadataItemGlobals$Outbound; +} + +export function deleteMetadataItemGlobalsToJSON( + deleteMetadataItemGlobals: DeleteMetadataItemGlobals, +): string { + return JSON.stringify( + DeleteMetadataItemGlobals$outboundSchema.parse(deleteMetadataItemGlobals), + ); +} + +export function deleteMetadataItemGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteMetadataItemGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteMetadataItemGlobals' from JSON`, + ); +} + +/** @internal */ +export const DeleteMetadataItemRequest$inboundSchema: z.ZodType< + DeleteMetadataItemRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + ids: z.string(), + proxy: shared.BoolInt$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteMetadataItemRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + ids: string; + proxy?: number | undefined; +}; + +/** @internal */ +export const DeleteMetadataItemRequest$outboundSchema: z.ZodType< + DeleteMetadataItemRequest$Outbound, + z.ZodTypeDef, + DeleteMetadataItemRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + ids: z.string(), + proxy: shared.BoolInt$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteMetadataItemRequest$ { + /** @deprecated use `DeleteMetadataItemRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteMetadataItemRequest$inboundSchema; + /** @deprecated use `DeleteMetadataItemRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteMetadataItemRequest$outboundSchema; + /** @deprecated use `DeleteMetadataItemRequest$Outbound` instead. */ + export type Outbound = DeleteMetadataItemRequest$Outbound; +} + +export function deleteMetadataItemRequestToJSON( + deleteMetadataItemRequest: DeleteMetadataItemRequest, +): string { + return JSON.stringify( + DeleteMetadataItemRequest$outboundSchema.parse(deleteMetadataItemRequest), + ); +} + +export function deleteMetadataItemRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteMetadataItemRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteMetadataItemRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteMetadataItemResponse$inboundSchema: z.ZodType< + DeleteMetadataItemResponse, + 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 DeleteMetadataItemResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const DeleteMetadataItemResponse$outboundSchema: z.ZodType< + DeleteMetadataItemResponse$Outbound, + z.ZodTypeDef, + DeleteMetadataItemResponse +> = 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 DeleteMetadataItemResponse$ { + /** @deprecated use `DeleteMetadataItemResponse$inboundSchema` instead. */ + export const inboundSchema = DeleteMetadataItemResponse$inboundSchema; + /** @deprecated use `DeleteMetadataItemResponse$outboundSchema` instead. */ + export const outboundSchema = DeleteMetadataItemResponse$outboundSchema; + /** @deprecated use `DeleteMetadataItemResponse$Outbound` instead. */ + export type Outbound = DeleteMetadataItemResponse$Outbound; +} + +export function deleteMetadataItemResponseToJSON( + deleteMetadataItemResponse: DeleteMetadataItemResponse, +): string { + return JSON.stringify( + DeleteMetadataItemResponse$outboundSchema.parse(deleteMetadataItemResponse), + ); +} + +export function deleteMetadataItemResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteMetadataItemResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteMetadataItemResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/deleteplaylist.ts b/src/sdk/models/operations/deleteplaylist.ts index a400ae6c..b1d7532c 100644 --- a/src/sdk/models/operations/deleteplaylist.ts +++ b/src/sdk/models/operations/deleteplaylist.ts @@ -8,11 +8,94 @@ import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +export type DeletePlaylistGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + export type DeletePlaylistRequest = { /** - * the ID of the playlist + * An opaque identifier unique to the client */ - playlistID: number; + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The ID of the playlist + */ + playlistId: number; }; export type DeletePlaylistResponse = { @@ -30,18 +113,158 @@ export type DeletePlaylistResponse = { rawResponse: Response; }; +/** @internal */ +export const DeletePlaylistGlobals$inboundSchema: z.ZodType< + DeletePlaylistGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeletePlaylistGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const DeletePlaylistGlobals$outboundSchema: z.ZodType< + DeletePlaylistGlobals$Outbound, + z.ZodTypeDef, + DeletePlaylistGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeletePlaylistGlobals$ { + /** @deprecated use `DeletePlaylistGlobals$inboundSchema` instead. */ + export const inboundSchema = DeletePlaylistGlobals$inboundSchema; + /** @deprecated use `DeletePlaylistGlobals$outboundSchema` instead. */ + export const outboundSchema = DeletePlaylistGlobals$outboundSchema; + /** @deprecated use `DeletePlaylistGlobals$Outbound` instead. */ + export type Outbound = DeletePlaylistGlobals$Outbound; +} + +export function deletePlaylistGlobalsToJSON( + deletePlaylistGlobals: DeletePlaylistGlobals, +): string { + return JSON.stringify( + DeletePlaylistGlobals$outboundSchema.parse(deletePlaylistGlobals), + ); +} + +export function deletePlaylistGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeletePlaylistGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeletePlaylistGlobals' from JSON`, + ); +} + /** @internal */ export const DeletePlaylistRequest$inboundSchema: z.ZodType< DeletePlaylistRequest, z.ZodTypeDef, unknown > = z.object({ - playlistID: z.number(), + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + playlistId: z.number().int(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); }); /** @internal */ export type DeletePlaylistRequest$Outbound = { - playlistID: number; + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + playlistId: number; }; /** @internal */ @@ -50,7 +273,30 @@ export const DeletePlaylistRequest$outboundSchema: z.ZodType< z.ZodTypeDef, DeletePlaylistRequest > = z.object({ - playlistID: z.number(), + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + playlistId: z.number().int(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); }); /** diff --git a/src/sdk/models/operations/deleteplaylistitem.ts b/src/sdk/models/operations/deleteplaylistitem.ts new file mode 100644 index 00000000..a14086f2 --- /dev/null +++ b/src/sdk/models/operations/deleteplaylistitem.ts @@ -0,0 +1,428 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type DeletePlaylistItemGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type DeletePlaylistItemRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The ID of the playlist + */ + playlistId: number; + /** + * The generator item ID to delete. + */ + generatorId: number; +}; + +export type DeletePlaylistItemResponse = { + /** + * 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; + /** + * OK + */ + mediaContainerWithPlaylistMetadata?: + | shared.MediaContainerWithPlaylistMetadata + | undefined; +}; + +/** @internal */ +export const DeletePlaylistItemGlobals$inboundSchema: z.ZodType< + DeletePlaylistItemGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeletePlaylistItemGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const DeletePlaylistItemGlobals$outboundSchema: z.ZodType< + DeletePlaylistItemGlobals$Outbound, + z.ZodTypeDef, + DeletePlaylistItemGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeletePlaylistItemGlobals$ { + /** @deprecated use `DeletePlaylistItemGlobals$inboundSchema` instead. */ + export const inboundSchema = DeletePlaylistItemGlobals$inboundSchema; + /** @deprecated use `DeletePlaylistItemGlobals$outboundSchema` instead. */ + export const outboundSchema = DeletePlaylistItemGlobals$outboundSchema; + /** @deprecated use `DeletePlaylistItemGlobals$Outbound` instead. */ + export type Outbound = DeletePlaylistItemGlobals$Outbound; +} + +export function deletePlaylistItemGlobalsToJSON( + deletePlaylistItemGlobals: DeletePlaylistItemGlobals, +): string { + return JSON.stringify( + DeletePlaylistItemGlobals$outboundSchema.parse(deletePlaylistItemGlobals), + ); +} + +export function deletePlaylistItemGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeletePlaylistItemGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeletePlaylistItemGlobals' from JSON`, + ); +} + +/** @internal */ +export const DeletePlaylistItemRequest$inboundSchema: z.ZodType< + DeletePlaylistItemRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + playlistId: z.number().int(), + generatorId: z.number().int(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeletePlaylistItemRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + playlistId: number; + generatorId: number; +}; + +/** @internal */ +export const DeletePlaylistItemRequest$outboundSchema: z.ZodType< + DeletePlaylistItemRequest$Outbound, + z.ZodTypeDef, + DeletePlaylistItemRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + playlistId: z.number().int(), + generatorId: z.number().int(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeletePlaylistItemRequest$ { + /** @deprecated use `DeletePlaylistItemRequest$inboundSchema` instead. */ + export const inboundSchema = DeletePlaylistItemRequest$inboundSchema; + /** @deprecated use `DeletePlaylistItemRequest$outboundSchema` instead. */ + export const outboundSchema = DeletePlaylistItemRequest$outboundSchema; + /** @deprecated use `DeletePlaylistItemRequest$Outbound` instead. */ + export type Outbound = DeletePlaylistItemRequest$Outbound; +} + +export function deletePlaylistItemRequestToJSON( + deletePlaylistItemRequest: DeletePlaylistItemRequest, +): string { + return JSON.stringify( + DeletePlaylistItemRequest$outboundSchema.parse(deletePlaylistItemRequest), + ); +} + +export function deletePlaylistItemRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeletePlaylistItemRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeletePlaylistItemRequest' from JSON`, + ); +} + +/** @internal */ +export const DeletePlaylistItemResponse$inboundSchema: z.ZodType< + DeletePlaylistItemResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + MediaContainerWithPlaylistMetadata: shared + .MediaContainerWithPlaylistMetadata$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "MediaContainerWithPlaylistMetadata": "mediaContainerWithPlaylistMetadata", + }); +}); + +/** @internal */ +export type DeletePlaylistItemResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + MediaContainerWithPlaylistMetadata?: + | shared.MediaContainerWithPlaylistMetadata$Outbound + | undefined; +}; + +/** @internal */ +export const DeletePlaylistItemResponse$outboundSchema: z.ZodType< + DeletePlaylistItemResponse$Outbound, + z.ZodTypeDef, + DeletePlaylistItemResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + mediaContainerWithPlaylistMetadata: shared + .MediaContainerWithPlaylistMetadata$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + mediaContainerWithPlaylistMetadata: "MediaContainerWithPlaylistMetadata", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeletePlaylistItemResponse$ { + /** @deprecated use `DeletePlaylistItemResponse$inboundSchema` instead. */ + export const inboundSchema = DeletePlaylistItemResponse$inboundSchema; + /** @deprecated use `DeletePlaylistItemResponse$outboundSchema` instead. */ + export const outboundSchema = DeletePlaylistItemResponse$outboundSchema; + /** @deprecated use `DeletePlaylistItemResponse$Outbound` instead. */ + export type Outbound = DeletePlaylistItemResponse$Outbound; +} + +export function deletePlaylistItemResponseToJSON( + deletePlaylistItemResponse: DeletePlaylistItemResponse, +): string { + return JSON.stringify( + DeletePlaylistItemResponse$outboundSchema.parse(deletePlaylistItemResponse), + ); +} + +export function deletePlaylistItemResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeletePlaylistItemResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeletePlaylistItemResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/deleteplayqueueitem.ts b/src/sdk/models/operations/deleteplayqueueitem.ts new file mode 100644 index 00000000..2136f383 --- /dev/null +++ b/src/sdk/models/operations/deleteplayqueueitem.ts @@ -0,0 +1,430 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type DeletePlayQueueItemGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type DeletePlayQueueItemRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The ID of the play queue. + */ + playQueueId: number; + /** + * The play queue item ID to delete. + */ + playQueueItemId: number; +}; + +export type DeletePlayQueueItemResponse = { + /** + * 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; + /** + * OK + */ + mediaContainerWithPlaylistMetadata?: + | shared.MediaContainerWithPlaylistMetadata + | undefined; +}; + +/** @internal */ +export const DeletePlayQueueItemGlobals$inboundSchema: z.ZodType< + DeletePlayQueueItemGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeletePlayQueueItemGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const DeletePlayQueueItemGlobals$outboundSchema: z.ZodType< + DeletePlayQueueItemGlobals$Outbound, + z.ZodTypeDef, + DeletePlayQueueItemGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeletePlayQueueItemGlobals$ { + /** @deprecated use `DeletePlayQueueItemGlobals$inboundSchema` instead. */ + export const inboundSchema = DeletePlayQueueItemGlobals$inboundSchema; + /** @deprecated use `DeletePlayQueueItemGlobals$outboundSchema` instead. */ + export const outboundSchema = DeletePlayQueueItemGlobals$outboundSchema; + /** @deprecated use `DeletePlayQueueItemGlobals$Outbound` instead. */ + export type Outbound = DeletePlayQueueItemGlobals$Outbound; +} + +export function deletePlayQueueItemGlobalsToJSON( + deletePlayQueueItemGlobals: DeletePlayQueueItemGlobals, +): string { + return JSON.stringify( + DeletePlayQueueItemGlobals$outboundSchema.parse(deletePlayQueueItemGlobals), + ); +} + +export function deletePlayQueueItemGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeletePlayQueueItemGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeletePlayQueueItemGlobals' from JSON`, + ); +} + +/** @internal */ +export const DeletePlayQueueItemRequest$inboundSchema: z.ZodType< + DeletePlayQueueItemRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + playQueueId: z.number().int(), + playQueueItemId: z.number().int(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeletePlayQueueItemRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + playQueueId: number; + playQueueItemId: number; +}; + +/** @internal */ +export const DeletePlayQueueItemRequest$outboundSchema: z.ZodType< + DeletePlayQueueItemRequest$Outbound, + z.ZodTypeDef, + DeletePlayQueueItemRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + playQueueId: z.number().int(), + playQueueItemId: z.number().int(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeletePlayQueueItemRequest$ { + /** @deprecated use `DeletePlayQueueItemRequest$inboundSchema` instead. */ + export const inboundSchema = DeletePlayQueueItemRequest$inboundSchema; + /** @deprecated use `DeletePlayQueueItemRequest$outboundSchema` instead. */ + export const outboundSchema = DeletePlayQueueItemRequest$outboundSchema; + /** @deprecated use `DeletePlayQueueItemRequest$Outbound` instead. */ + export type Outbound = DeletePlayQueueItemRequest$Outbound; +} + +export function deletePlayQueueItemRequestToJSON( + deletePlayQueueItemRequest: DeletePlayQueueItemRequest, +): string { + return JSON.stringify( + DeletePlayQueueItemRequest$outboundSchema.parse(deletePlayQueueItemRequest), + ); +} + +export function deletePlayQueueItemRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeletePlayQueueItemRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeletePlayQueueItemRequest' from JSON`, + ); +} + +/** @internal */ +export const DeletePlayQueueItemResponse$inboundSchema: z.ZodType< + DeletePlayQueueItemResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + MediaContainerWithPlaylistMetadata: shared + .MediaContainerWithPlaylistMetadata$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "MediaContainerWithPlaylistMetadata": "mediaContainerWithPlaylistMetadata", + }); +}); + +/** @internal */ +export type DeletePlayQueueItemResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + MediaContainerWithPlaylistMetadata?: + | shared.MediaContainerWithPlaylistMetadata$Outbound + | undefined; +}; + +/** @internal */ +export const DeletePlayQueueItemResponse$outboundSchema: z.ZodType< + DeletePlayQueueItemResponse$Outbound, + z.ZodTypeDef, + DeletePlayQueueItemResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + mediaContainerWithPlaylistMetadata: shared + .MediaContainerWithPlaylistMetadata$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + mediaContainerWithPlaylistMetadata: "MediaContainerWithPlaylistMetadata", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeletePlayQueueItemResponse$ { + /** @deprecated use `DeletePlayQueueItemResponse$inboundSchema` instead. */ + export const inboundSchema = DeletePlayQueueItemResponse$inboundSchema; + /** @deprecated use `DeletePlayQueueItemResponse$outboundSchema` instead. */ + export const outboundSchema = DeletePlayQueueItemResponse$outboundSchema; + /** @deprecated use `DeletePlayQueueItemResponse$Outbound` instead. */ + export type Outbound = DeletePlayQueueItemResponse$Outbound; +} + +export function deletePlayQueueItemResponseToJSON( + deletePlayQueueItemResponse: DeletePlayQueueItemResponse, +): string { + return JSON.stringify( + DeletePlayQueueItemResponse$outboundSchema.parse( + deletePlayQueueItemResponse, + ), + ); +} + +export function deletePlayQueueItemResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeletePlayQueueItemResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeletePlayQueueItemResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/deletestream.ts b/src/sdk/models/operations/deletestream.ts new file mode 100644 index 00000000..cc88e11e --- /dev/null +++ b/src/sdk/models/operations/deletestream.ts @@ -0,0 +1,412 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteStreamGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type DeleteStreamRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The id of the stream + */ + streamId: number; + /** + * This is not a part of this endpoint but documented here to satisfy OpenAPI + */ + ext: string; +}; + +export type DeleteStreamResponse = { + /** + * 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 DeleteStreamGlobals$inboundSchema: z.ZodType< + DeleteStreamGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteStreamGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const DeleteStreamGlobals$outboundSchema: z.ZodType< + DeleteStreamGlobals$Outbound, + z.ZodTypeDef, + DeleteStreamGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteStreamGlobals$ { + /** @deprecated use `DeleteStreamGlobals$inboundSchema` instead. */ + export const inboundSchema = DeleteStreamGlobals$inboundSchema; + /** @deprecated use `DeleteStreamGlobals$outboundSchema` instead. */ + export const outboundSchema = DeleteStreamGlobals$outboundSchema; + /** @deprecated use `DeleteStreamGlobals$Outbound` instead. */ + export type Outbound = DeleteStreamGlobals$Outbound; +} + +export function deleteStreamGlobalsToJSON( + deleteStreamGlobals: DeleteStreamGlobals, +): string { + return JSON.stringify( + DeleteStreamGlobals$outboundSchema.parse(deleteStreamGlobals), + ); +} + +export function deleteStreamGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteStreamGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteStreamGlobals' from JSON`, + ); +} + +/** @internal */ +export const DeleteStreamRequest$inboundSchema: z.ZodType< + DeleteStreamRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + streamId: z.number().int(), + ext: z.string(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteStreamRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + streamId: number; + ext: string; +}; + +/** @internal */ +export const DeleteStreamRequest$outboundSchema: z.ZodType< + DeleteStreamRequest$Outbound, + z.ZodTypeDef, + DeleteStreamRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + streamId: z.number().int(), + ext: z.string(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteStreamRequest$ { + /** @deprecated use `DeleteStreamRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteStreamRequest$inboundSchema; + /** @deprecated use `DeleteStreamRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteStreamRequest$outboundSchema; + /** @deprecated use `DeleteStreamRequest$Outbound` instead. */ + export type Outbound = DeleteStreamRequest$Outbound; +} + +export function deleteStreamRequestToJSON( + deleteStreamRequest: DeleteStreamRequest, +): string { + return JSON.stringify( + DeleteStreamRequest$outboundSchema.parse(deleteStreamRequest), + ); +} + +export function deleteStreamRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteStreamRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteStreamRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteStreamResponse$inboundSchema: z.ZodType< + DeleteStreamResponse, + 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 DeleteStreamResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const DeleteStreamResponse$outboundSchema: z.ZodType< + DeleteStreamResponse$Outbound, + z.ZodTypeDef, + DeleteStreamResponse +> = 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 DeleteStreamResponse$ { + /** @deprecated use `DeleteStreamResponse$inboundSchema` instead. */ + export const inboundSchema = DeleteStreamResponse$inboundSchema; + /** @deprecated use `DeleteStreamResponse$outboundSchema` instead. */ + export const outboundSchema = DeleteStreamResponse$outboundSchema; + /** @deprecated use `DeleteStreamResponse$Outbound` instead. */ + export type Outbound = DeleteStreamResponse$Outbound; +} + +export function deleteStreamResponseToJSON( + deleteStreamResponse: DeleteStreamResponse, +): string { + return JSON.stringify( + DeleteStreamResponse$outboundSchema.parse(deleteStreamResponse), + ); +} + +export function deleteStreamResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteStreamResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteStreamResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/deletesubscription.ts b/src/sdk/models/operations/deletesubscription.ts new file mode 100644 index 00000000..8bfb61b8 --- /dev/null +++ b/src/sdk/models/operations/deletesubscription.ts @@ -0,0 +1,402 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteSubscriptionGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type DeleteSubscriptionRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + subscriptionId: number; +}; + +export type DeleteSubscriptionResponse = { + /** + * 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 DeleteSubscriptionGlobals$inboundSchema: z.ZodType< + DeleteSubscriptionGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteSubscriptionGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const DeleteSubscriptionGlobals$outboundSchema: z.ZodType< + DeleteSubscriptionGlobals$Outbound, + z.ZodTypeDef, + DeleteSubscriptionGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteSubscriptionGlobals$ { + /** @deprecated use `DeleteSubscriptionGlobals$inboundSchema` instead. */ + export const inboundSchema = DeleteSubscriptionGlobals$inboundSchema; + /** @deprecated use `DeleteSubscriptionGlobals$outboundSchema` instead. */ + export const outboundSchema = DeleteSubscriptionGlobals$outboundSchema; + /** @deprecated use `DeleteSubscriptionGlobals$Outbound` instead. */ + export type Outbound = DeleteSubscriptionGlobals$Outbound; +} + +export function deleteSubscriptionGlobalsToJSON( + deleteSubscriptionGlobals: DeleteSubscriptionGlobals, +): string { + return JSON.stringify( + DeleteSubscriptionGlobals$outboundSchema.parse(deleteSubscriptionGlobals), + ); +} + +export function deleteSubscriptionGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteSubscriptionGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteSubscriptionGlobals' from JSON`, + ); +} + +/** @internal */ +export const DeleteSubscriptionRequest$inboundSchema: z.ZodType< + DeleteSubscriptionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + subscriptionId: z.number().int(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DeleteSubscriptionRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + subscriptionId: number; +}; + +/** @internal */ +export const DeleteSubscriptionRequest$outboundSchema: z.ZodType< + DeleteSubscriptionRequest$Outbound, + z.ZodTypeDef, + DeleteSubscriptionRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + subscriptionId: z.number().int(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteSubscriptionRequest$ { + /** @deprecated use `DeleteSubscriptionRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteSubscriptionRequest$inboundSchema; + /** @deprecated use `DeleteSubscriptionRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteSubscriptionRequest$outboundSchema; + /** @deprecated use `DeleteSubscriptionRequest$Outbound` instead. */ + export type Outbound = DeleteSubscriptionRequest$Outbound; +} + +export function deleteSubscriptionRequestToJSON( + deleteSubscriptionRequest: DeleteSubscriptionRequest, +): string { + return JSON.stringify( + DeleteSubscriptionRequest$outboundSchema.parse(deleteSubscriptionRequest), + ); +} + +export function deleteSubscriptionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteSubscriptionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteSubscriptionRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteSubscriptionResponse$inboundSchema: z.ZodType< + DeleteSubscriptionResponse, + 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 DeleteSubscriptionResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const DeleteSubscriptionResponse$outboundSchema: z.ZodType< + DeleteSubscriptionResponse$Outbound, + z.ZodTypeDef, + DeleteSubscriptionResponse +> = 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 DeleteSubscriptionResponse$ { + /** @deprecated use `DeleteSubscriptionResponse$inboundSchema` instead. */ + export const inboundSchema = DeleteSubscriptionResponse$inboundSchema; + /** @deprecated use `DeleteSubscriptionResponse$outboundSchema` instead. */ + export const outboundSchema = DeleteSubscriptionResponse$outboundSchema; + /** @deprecated use `DeleteSubscriptionResponse$Outbound` instead. */ + export type Outbound = DeleteSubscriptionResponse$Outbound; +} + +export function deleteSubscriptionResponseToJSON( + deleteSubscriptionResponse: DeleteSubscriptionResponse, +): string { + return JSON.stringify( + DeleteSubscriptionResponse$outboundSchema.parse(deleteSubscriptionResponse), + ); +} + +export function deleteSubscriptionResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteSubscriptionResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteSubscriptionResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/detectads.ts b/src/sdk/models/operations/detectads.ts new file mode 100644 index 00000000..b5ccc96b --- /dev/null +++ b/src/sdk/models/operations/detectads.ts @@ -0,0 +1,402 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DetectAdsGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type DetectAdsRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + ids: string; +}; + +export type DetectAdsResponse = { + /** + * 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 DetectAdsGlobals$inboundSchema: z.ZodType< + DetectAdsGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DetectAdsGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const DetectAdsGlobals$outboundSchema: z.ZodType< + DetectAdsGlobals$Outbound, + z.ZodTypeDef, + DetectAdsGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DetectAdsGlobals$ { + /** @deprecated use `DetectAdsGlobals$inboundSchema` instead. */ + export const inboundSchema = DetectAdsGlobals$inboundSchema; + /** @deprecated use `DetectAdsGlobals$outboundSchema` instead. */ + export const outboundSchema = DetectAdsGlobals$outboundSchema; + /** @deprecated use `DetectAdsGlobals$Outbound` instead. */ + export type Outbound = DetectAdsGlobals$Outbound; +} + +export function detectAdsGlobalsToJSON( + detectAdsGlobals: DetectAdsGlobals, +): string { + return JSON.stringify( + DetectAdsGlobals$outboundSchema.parse(detectAdsGlobals), + ); +} + +export function detectAdsGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DetectAdsGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DetectAdsGlobals' from JSON`, + ); +} + +/** @internal */ +export const DetectAdsRequest$inboundSchema: z.ZodType< + DetectAdsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + ids: z.string(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DetectAdsRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + ids: string; +}; + +/** @internal */ +export const DetectAdsRequest$outboundSchema: z.ZodType< + DetectAdsRequest$Outbound, + z.ZodTypeDef, + DetectAdsRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + ids: z.string(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DetectAdsRequest$ { + /** @deprecated use `DetectAdsRequest$inboundSchema` instead. */ + export const inboundSchema = DetectAdsRequest$inboundSchema; + /** @deprecated use `DetectAdsRequest$outboundSchema` instead. */ + export const outboundSchema = DetectAdsRequest$outboundSchema; + /** @deprecated use `DetectAdsRequest$Outbound` instead. */ + export type Outbound = DetectAdsRequest$Outbound; +} + +export function detectAdsRequestToJSON( + detectAdsRequest: DetectAdsRequest, +): string { + return JSON.stringify( + DetectAdsRequest$outboundSchema.parse(detectAdsRequest), + ); +} + +export function detectAdsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DetectAdsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DetectAdsRequest' from JSON`, + ); +} + +/** @internal */ +export const DetectAdsResponse$inboundSchema: z.ZodType< + DetectAdsResponse, + 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 DetectAdsResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const DetectAdsResponse$outboundSchema: z.ZodType< + DetectAdsResponse$Outbound, + z.ZodTypeDef, + DetectAdsResponse +> = 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 DetectAdsResponse$ { + /** @deprecated use `DetectAdsResponse$inboundSchema` instead. */ + export const inboundSchema = DetectAdsResponse$inboundSchema; + /** @deprecated use `DetectAdsResponse$outboundSchema` instead. */ + export const outboundSchema = DetectAdsResponse$outboundSchema; + /** @deprecated use `DetectAdsResponse$Outbound` instead. */ + export type Outbound = DetectAdsResponse$Outbound; +} + +export function detectAdsResponseToJSON( + detectAdsResponse: DetectAdsResponse, +): string { + return JSON.stringify( + DetectAdsResponse$outboundSchema.parse(detectAdsResponse), + ); +} + +export function detectAdsResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DetectAdsResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DetectAdsResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/detectcredits.ts b/src/sdk/models/operations/detectcredits.ts new file mode 100644 index 00000000..f37ed070 --- /dev/null +++ b/src/sdk/models/operations/detectcredits.ts @@ -0,0 +1,411 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type DetectCreditsGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type DetectCreditsRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + ids: string; + force?: shared.BoolInt | undefined; + manual?: shared.BoolInt | undefined; +}; + +export type DetectCreditsResponse = { + /** + * 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 DetectCreditsGlobals$inboundSchema: z.ZodType< + DetectCreditsGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DetectCreditsGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const DetectCreditsGlobals$outboundSchema: z.ZodType< + DetectCreditsGlobals$Outbound, + z.ZodTypeDef, + DetectCreditsGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DetectCreditsGlobals$ { + /** @deprecated use `DetectCreditsGlobals$inboundSchema` instead. */ + export const inboundSchema = DetectCreditsGlobals$inboundSchema; + /** @deprecated use `DetectCreditsGlobals$outboundSchema` instead. */ + export const outboundSchema = DetectCreditsGlobals$outboundSchema; + /** @deprecated use `DetectCreditsGlobals$Outbound` instead. */ + export type Outbound = DetectCreditsGlobals$Outbound; +} + +export function detectCreditsGlobalsToJSON( + detectCreditsGlobals: DetectCreditsGlobals, +): string { + return JSON.stringify( + DetectCreditsGlobals$outboundSchema.parse(detectCreditsGlobals), + ); +} + +export function detectCreditsGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DetectCreditsGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DetectCreditsGlobals' from JSON`, + ); +} + +/** @internal */ +export const DetectCreditsRequest$inboundSchema: z.ZodType< + DetectCreditsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + ids: z.string(), + force: shared.BoolInt$inboundSchema.optional(), + manual: shared.BoolInt$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DetectCreditsRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + ids: string; + force?: number | undefined; + manual?: number | undefined; +}; + +/** @internal */ +export const DetectCreditsRequest$outboundSchema: z.ZodType< + DetectCreditsRequest$Outbound, + z.ZodTypeDef, + DetectCreditsRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + ids: z.string(), + force: shared.BoolInt$outboundSchema.optional(), + manual: shared.BoolInt$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DetectCreditsRequest$ { + /** @deprecated use `DetectCreditsRequest$inboundSchema` instead. */ + export const inboundSchema = DetectCreditsRequest$inboundSchema; + /** @deprecated use `DetectCreditsRequest$outboundSchema` instead. */ + export const outboundSchema = DetectCreditsRequest$outboundSchema; + /** @deprecated use `DetectCreditsRequest$Outbound` instead. */ + export type Outbound = DetectCreditsRequest$Outbound; +} + +export function detectCreditsRequestToJSON( + detectCreditsRequest: DetectCreditsRequest, +): string { + return JSON.stringify( + DetectCreditsRequest$outboundSchema.parse(detectCreditsRequest), + ); +} + +export function detectCreditsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DetectCreditsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DetectCreditsRequest' from JSON`, + ); +} + +/** @internal */ +export const DetectCreditsResponse$inboundSchema: z.ZodType< + DetectCreditsResponse, + 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 DetectCreditsResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const DetectCreditsResponse$outboundSchema: z.ZodType< + DetectCreditsResponse$Outbound, + z.ZodTypeDef, + DetectCreditsResponse +> = 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 DetectCreditsResponse$ { + /** @deprecated use `DetectCreditsResponse$inboundSchema` instead. */ + export const inboundSchema = DetectCreditsResponse$inboundSchema; + /** @deprecated use `DetectCreditsResponse$outboundSchema` instead. */ + export const outboundSchema = DetectCreditsResponse$outboundSchema; + /** @deprecated use `DetectCreditsResponse$Outbound` instead. */ + export type Outbound = DetectCreditsResponse$Outbound; +} + +export function detectCreditsResponseToJSON( + detectCreditsResponse: DetectCreditsResponse, +): string { + return JSON.stringify( + DetectCreditsResponse$outboundSchema.parse(detectCreditsResponse), + ); +} + +export function detectCreditsResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DetectCreditsResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DetectCreditsResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/detectintros.ts b/src/sdk/models/operations/detectintros.ts new file mode 100644 index 00000000..d287955e --- /dev/null +++ b/src/sdk/models/operations/detectintros.ts @@ -0,0 +1,417 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type DetectIntrosGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type DetectIntrosRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + ids: string; + /** + * Indicate whether detection should be re-run + */ + force?: shared.BoolInt | undefined; + /** + * The threshold for determining if content is an intro or not + */ + threshold?: number | undefined; +}; + +export type DetectIntrosResponse = { + /** + * 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 DetectIntrosGlobals$inboundSchema: z.ZodType< + DetectIntrosGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DetectIntrosGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const DetectIntrosGlobals$outboundSchema: z.ZodType< + DetectIntrosGlobals$Outbound, + z.ZodTypeDef, + DetectIntrosGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DetectIntrosGlobals$ { + /** @deprecated use `DetectIntrosGlobals$inboundSchema` instead. */ + export const inboundSchema = DetectIntrosGlobals$inboundSchema; + /** @deprecated use `DetectIntrosGlobals$outboundSchema` instead. */ + export const outboundSchema = DetectIntrosGlobals$outboundSchema; + /** @deprecated use `DetectIntrosGlobals$Outbound` instead. */ + export type Outbound = DetectIntrosGlobals$Outbound; +} + +export function detectIntrosGlobalsToJSON( + detectIntrosGlobals: DetectIntrosGlobals, +): string { + return JSON.stringify( + DetectIntrosGlobals$outboundSchema.parse(detectIntrosGlobals), + ); +} + +export function detectIntrosGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DetectIntrosGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DetectIntrosGlobals' from JSON`, + ); +} + +/** @internal */ +export const DetectIntrosRequest$inboundSchema: z.ZodType< + DetectIntrosRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + ids: z.string(), + force: shared.BoolInt$inboundSchema.optional(), + threshold: z.number().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DetectIntrosRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + ids: string; + force?: number | undefined; + threshold?: number | undefined; +}; + +/** @internal */ +export const DetectIntrosRequest$outboundSchema: z.ZodType< + DetectIntrosRequest$Outbound, + z.ZodTypeDef, + DetectIntrosRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + ids: z.string(), + force: shared.BoolInt$outboundSchema.optional(), + threshold: z.number().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DetectIntrosRequest$ { + /** @deprecated use `DetectIntrosRequest$inboundSchema` instead. */ + export const inboundSchema = DetectIntrosRequest$inboundSchema; + /** @deprecated use `DetectIntrosRequest$outboundSchema` instead. */ + export const outboundSchema = DetectIntrosRequest$outboundSchema; + /** @deprecated use `DetectIntrosRequest$Outbound` instead. */ + export type Outbound = DetectIntrosRequest$Outbound; +} + +export function detectIntrosRequestToJSON( + detectIntrosRequest: DetectIntrosRequest, +): string { + return JSON.stringify( + DetectIntrosRequest$outboundSchema.parse(detectIntrosRequest), + ); +} + +export function detectIntrosRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DetectIntrosRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DetectIntrosRequest' from JSON`, + ); +} + +/** @internal */ +export const DetectIntrosResponse$inboundSchema: z.ZodType< + DetectIntrosResponse, + 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 DetectIntrosResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const DetectIntrosResponse$outboundSchema: z.ZodType< + DetectIntrosResponse$Outbound, + z.ZodTypeDef, + DetectIntrosResponse +> = 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 DetectIntrosResponse$ { + /** @deprecated use `DetectIntrosResponse$inboundSchema` instead. */ + export const inboundSchema = DetectIntrosResponse$inboundSchema; + /** @deprecated use `DetectIntrosResponse$outboundSchema` instead. */ + export const outboundSchema = DetectIntrosResponse$outboundSchema; + /** @deprecated use `DetectIntrosResponse$Outbound` instead. */ + export type Outbound = DetectIntrosResponse$Outbound; +} + +export function detectIntrosResponseToJSON( + detectIntrosResponse: DetectIntrosResponse, +): string { + return JSON.stringify( + DetectIntrosResponse$outboundSchema.parse(detectIntrosResponse), + ); +} + +export function detectIntrosResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DetectIntrosResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DetectIntrosResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/detectvoiceactivity.ts b/src/sdk/models/operations/detectvoiceactivity.ts new file mode 100644 index 00000000..87466f63 --- /dev/null +++ b/src/sdk/models/operations/detectvoiceactivity.ts @@ -0,0 +1,419 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type DetectVoiceActivityGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type DetectVoiceActivityRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + ids: string; + /** + * Indicate whether detection should be re-run + */ + force?: shared.BoolInt | undefined; + /** + * Indicate whether detection is manually run + */ + manual?: shared.BoolInt | undefined; +}; + +export type DetectVoiceActivityResponse = { + /** + * 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 DetectVoiceActivityGlobals$inboundSchema: z.ZodType< + DetectVoiceActivityGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DetectVoiceActivityGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const DetectVoiceActivityGlobals$outboundSchema: z.ZodType< + DetectVoiceActivityGlobals$Outbound, + z.ZodTypeDef, + DetectVoiceActivityGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DetectVoiceActivityGlobals$ { + /** @deprecated use `DetectVoiceActivityGlobals$inboundSchema` instead. */ + export const inboundSchema = DetectVoiceActivityGlobals$inboundSchema; + /** @deprecated use `DetectVoiceActivityGlobals$outboundSchema` instead. */ + export const outboundSchema = DetectVoiceActivityGlobals$outboundSchema; + /** @deprecated use `DetectVoiceActivityGlobals$Outbound` instead. */ + export type Outbound = DetectVoiceActivityGlobals$Outbound; +} + +export function detectVoiceActivityGlobalsToJSON( + detectVoiceActivityGlobals: DetectVoiceActivityGlobals, +): string { + return JSON.stringify( + DetectVoiceActivityGlobals$outboundSchema.parse(detectVoiceActivityGlobals), + ); +} + +export function detectVoiceActivityGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DetectVoiceActivityGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DetectVoiceActivityGlobals' from JSON`, + ); +} + +/** @internal */ +export const DetectVoiceActivityRequest$inboundSchema: z.ZodType< + DetectVoiceActivityRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + ids: z.string(), + force: shared.BoolInt$inboundSchema.optional(), + manual: shared.BoolInt$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type DetectVoiceActivityRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + ids: string; + force?: number | undefined; + manual?: number | undefined; +}; + +/** @internal */ +export const DetectVoiceActivityRequest$outboundSchema: z.ZodType< + DetectVoiceActivityRequest$Outbound, + z.ZodTypeDef, + DetectVoiceActivityRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + ids: z.string(), + force: shared.BoolInt$outboundSchema.optional(), + manual: shared.BoolInt$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DetectVoiceActivityRequest$ { + /** @deprecated use `DetectVoiceActivityRequest$inboundSchema` instead. */ + export const inboundSchema = DetectVoiceActivityRequest$inboundSchema; + /** @deprecated use `DetectVoiceActivityRequest$outboundSchema` instead. */ + export const outboundSchema = DetectVoiceActivityRequest$outboundSchema; + /** @deprecated use `DetectVoiceActivityRequest$Outbound` instead. */ + export type Outbound = DetectVoiceActivityRequest$Outbound; +} + +export function detectVoiceActivityRequestToJSON( + detectVoiceActivityRequest: DetectVoiceActivityRequest, +): string { + return JSON.stringify( + DetectVoiceActivityRequest$outboundSchema.parse(detectVoiceActivityRequest), + ); +} + +export function detectVoiceActivityRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DetectVoiceActivityRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DetectVoiceActivityRequest' from JSON`, + ); +} + +/** @internal */ +export const DetectVoiceActivityResponse$inboundSchema: z.ZodType< + DetectVoiceActivityResponse, + 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 DetectVoiceActivityResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const DetectVoiceActivityResponse$outboundSchema: z.ZodType< + DetectVoiceActivityResponse$Outbound, + z.ZodTypeDef, + DetectVoiceActivityResponse +> = 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 DetectVoiceActivityResponse$ { + /** @deprecated use `DetectVoiceActivityResponse$inboundSchema` instead. */ + export const inboundSchema = DetectVoiceActivityResponse$inboundSchema; + /** @deprecated use `DetectVoiceActivityResponse$outboundSchema` instead. */ + export const outboundSchema = DetectVoiceActivityResponse$outboundSchema; + /** @deprecated use `DetectVoiceActivityResponse$Outbound` instead. */ + export type Outbound = DetectVoiceActivityResponse$Outbound; +} + +export function detectVoiceActivityResponseToJSON( + detectVoiceActivityResponse: DetectVoiceActivityResponse, +): string { + return JSON.stringify( + DetectVoiceActivityResponse$outboundSchema.parse( + detectVoiceActivityResponse, + ), + ); +} + +export function detectVoiceActivityResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DetectVoiceActivityResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DetectVoiceActivityResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/discoverdevices.ts b/src/sdk/models/operations/discoverdevices.ts new file mode 100644 index 00000000..82e07967 --- /dev/null +++ b/src/sdk/models/operations/discoverdevices.ts @@ -0,0 +1,112 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type DiscoverDevicesResponse = { + /** + * 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; + /** + * OK + */ + mediaContainerWithDevice?: shared.MediaContainerWithDevice | undefined; +}; + +/** @internal */ +export const DiscoverDevicesResponse$inboundSchema: z.ZodType< + DiscoverDevicesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + MediaContainerWithDevice: shared.MediaContainerWithDevice$inboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "MediaContainerWithDevice": "mediaContainerWithDevice", + }); +}); + +/** @internal */ +export type DiscoverDevicesResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + MediaContainerWithDevice?: + | shared.MediaContainerWithDevice$Outbound + | undefined; +}; + +/** @internal */ +export const DiscoverDevicesResponse$outboundSchema: z.ZodType< + DiscoverDevicesResponse$Outbound, + z.ZodTypeDef, + DiscoverDevicesResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + mediaContainerWithDevice: shared.MediaContainerWithDevice$outboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + mediaContainerWithDevice: "MediaContainerWithDevice", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DiscoverDevicesResponse$ { + /** @deprecated use `DiscoverDevicesResponse$inboundSchema` instead. */ + export const inboundSchema = DiscoverDevicesResponse$inboundSchema; + /** @deprecated use `DiscoverDevicesResponse$outboundSchema` instead. */ + export const outboundSchema = DiscoverDevicesResponse$outboundSchema; + /** @deprecated use `DiscoverDevicesResponse$Outbound` instead. */ + export type Outbound = DiscoverDevicesResponse$Outbound; +} + +export function discoverDevicesResponseToJSON( + discoverDevicesResponse: DiscoverDevicesResponse, +): string { + return JSON.stringify( + DiscoverDevicesResponse$outboundSchema.parse(discoverDevicesResponse), + ); +} + +export function discoverDevicesResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DiscoverDevicesResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DiscoverDevicesResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/editmarker.ts b/src/sdk/models/operations/editmarker.ts new file mode 100644 index 00000000..181fabbf --- /dev/null +++ b/src/sdk/models/operations/editmarker.ts @@ -0,0 +1,500 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type EditMarkerGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +/** + * The attributes to assign to this marker + */ +export type EditMarkerAttributes = {}; + +export type EditMarkerRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + ids: string; + /** + * The id of the marker to edit + */ + marker: string; + /** + * The type of marker to edit/create + */ + type: number; + /** + * The start time of the marker + */ + startTimeOffset: number; + /** + * The end time of the marker + */ + endTimeOffset?: number | undefined; + /** + * The attributes to assign to this marker + */ + attributes?: EditMarkerAttributes | undefined; +}; + +export type EditMarkerResponse = { + /** + * 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; + /** + * OK + */ + postResponses200?: shared.PostResponses200 | undefined; +}; + +/** @internal */ +export const EditMarkerGlobals$inboundSchema: z.ZodType< + EditMarkerGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type EditMarkerGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const EditMarkerGlobals$outboundSchema: z.ZodType< + EditMarkerGlobals$Outbound, + z.ZodTypeDef, + EditMarkerGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EditMarkerGlobals$ { + /** @deprecated use `EditMarkerGlobals$inboundSchema` instead. */ + export const inboundSchema = EditMarkerGlobals$inboundSchema; + /** @deprecated use `EditMarkerGlobals$outboundSchema` instead. */ + export const outboundSchema = EditMarkerGlobals$outboundSchema; + /** @deprecated use `EditMarkerGlobals$Outbound` instead. */ + export type Outbound = EditMarkerGlobals$Outbound; +} + +export function editMarkerGlobalsToJSON( + editMarkerGlobals: EditMarkerGlobals, +): string { + return JSON.stringify( + EditMarkerGlobals$outboundSchema.parse(editMarkerGlobals), + ); +} + +export function editMarkerGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EditMarkerGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EditMarkerGlobals' from JSON`, + ); +} + +/** @internal */ +export const EditMarkerAttributes$inboundSchema: z.ZodType< + EditMarkerAttributes, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type EditMarkerAttributes$Outbound = {}; + +/** @internal */ +export const EditMarkerAttributes$outboundSchema: z.ZodType< + EditMarkerAttributes$Outbound, + z.ZodTypeDef, + EditMarkerAttributes +> = 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 EditMarkerAttributes$ { + /** @deprecated use `EditMarkerAttributes$inboundSchema` instead. */ + export const inboundSchema = EditMarkerAttributes$inboundSchema; + /** @deprecated use `EditMarkerAttributes$outboundSchema` instead. */ + export const outboundSchema = EditMarkerAttributes$outboundSchema; + /** @deprecated use `EditMarkerAttributes$Outbound` instead. */ + export type Outbound = EditMarkerAttributes$Outbound; +} + +export function editMarkerAttributesToJSON( + editMarkerAttributes: EditMarkerAttributes, +): string { + return JSON.stringify( + EditMarkerAttributes$outboundSchema.parse(editMarkerAttributes), + ); +} + +export function editMarkerAttributesFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EditMarkerAttributes$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EditMarkerAttributes' from JSON`, + ); +} + +/** @internal */ +export const EditMarkerRequest$inboundSchema: z.ZodType< + EditMarkerRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + ids: z.string(), + marker: z.string(), + type: z.number().int(), + startTimeOffset: z.number().int(), + endTimeOffset: z.number().int().optional(), + attributes: z.lazy(() => EditMarkerAttributes$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type EditMarkerRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + ids: string; + marker: string; + type: number; + startTimeOffset: number; + endTimeOffset?: number | undefined; + attributes?: EditMarkerAttributes$Outbound | undefined; +}; + +/** @internal */ +export const EditMarkerRequest$outboundSchema: z.ZodType< + EditMarkerRequest$Outbound, + z.ZodTypeDef, + EditMarkerRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + ids: z.string(), + marker: z.string(), + type: z.number().int(), + startTimeOffset: z.number().int(), + endTimeOffset: z.number().int().optional(), + attributes: z.lazy(() => EditMarkerAttributes$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EditMarkerRequest$ { + /** @deprecated use `EditMarkerRequest$inboundSchema` instead. */ + export const inboundSchema = EditMarkerRequest$inboundSchema; + /** @deprecated use `EditMarkerRequest$outboundSchema` instead. */ + export const outboundSchema = EditMarkerRequest$outboundSchema; + /** @deprecated use `EditMarkerRequest$Outbound` instead. */ + export type Outbound = EditMarkerRequest$Outbound; +} + +export function editMarkerRequestToJSON( + editMarkerRequest: EditMarkerRequest, +): string { + return JSON.stringify( + EditMarkerRequest$outboundSchema.parse(editMarkerRequest), + ); +} + +export function editMarkerRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EditMarkerRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EditMarkerRequest' from JSON`, + ); +} + +/** @internal */ +export const EditMarkerResponse$inboundSchema: z.ZodType< + EditMarkerResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + "post-responses-200": shared.PostResponses200$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "post-responses-200": "postResponses200", + }); +}); + +/** @internal */ +export type EditMarkerResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + "post-responses-200"?: shared.PostResponses200$Outbound | undefined; +}; + +/** @internal */ +export const EditMarkerResponse$outboundSchema: z.ZodType< + EditMarkerResponse$Outbound, + z.ZodTypeDef, + EditMarkerResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + postResponses200: shared.PostResponses200$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + postResponses200: "post-responses-200", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EditMarkerResponse$ { + /** @deprecated use `EditMarkerResponse$inboundSchema` instead. */ + export const inboundSchema = EditMarkerResponse$inboundSchema; + /** @deprecated use `EditMarkerResponse$outboundSchema` instead. */ + export const outboundSchema = EditMarkerResponse$outboundSchema; + /** @deprecated use `EditMarkerResponse$Outbound` instead. */ + export type Outbound = EditMarkerResponse$Outbound; +} + +export function editMarkerResponseToJSON( + editMarkerResponse: EditMarkerResponse, +): string { + return JSON.stringify( + EditMarkerResponse$outboundSchema.parse(editMarkerResponse), + ); +} + +export function editMarkerResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EditMarkerResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EditMarkerResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/editmetadataitem.ts b/src/sdk/models/operations/editmetadataitem.ts new file mode 100644 index 00000000..21be1af9 --- /dev/null +++ b/src/sdk/models/operations/editmetadataitem.ts @@ -0,0 +1,462 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type EditMetadataItemGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +/** + * The new values for the metadata item + */ +export type EditMetadataItemArgs = {}; + +export type EditMetadataItemRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + ids: Array; + /** + * The new values for the metadata item + */ + args?: EditMetadataItemArgs | undefined; +}; + +export type EditMetadataItemResponse = { + /** + * 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 EditMetadataItemGlobals$inboundSchema: z.ZodType< + EditMetadataItemGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type EditMetadataItemGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const EditMetadataItemGlobals$outboundSchema: z.ZodType< + EditMetadataItemGlobals$Outbound, + z.ZodTypeDef, + EditMetadataItemGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EditMetadataItemGlobals$ { + /** @deprecated use `EditMetadataItemGlobals$inboundSchema` instead. */ + export const inboundSchema = EditMetadataItemGlobals$inboundSchema; + /** @deprecated use `EditMetadataItemGlobals$outboundSchema` instead. */ + export const outboundSchema = EditMetadataItemGlobals$outboundSchema; + /** @deprecated use `EditMetadataItemGlobals$Outbound` instead. */ + export type Outbound = EditMetadataItemGlobals$Outbound; +} + +export function editMetadataItemGlobalsToJSON( + editMetadataItemGlobals: EditMetadataItemGlobals, +): string { + return JSON.stringify( + EditMetadataItemGlobals$outboundSchema.parse(editMetadataItemGlobals), + ); +} + +export function editMetadataItemGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EditMetadataItemGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EditMetadataItemGlobals' from JSON`, + ); +} + +/** @internal */ +export const EditMetadataItemArgs$inboundSchema: z.ZodType< + EditMetadataItemArgs, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type EditMetadataItemArgs$Outbound = {}; + +/** @internal */ +export const EditMetadataItemArgs$outboundSchema: z.ZodType< + EditMetadataItemArgs$Outbound, + z.ZodTypeDef, + EditMetadataItemArgs +> = 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 EditMetadataItemArgs$ { + /** @deprecated use `EditMetadataItemArgs$inboundSchema` instead. */ + export const inboundSchema = EditMetadataItemArgs$inboundSchema; + /** @deprecated use `EditMetadataItemArgs$outboundSchema` instead. */ + export const outboundSchema = EditMetadataItemArgs$outboundSchema; + /** @deprecated use `EditMetadataItemArgs$Outbound` instead. */ + export type Outbound = EditMetadataItemArgs$Outbound; +} + +export function editMetadataItemArgsToJSON( + editMetadataItemArgs: EditMetadataItemArgs, +): string { + return JSON.stringify( + EditMetadataItemArgs$outboundSchema.parse(editMetadataItemArgs), + ); +} + +export function editMetadataItemArgsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EditMetadataItemArgs$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EditMetadataItemArgs' from JSON`, + ); +} + +/** @internal */ +export const EditMetadataItemRequest$inboundSchema: z.ZodType< + EditMetadataItemRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + ids: z.array(z.string()), + args: z.lazy(() => EditMetadataItemArgs$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type EditMetadataItemRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + ids: Array; + args?: EditMetadataItemArgs$Outbound | undefined; +}; + +/** @internal */ +export const EditMetadataItemRequest$outboundSchema: z.ZodType< + EditMetadataItemRequest$Outbound, + z.ZodTypeDef, + EditMetadataItemRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + ids: z.array(z.string()), + args: z.lazy(() => EditMetadataItemArgs$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EditMetadataItemRequest$ { + /** @deprecated use `EditMetadataItemRequest$inboundSchema` instead. */ + export const inboundSchema = EditMetadataItemRequest$inboundSchema; + /** @deprecated use `EditMetadataItemRequest$outboundSchema` instead. */ + export const outboundSchema = EditMetadataItemRequest$outboundSchema; + /** @deprecated use `EditMetadataItemRequest$Outbound` instead. */ + export type Outbound = EditMetadataItemRequest$Outbound; +} + +export function editMetadataItemRequestToJSON( + editMetadataItemRequest: EditMetadataItemRequest, +): string { + return JSON.stringify( + EditMetadataItemRequest$outboundSchema.parse(editMetadataItemRequest), + ); +} + +export function editMetadataItemRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EditMetadataItemRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EditMetadataItemRequest' from JSON`, + ); +} + +/** @internal */ +export const EditMetadataItemResponse$inboundSchema: z.ZodType< + EditMetadataItemResponse, + 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 EditMetadataItemResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const EditMetadataItemResponse$outboundSchema: z.ZodType< + EditMetadataItemResponse$Outbound, + z.ZodTypeDef, + EditMetadataItemResponse +> = 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 EditMetadataItemResponse$ { + /** @deprecated use `EditMetadataItemResponse$inboundSchema` instead. */ + export const inboundSchema = EditMetadataItemResponse$inboundSchema; + /** @deprecated use `EditMetadataItemResponse$outboundSchema` instead. */ + export const outboundSchema = EditMetadataItemResponse$outboundSchema; + /** @deprecated use `EditMetadataItemResponse$Outbound` instead. */ + export type Outbound = EditMetadataItemResponse$Outbound; +} + +export function editMetadataItemResponseToJSON( + editMetadataItemResponse: EditMetadataItemResponse, +): string { + return JSON.stringify( + EditMetadataItemResponse$outboundSchema.parse(editMetadataItemResponse), + ); +} + +export function editMetadataItemResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EditMetadataItemResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EditMetadataItemResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/editsection.ts b/src/sdk/models/operations/editsection.ts new file mode 100644 index 00000000..c30df925 --- /dev/null +++ b/src/sdk/models/operations/editsection.ts @@ -0,0 +1,507 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type EditSectionGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +/** + * The preferences for this section + */ +export type EditSectionPrefs = {}; + +export type EditSectionRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The section identifier + */ + sectionId: string; + /** + * The name of the new section + */ + name?: string | undefined; + /** + * The scanner this section should use + */ + scanner?: string | undefined; + /** + * The agent this section should use for metadata + */ + agent: string; + /** + * The agent group id for this section + */ + metadataAgentProviderGroupId?: string | undefined; + /** + * The language of this section + */ + language?: string | undefined; + /** + * The locations on disk to add to this section + */ + locations?: Array | undefined; + /** + * The preferences for this section + */ + prefs?: EditSectionPrefs | undefined; +}; + +export type EditSectionResponse = { + /** + * 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 EditSectionGlobals$inboundSchema: z.ZodType< + EditSectionGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type EditSectionGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const EditSectionGlobals$outboundSchema: z.ZodType< + EditSectionGlobals$Outbound, + z.ZodTypeDef, + EditSectionGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EditSectionGlobals$ { + /** @deprecated use `EditSectionGlobals$inboundSchema` instead. */ + export const inboundSchema = EditSectionGlobals$inboundSchema; + /** @deprecated use `EditSectionGlobals$outboundSchema` instead. */ + export const outboundSchema = EditSectionGlobals$outboundSchema; + /** @deprecated use `EditSectionGlobals$Outbound` instead. */ + export type Outbound = EditSectionGlobals$Outbound; +} + +export function editSectionGlobalsToJSON( + editSectionGlobals: EditSectionGlobals, +): string { + return JSON.stringify( + EditSectionGlobals$outboundSchema.parse(editSectionGlobals), + ); +} + +export function editSectionGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EditSectionGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EditSectionGlobals' from JSON`, + ); +} + +/** @internal */ +export const EditSectionPrefs$inboundSchema: z.ZodType< + EditSectionPrefs, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type EditSectionPrefs$Outbound = {}; + +/** @internal */ +export const EditSectionPrefs$outboundSchema: z.ZodType< + EditSectionPrefs$Outbound, + z.ZodTypeDef, + EditSectionPrefs +> = 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 EditSectionPrefs$ { + /** @deprecated use `EditSectionPrefs$inboundSchema` instead. */ + export const inboundSchema = EditSectionPrefs$inboundSchema; + /** @deprecated use `EditSectionPrefs$outboundSchema` instead. */ + export const outboundSchema = EditSectionPrefs$outboundSchema; + /** @deprecated use `EditSectionPrefs$Outbound` instead. */ + export type Outbound = EditSectionPrefs$Outbound; +} + +export function editSectionPrefsToJSON( + editSectionPrefs: EditSectionPrefs, +): string { + return JSON.stringify( + EditSectionPrefs$outboundSchema.parse(editSectionPrefs), + ); +} + +export function editSectionPrefsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EditSectionPrefs$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EditSectionPrefs' from JSON`, + ); +} + +/** @internal */ +export const EditSectionRequest$inboundSchema: z.ZodType< + EditSectionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + sectionId: z.string(), + name: z.string().optional(), + scanner: z.string().optional(), + agent: z.string(), + metadataAgentProviderGroupId: z.string().optional(), + language: z.string().optional(), + locations: z.array(z.string()).optional(), + prefs: z.lazy(() => EditSectionPrefs$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type EditSectionRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + sectionId: string; + name?: string | undefined; + scanner?: string | undefined; + agent: string; + metadataAgentProviderGroupId?: string | undefined; + language?: string | undefined; + locations?: Array | undefined; + prefs?: EditSectionPrefs$Outbound | undefined; +}; + +/** @internal */ +export const EditSectionRequest$outboundSchema: z.ZodType< + EditSectionRequest$Outbound, + z.ZodTypeDef, + EditSectionRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + sectionId: z.string(), + name: z.string().optional(), + scanner: z.string().optional(), + agent: z.string(), + metadataAgentProviderGroupId: z.string().optional(), + language: z.string().optional(), + locations: z.array(z.string()).optional(), + prefs: z.lazy(() => EditSectionPrefs$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EditSectionRequest$ { + /** @deprecated use `EditSectionRequest$inboundSchema` instead. */ + export const inboundSchema = EditSectionRequest$inboundSchema; + /** @deprecated use `EditSectionRequest$outboundSchema` instead. */ + export const outboundSchema = EditSectionRequest$outboundSchema; + /** @deprecated use `EditSectionRequest$Outbound` instead. */ + export type Outbound = EditSectionRequest$Outbound; +} + +export function editSectionRequestToJSON( + editSectionRequest: EditSectionRequest, +): string { + return JSON.stringify( + EditSectionRequest$outboundSchema.parse(editSectionRequest), + ); +} + +export function editSectionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EditSectionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EditSectionRequest' from JSON`, + ); +} + +/** @internal */ +export const EditSectionResponse$inboundSchema: z.ZodType< + EditSectionResponse, + 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 EditSectionResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const EditSectionResponse$outboundSchema: z.ZodType< + EditSectionResponse$Outbound, + z.ZodTypeDef, + EditSectionResponse +> = 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 EditSectionResponse$ { + /** @deprecated use `EditSectionResponse$inboundSchema` instead. */ + export const inboundSchema = EditSectionResponse$inboundSchema; + /** @deprecated use `EditSectionResponse$outboundSchema` instead. */ + export const outboundSchema = EditSectionResponse$outboundSchema; + /** @deprecated use `EditSectionResponse$Outbound` instead. */ + export type Outbound = EditSectionResponse$Outbound; +} + +export function editSectionResponseToJSON( + editSectionResponse: EditSectionResponse, +): string { + return JSON.stringify( + EditSectionResponse$outboundSchema.parse(editSectionResponse), + ); +} + +export function editSectionResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EditSectionResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EditSectionResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/editsubscriptionpreferences.ts b/src/sdk/models/operations/editsubscriptionpreferences.ts new file mode 100644 index 00000000..9ca2e999 --- /dev/null +++ b/src/sdk/models/operations/editsubscriptionpreferences.ts @@ -0,0 +1,489 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type EditSubscriptionPreferencesGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type EditSubscriptionPreferencesPrefs = {}; + +export type EditSubscriptionPreferencesRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + subscriptionId: number; + prefs?: EditSubscriptionPreferencesPrefs | undefined; +}; + +export type EditSubscriptionPreferencesResponse = { + /** + * 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; + /** + * OK + */ + mediaContainerWithSubscription?: + | shared.MediaContainerWithSubscription + | undefined; +}; + +/** @internal */ +export const EditSubscriptionPreferencesGlobals$inboundSchema: z.ZodType< + EditSubscriptionPreferencesGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type EditSubscriptionPreferencesGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const EditSubscriptionPreferencesGlobals$outboundSchema: z.ZodType< + EditSubscriptionPreferencesGlobals$Outbound, + z.ZodTypeDef, + EditSubscriptionPreferencesGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EditSubscriptionPreferencesGlobals$ { + /** @deprecated use `EditSubscriptionPreferencesGlobals$inboundSchema` instead. */ + export const inboundSchema = EditSubscriptionPreferencesGlobals$inboundSchema; + /** @deprecated use `EditSubscriptionPreferencesGlobals$outboundSchema` instead. */ + export const outboundSchema = + EditSubscriptionPreferencesGlobals$outboundSchema; + /** @deprecated use `EditSubscriptionPreferencesGlobals$Outbound` instead. */ + export type Outbound = EditSubscriptionPreferencesGlobals$Outbound; +} + +export function editSubscriptionPreferencesGlobalsToJSON( + editSubscriptionPreferencesGlobals: EditSubscriptionPreferencesGlobals, +): string { + return JSON.stringify( + EditSubscriptionPreferencesGlobals$outboundSchema.parse( + editSubscriptionPreferencesGlobals, + ), + ); +} + +export function editSubscriptionPreferencesGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + EditSubscriptionPreferencesGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EditSubscriptionPreferencesGlobals' from JSON`, + ); +} + +/** @internal */ +export const EditSubscriptionPreferencesPrefs$inboundSchema: z.ZodType< + EditSubscriptionPreferencesPrefs, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type EditSubscriptionPreferencesPrefs$Outbound = {}; + +/** @internal */ +export const EditSubscriptionPreferencesPrefs$outboundSchema: z.ZodType< + EditSubscriptionPreferencesPrefs$Outbound, + z.ZodTypeDef, + EditSubscriptionPreferencesPrefs +> = 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 EditSubscriptionPreferencesPrefs$ { + /** @deprecated use `EditSubscriptionPreferencesPrefs$inboundSchema` instead. */ + export const inboundSchema = EditSubscriptionPreferencesPrefs$inboundSchema; + /** @deprecated use `EditSubscriptionPreferencesPrefs$outboundSchema` instead. */ + export const outboundSchema = EditSubscriptionPreferencesPrefs$outboundSchema; + /** @deprecated use `EditSubscriptionPreferencesPrefs$Outbound` instead. */ + export type Outbound = EditSubscriptionPreferencesPrefs$Outbound; +} + +export function editSubscriptionPreferencesPrefsToJSON( + editSubscriptionPreferencesPrefs: EditSubscriptionPreferencesPrefs, +): string { + return JSON.stringify( + EditSubscriptionPreferencesPrefs$outboundSchema.parse( + editSubscriptionPreferencesPrefs, + ), + ); +} + +export function editSubscriptionPreferencesPrefsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EditSubscriptionPreferencesPrefs$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EditSubscriptionPreferencesPrefs' from JSON`, + ); +} + +/** @internal */ +export const EditSubscriptionPreferencesRequest$inboundSchema: z.ZodType< + EditSubscriptionPreferencesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + subscriptionId: z.number().int(), + prefs: z.lazy(() => EditSubscriptionPreferencesPrefs$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type EditSubscriptionPreferencesRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + subscriptionId: number; + prefs?: EditSubscriptionPreferencesPrefs$Outbound | undefined; +}; + +/** @internal */ +export const EditSubscriptionPreferencesRequest$outboundSchema: z.ZodType< + EditSubscriptionPreferencesRequest$Outbound, + z.ZodTypeDef, + EditSubscriptionPreferencesRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + subscriptionId: z.number().int(), + prefs: z.lazy(() => EditSubscriptionPreferencesPrefs$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EditSubscriptionPreferencesRequest$ { + /** @deprecated use `EditSubscriptionPreferencesRequest$inboundSchema` instead. */ + export const inboundSchema = EditSubscriptionPreferencesRequest$inboundSchema; + /** @deprecated use `EditSubscriptionPreferencesRequest$outboundSchema` instead. */ + export const outboundSchema = + EditSubscriptionPreferencesRequest$outboundSchema; + /** @deprecated use `EditSubscriptionPreferencesRequest$Outbound` instead. */ + export type Outbound = EditSubscriptionPreferencesRequest$Outbound; +} + +export function editSubscriptionPreferencesRequestToJSON( + editSubscriptionPreferencesRequest: EditSubscriptionPreferencesRequest, +): string { + return JSON.stringify( + EditSubscriptionPreferencesRequest$outboundSchema.parse( + editSubscriptionPreferencesRequest, + ), + ); +} + +export function editSubscriptionPreferencesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + EditSubscriptionPreferencesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EditSubscriptionPreferencesRequest' from JSON`, + ); +} + +/** @internal */ +export const EditSubscriptionPreferencesResponse$inboundSchema: z.ZodType< + EditSubscriptionPreferencesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + MediaContainerWithSubscription: shared + .MediaContainerWithSubscription$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "MediaContainerWithSubscription": "mediaContainerWithSubscription", + }); +}); + +/** @internal */ +export type EditSubscriptionPreferencesResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + MediaContainerWithSubscription?: + | shared.MediaContainerWithSubscription$Outbound + | undefined; +}; + +/** @internal */ +export const EditSubscriptionPreferencesResponse$outboundSchema: z.ZodType< + EditSubscriptionPreferencesResponse$Outbound, + z.ZodTypeDef, + EditSubscriptionPreferencesResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + mediaContainerWithSubscription: shared + .MediaContainerWithSubscription$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + mediaContainerWithSubscription: "MediaContainerWithSubscription", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EditSubscriptionPreferencesResponse$ { + /** @deprecated use `EditSubscriptionPreferencesResponse$inboundSchema` instead. */ + export const inboundSchema = + EditSubscriptionPreferencesResponse$inboundSchema; + /** @deprecated use `EditSubscriptionPreferencesResponse$outboundSchema` instead. */ + export const outboundSchema = + EditSubscriptionPreferencesResponse$outboundSchema; + /** @deprecated use `EditSubscriptionPreferencesResponse$Outbound` instead. */ + export type Outbound = EditSubscriptionPreferencesResponse$Outbound; +} + +export function editSubscriptionPreferencesResponseToJSON( + editSubscriptionPreferencesResponse: EditSubscriptionPreferencesResponse, +): string { + return JSON.stringify( + EditSubscriptionPreferencesResponse$outboundSchema.parse( + editSubscriptionPreferencesResponse, + ), + ); +} + +export function editSubscriptionPreferencesResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + EditSubscriptionPreferencesResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EditSubscriptionPreferencesResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/emptytrash.ts b/src/sdk/models/operations/emptytrash.ts new file mode 100644 index 00000000..423f7f1c --- /dev/null +++ b/src/sdk/models/operations/emptytrash.ts @@ -0,0 +1,405 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type EmptyTrashGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type EmptyTrashRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * Section identifier + */ + sectionId: number; +}; + +export type EmptyTrashResponse = { + /** + * 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 EmptyTrashGlobals$inboundSchema: z.ZodType< + EmptyTrashGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type EmptyTrashGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const EmptyTrashGlobals$outboundSchema: z.ZodType< + EmptyTrashGlobals$Outbound, + z.ZodTypeDef, + EmptyTrashGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EmptyTrashGlobals$ { + /** @deprecated use `EmptyTrashGlobals$inboundSchema` instead. */ + export const inboundSchema = EmptyTrashGlobals$inboundSchema; + /** @deprecated use `EmptyTrashGlobals$outboundSchema` instead. */ + export const outboundSchema = EmptyTrashGlobals$outboundSchema; + /** @deprecated use `EmptyTrashGlobals$Outbound` instead. */ + export type Outbound = EmptyTrashGlobals$Outbound; +} + +export function emptyTrashGlobalsToJSON( + emptyTrashGlobals: EmptyTrashGlobals, +): string { + return JSON.stringify( + EmptyTrashGlobals$outboundSchema.parse(emptyTrashGlobals), + ); +} + +export function emptyTrashGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EmptyTrashGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EmptyTrashGlobals' from JSON`, + ); +} + +/** @internal */ +export const EmptyTrashRequest$inboundSchema: z.ZodType< + EmptyTrashRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + sectionId: z.number().int(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type EmptyTrashRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + sectionId: number; +}; + +/** @internal */ +export const EmptyTrashRequest$outboundSchema: z.ZodType< + EmptyTrashRequest$Outbound, + z.ZodTypeDef, + EmptyTrashRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + sectionId: z.number().int(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EmptyTrashRequest$ { + /** @deprecated use `EmptyTrashRequest$inboundSchema` instead. */ + export const inboundSchema = EmptyTrashRequest$inboundSchema; + /** @deprecated use `EmptyTrashRequest$outboundSchema` instead. */ + export const outboundSchema = EmptyTrashRequest$outboundSchema; + /** @deprecated use `EmptyTrashRequest$Outbound` instead. */ + export type Outbound = EmptyTrashRequest$Outbound; +} + +export function emptyTrashRequestToJSON( + emptyTrashRequest: EmptyTrashRequest, +): string { + return JSON.stringify( + EmptyTrashRequest$outboundSchema.parse(emptyTrashRequest), + ); +} + +export function emptyTrashRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EmptyTrashRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EmptyTrashRequest' from JSON`, + ); +} + +/** @internal */ +export const EmptyTrashResponse$inboundSchema: z.ZodType< + EmptyTrashResponse, + 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 EmptyTrashResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const EmptyTrashResponse$outboundSchema: z.ZodType< + EmptyTrashResponse$Outbound, + z.ZodTypeDef, + EmptyTrashResponse +> = 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 EmptyTrashResponse$ { + /** @deprecated use `EmptyTrashResponse$inboundSchema` instead. */ + export const inboundSchema = EmptyTrashResponse$inboundSchema; + /** @deprecated use `EmptyTrashResponse$outboundSchema` instead. */ + export const outboundSchema = EmptyTrashResponse$outboundSchema; + /** @deprecated use `EmptyTrashResponse$Outbound` instead. */ + export type Outbound = EmptyTrashResponse$Outbound; +} + +export function emptyTrashResponseToJSON( + emptyTrashResponse: EmptyTrashResponse, +): string { + return JSON.stringify( + EmptyTrashResponse$outboundSchema.parse(emptyTrashResponse), + ); +} + +export function emptyTrashResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EmptyTrashResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EmptyTrashResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/enablepapertrail.ts b/src/sdk/models/operations/enablepapertrail.ts index ea6da92d..c4c7b5cf 100644 --- a/src/sdk/models/operations/enablepapertrail.ts +++ b/src/sdk/models/operations/enablepapertrail.ts @@ -8,7 +8,97 @@ import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export type EnablePaperTrailResponse = { +export type EnablePapertrailGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type EnablePapertrailRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * The number of minutes logging should be sent to Papertrail + */ + minutes?: number | undefined; +}; + +export type EnablePapertrailResponse = { /** * HTTP response content type for this operation */ @@ -24,8 +114,225 @@ export type EnablePaperTrailResponse = { }; /** @internal */ -export const EnablePaperTrailResponse$inboundSchema: z.ZodType< - EnablePaperTrailResponse, +export const EnablePapertrailGlobals$inboundSchema: z.ZodType< + EnablePapertrailGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type EnablePapertrailGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const EnablePapertrailGlobals$outboundSchema: z.ZodType< + EnablePapertrailGlobals$Outbound, + z.ZodTypeDef, + EnablePapertrailGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EnablePapertrailGlobals$ { + /** @deprecated use `EnablePapertrailGlobals$inboundSchema` instead. */ + export const inboundSchema = EnablePapertrailGlobals$inboundSchema; + /** @deprecated use `EnablePapertrailGlobals$outboundSchema` instead. */ + export const outboundSchema = EnablePapertrailGlobals$outboundSchema; + /** @deprecated use `EnablePapertrailGlobals$Outbound` instead. */ + export type Outbound = EnablePapertrailGlobals$Outbound; +} + +export function enablePapertrailGlobalsToJSON( + enablePapertrailGlobals: EnablePapertrailGlobals, +): string { + return JSON.stringify( + EnablePapertrailGlobals$outboundSchema.parse(enablePapertrailGlobals), + ); +} + +export function enablePapertrailGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EnablePapertrailGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EnablePapertrailGlobals' from JSON`, + ); +} + +/** @internal */ +export const EnablePapertrailRequest$inboundSchema: z.ZodType< + EnablePapertrailRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + minutes: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type EnablePapertrailRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + minutes?: number | undefined; +}; + +/** @internal */ +export const EnablePapertrailRequest$outboundSchema: z.ZodType< + EnablePapertrailRequest$Outbound, + z.ZodTypeDef, + EnablePapertrailRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + minutes: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EnablePapertrailRequest$ { + /** @deprecated use `EnablePapertrailRequest$inboundSchema` instead. */ + export const inboundSchema = EnablePapertrailRequest$inboundSchema; + /** @deprecated use `EnablePapertrailRequest$outboundSchema` instead. */ + export const outboundSchema = EnablePapertrailRequest$outboundSchema; + /** @deprecated use `EnablePapertrailRequest$Outbound` instead. */ + export type Outbound = EnablePapertrailRequest$Outbound; +} + +export function enablePapertrailRequestToJSON( + enablePapertrailRequest: EnablePapertrailRequest, +): string { + return JSON.stringify( + EnablePapertrailRequest$outboundSchema.parse(enablePapertrailRequest), + ); +} + +export function enablePapertrailRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EnablePapertrailRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EnablePapertrailRequest' from JSON`, + ); +} + +/** @internal */ +export const EnablePapertrailResponse$inboundSchema: z.ZodType< + EnablePapertrailResponse, z.ZodTypeDef, unknown > = z.object({ @@ -41,17 +348,17 @@ export const EnablePaperTrailResponse$inboundSchema: z.ZodType< }); /** @internal */ -export type EnablePaperTrailResponse$Outbound = { +export type EnablePapertrailResponse$Outbound = { ContentType: string; StatusCode: number; RawResponse: never; }; /** @internal */ -export const EnablePaperTrailResponse$outboundSchema: z.ZodType< - EnablePaperTrailResponse$Outbound, +export const EnablePapertrailResponse$outboundSchema: z.ZodType< + EnablePapertrailResponse$Outbound, z.ZodTypeDef, - EnablePaperTrailResponse + EnablePapertrailResponse > = z.object({ contentType: z.string(), statusCode: z.number().int(), @@ -70,29 +377,29 @@ export const EnablePaperTrailResponse$outboundSchema: z.ZodType< * @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; +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; } -export function enablePaperTrailResponseToJSON( - enablePaperTrailResponse: EnablePaperTrailResponse, +export function enablePapertrailResponseToJSON( + enablePapertrailResponse: EnablePapertrailResponse, ): string { return JSON.stringify( - EnablePaperTrailResponse$outboundSchema.parse(enablePaperTrailResponse), + EnablePapertrailResponse$outboundSchema.parse(enablePapertrailResponse), ); } -export function enablePaperTrailResponseFromJSON( +export function enablePapertrailResponseFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => EnablePaperTrailResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'EnablePaperTrailResponse' from JSON`, + (x) => EnablePapertrailResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EnablePapertrailResponse' from JSON`, ); } diff --git a/src/sdk/models/operations/generatethumbs.ts b/src/sdk/models/operations/generatethumbs.ts new file mode 100644 index 00000000..943646bd --- /dev/null +++ b/src/sdk/models/operations/generatethumbs.ts @@ -0,0 +1,407 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type GenerateThumbsGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type GenerateThumbsRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + ids: string; + force?: shared.BoolInt | undefined; +}; + +export type GenerateThumbsResponse = { + /** + * 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 GenerateThumbsGlobals$inboundSchema: z.ZodType< + GenerateThumbsGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type GenerateThumbsGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const GenerateThumbsGlobals$outboundSchema: z.ZodType< + GenerateThumbsGlobals$Outbound, + z.ZodTypeDef, + GenerateThumbsGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GenerateThumbsGlobals$ { + /** @deprecated use `GenerateThumbsGlobals$inboundSchema` instead. */ + export const inboundSchema = GenerateThumbsGlobals$inboundSchema; + /** @deprecated use `GenerateThumbsGlobals$outboundSchema` instead. */ + export const outboundSchema = GenerateThumbsGlobals$outboundSchema; + /** @deprecated use `GenerateThumbsGlobals$Outbound` instead. */ + export type Outbound = GenerateThumbsGlobals$Outbound; +} + +export function generateThumbsGlobalsToJSON( + generateThumbsGlobals: GenerateThumbsGlobals, +): string { + return JSON.stringify( + GenerateThumbsGlobals$outboundSchema.parse(generateThumbsGlobals), + ); +} + +export function generateThumbsGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GenerateThumbsGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GenerateThumbsGlobals' from JSON`, + ); +} + +/** @internal */ +export const GenerateThumbsRequest$inboundSchema: z.ZodType< + GenerateThumbsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + ids: z.string(), + force: shared.BoolInt$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type GenerateThumbsRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + ids: string; + force?: number | undefined; +}; + +/** @internal */ +export const GenerateThumbsRequest$outboundSchema: z.ZodType< + GenerateThumbsRequest$Outbound, + z.ZodTypeDef, + GenerateThumbsRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + ids: z.string(), + force: shared.BoolInt$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GenerateThumbsRequest$ { + /** @deprecated use `GenerateThumbsRequest$inboundSchema` instead. */ + export const inboundSchema = GenerateThumbsRequest$inboundSchema; + /** @deprecated use `GenerateThumbsRequest$outboundSchema` instead. */ + export const outboundSchema = GenerateThumbsRequest$outboundSchema; + /** @deprecated use `GenerateThumbsRequest$Outbound` instead. */ + export type Outbound = GenerateThumbsRequest$Outbound; +} + +export function generateThumbsRequestToJSON( + generateThumbsRequest: GenerateThumbsRequest, +): string { + return JSON.stringify( + GenerateThumbsRequest$outboundSchema.parse(generateThumbsRequest), + ); +} + +export function generateThumbsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GenerateThumbsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GenerateThumbsRequest' from JSON`, + ); +} + +/** @internal */ +export const GenerateThumbsResponse$inboundSchema: z.ZodType< + GenerateThumbsResponse, + 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 GenerateThumbsResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; +}; + +/** @internal */ +export const GenerateThumbsResponse$outboundSchema: z.ZodType< + GenerateThumbsResponse$Outbound, + z.ZodTypeDef, + GenerateThumbsResponse +> = 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 GenerateThumbsResponse$ { + /** @deprecated use `GenerateThumbsResponse$inboundSchema` instead. */ + export const inboundSchema = GenerateThumbsResponse$inboundSchema; + /** @deprecated use `GenerateThumbsResponse$outboundSchema` instead. */ + export const outboundSchema = GenerateThumbsResponse$outboundSchema; + /** @deprecated use `GenerateThumbsResponse$Outbound` instead. */ + export type Outbound = GenerateThumbsResponse$Outbound; +} + +export function generateThumbsResponseToJSON( + generateThumbsResponse: GenerateThumbsResponse, +): string { + return JSON.stringify( + GenerateThumbsResponse$outboundSchema.parse(generateThumbsResponse), + ); +} + +export function generateThumbsResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GenerateThumbsResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GenerateThumbsResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/getactorslibrary.ts b/src/sdk/models/operations/getactorslibrary.ts deleted file mode 100644 index f7db3225..00000000 --- a/src/sdk/models/operations/getactorslibrary.ts +++ /dev/null @@ -1,567 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * The type of media to retrieve or filter by. - * - * @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 - */ -export enum GetActorsLibraryQueryParamType { - Movie = 1, - TvShow = 2, - Season = 3, - Episode = 4, - Artist = 5, - Album = 6, - Track = 7, - PhotoAlbum = 8, - Photo = 9, -} -/** - * The type of media to retrieve or filter by. - * - * @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 - */ -export type GetActorsLibraryQueryParamTypeOpen = OpenEnum< - typeof GetActorsLibraryQueryParamType ->; - -export type GetActorsLibraryRequest = { - /** - * 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 or filter by. - * - * @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: GetActorsLibraryQueryParamTypeOpen; -}; - -export type GetActorsLibraryDirectory = { - /** - * A fast lookup key for the actor relative url. - */ - fastKey: string; - /** - * URL for the thumbnail image of the actor. - */ - thumb: string; - /** - * A unique key representing the actor. - */ - key: string; - /** - * The name of the actor. - */ - title: string; -}; - -export type GetActorsLibraryMediaContainer = { - /** - * Number of media items returned in this response. - */ - size: number; - /** - * Indicates whether syncing is allowed. - */ - allowSync: boolean; - /** - * URL for the background artwork of the media container. - */ - art: string; - /** - * An plugin identifier for the media container. - */ - identifier: string; - /** - * The prefix used for media tag resource paths. - */ - mediaTagPrefix: string; - /** - * The version number for media tags. - */ - mediaTagVersion: number; - /** - * Specifies whether caching is disabled. - */ - nocache: boolean; - /** - * URL for the thumbnail image of the media container. - */ - thumb: string; - /** - * The primary title of the media container. - */ - title1: string; - /** - * The secondary title of the media container. - */ - title2: string; - /** - * Identifier for the view group layout. - */ - viewGroup: string; - /** - * Identifier for the view mode. - */ - viewMode?: string | undefined; - /** - * An array of actor entries for media items. - */ - directory?: Array | undefined; -}; - -/** - * Successful response containing media container data. - */ -export type GetActorsLibraryResponseBody = { - mediaContainer?: GetActorsLibraryMediaContainer | undefined; -}; - -export type GetActorsLibraryResponse = { - /** - * 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 containing media container data. - */ - object?: GetActorsLibraryResponseBody | undefined; -}; - -/** @internal */ -export const GetActorsLibraryQueryParamType$inboundSchema: z.ZodType< - GetActorsLibraryQueryParamTypeOpen, - z.ZodTypeDef, - unknown -> = z - .union([ - z.nativeEnum(GetActorsLibraryQueryParamType), - z.number().transform(catchUnrecognizedEnum), - ]); - -/** @internal */ -export const GetActorsLibraryQueryParamType$outboundSchema: z.ZodType< - GetActorsLibraryQueryParamTypeOpen, - z.ZodTypeDef, - GetActorsLibraryQueryParamTypeOpen -> = z.union([ - z.nativeEnum(GetActorsLibraryQueryParamType), - z.number().and(z.custom>()), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetActorsLibraryQueryParamType$ { - /** @deprecated use `GetActorsLibraryQueryParamType$inboundSchema` instead. */ - export const inboundSchema = GetActorsLibraryQueryParamType$inboundSchema; - /** @deprecated use `GetActorsLibraryQueryParamType$outboundSchema` instead. */ - export const outboundSchema = GetActorsLibraryQueryParamType$outboundSchema; -} - -/** @internal */ -export const GetActorsLibraryRequest$inboundSchema: z.ZodType< - GetActorsLibraryRequest, - z.ZodTypeDef, - unknown -> = z.object({ - sectionKey: z.number().int(), - type: GetActorsLibraryQueryParamType$inboundSchema, -}); - -/** @internal */ -export type GetActorsLibraryRequest$Outbound = { - sectionKey: number; - type: number; -}; - -/** @internal */ -export const GetActorsLibraryRequest$outboundSchema: z.ZodType< - GetActorsLibraryRequest$Outbound, - z.ZodTypeDef, - GetActorsLibraryRequest -> = z.object({ - sectionKey: z.number().int(), - type: GetActorsLibraryQueryParamType$outboundSchema, -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetActorsLibraryRequest$ { - /** @deprecated use `GetActorsLibraryRequest$inboundSchema` instead. */ - export const inboundSchema = GetActorsLibraryRequest$inboundSchema; - /** @deprecated use `GetActorsLibraryRequest$outboundSchema` instead. */ - export const outboundSchema = GetActorsLibraryRequest$outboundSchema; - /** @deprecated use `GetActorsLibraryRequest$Outbound` instead. */ - export type Outbound = GetActorsLibraryRequest$Outbound; -} - -export function getActorsLibraryRequestToJSON( - getActorsLibraryRequest: GetActorsLibraryRequest, -): string { - return JSON.stringify( - GetActorsLibraryRequest$outboundSchema.parse(getActorsLibraryRequest), - ); -} - -export function getActorsLibraryRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetActorsLibraryRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetActorsLibraryRequest' from JSON`, - ); -} - -/** @internal */ -export const GetActorsLibraryDirectory$inboundSchema: z.ZodType< - GetActorsLibraryDirectory, - z.ZodTypeDef, - unknown -> = z.object({ - fastKey: z.string(), - thumb: z.string(), - key: z.string(), - title: z.string(), -}); - -/** @internal */ -export type GetActorsLibraryDirectory$Outbound = { - fastKey: string; - thumb: string; - key: string; - title: string; -}; - -/** @internal */ -export const GetActorsLibraryDirectory$outboundSchema: z.ZodType< - GetActorsLibraryDirectory$Outbound, - z.ZodTypeDef, - GetActorsLibraryDirectory -> = z.object({ - fastKey: z.string(), - thumb: z.string(), - key: z.string(), - title: 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 GetActorsLibraryDirectory$ { - /** @deprecated use `GetActorsLibraryDirectory$inboundSchema` instead. */ - export const inboundSchema = GetActorsLibraryDirectory$inboundSchema; - /** @deprecated use `GetActorsLibraryDirectory$outboundSchema` instead. */ - export const outboundSchema = GetActorsLibraryDirectory$outboundSchema; - /** @deprecated use `GetActorsLibraryDirectory$Outbound` instead. */ - export type Outbound = GetActorsLibraryDirectory$Outbound; -} - -export function getActorsLibraryDirectoryToJSON( - getActorsLibraryDirectory: GetActorsLibraryDirectory, -): string { - return JSON.stringify( - GetActorsLibraryDirectory$outboundSchema.parse(getActorsLibraryDirectory), - ); -} - -export function getActorsLibraryDirectoryFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetActorsLibraryDirectory$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetActorsLibraryDirectory' from JSON`, - ); -} - -/** @internal */ -export const GetActorsLibraryMediaContainer$inboundSchema: z.ZodType< - GetActorsLibraryMediaContainer, - z.ZodTypeDef, - unknown -> = z.object({ - size: z.number().int(), - allowSync: z.boolean(), - art: z.string(), - identifier: z.string(), - mediaTagPrefix: z.string(), - mediaTagVersion: z.number().int(), - nocache: z.boolean(), - thumb: z.string(), - title1: z.string(), - title2: z.string(), - viewGroup: z.string(), - viewMode: z.string().optional(), - Directory: z.array(z.lazy(() => GetActorsLibraryDirectory$inboundSchema)) - .optional(), -}).transform((v) => { - return remap$(v, { - "Directory": "directory", - }); -}); - -/** @internal */ -export type GetActorsLibraryMediaContainer$Outbound = { - size: number; - allowSync: boolean; - art: string; - identifier: string; - mediaTagPrefix: string; - mediaTagVersion: number; - nocache: boolean; - thumb: string; - title1: string; - title2: string; - viewGroup: string; - viewMode?: string | undefined; - Directory?: Array | undefined; -}; - -/** @internal */ -export const GetActorsLibraryMediaContainer$outboundSchema: z.ZodType< - GetActorsLibraryMediaContainer$Outbound, - z.ZodTypeDef, - GetActorsLibraryMediaContainer -> = z.object({ - size: z.number().int(), - allowSync: z.boolean(), - art: z.string(), - identifier: z.string(), - mediaTagPrefix: z.string(), - mediaTagVersion: z.number().int(), - nocache: z.boolean(), - thumb: z.string(), - title1: z.string(), - title2: z.string(), - viewGroup: z.string(), - viewMode: z.string().optional(), - directory: z.array(z.lazy(() => GetActorsLibraryDirectory$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 GetActorsLibraryMediaContainer$ { - /** @deprecated use `GetActorsLibraryMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetActorsLibraryMediaContainer$inboundSchema; - /** @deprecated use `GetActorsLibraryMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetActorsLibraryMediaContainer$outboundSchema; - /** @deprecated use `GetActorsLibraryMediaContainer$Outbound` instead. */ - export type Outbound = GetActorsLibraryMediaContainer$Outbound; -} - -export function getActorsLibraryMediaContainerToJSON( - getActorsLibraryMediaContainer: GetActorsLibraryMediaContainer, -): string { - return JSON.stringify( - GetActorsLibraryMediaContainer$outboundSchema.parse( - getActorsLibraryMediaContainer, - ), - ); -} - -export function getActorsLibraryMediaContainerFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetActorsLibraryMediaContainer$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetActorsLibraryMediaContainer' from JSON`, - ); -} - -/** @internal */ -export const GetActorsLibraryResponseBody$inboundSchema: z.ZodType< - GetActorsLibraryResponseBody, - z.ZodTypeDef, - unknown -> = z.object({ - MediaContainer: z.lazy(() => GetActorsLibraryMediaContainer$inboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - "MediaContainer": "mediaContainer", - }); -}); - -/** @internal */ -export type GetActorsLibraryResponseBody$Outbound = { - MediaContainer?: GetActorsLibraryMediaContainer$Outbound | undefined; -}; - -/** @internal */ -export const GetActorsLibraryResponseBody$outboundSchema: z.ZodType< - GetActorsLibraryResponseBody$Outbound, - z.ZodTypeDef, - GetActorsLibraryResponseBody -> = z.object({ - mediaContainer: z.lazy(() => GetActorsLibraryMediaContainer$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 GetActorsLibraryResponseBody$ { - /** @deprecated use `GetActorsLibraryResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetActorsLibraryResponseBody$inboundSchema; - /** @deprecated use `GetActorsLibraryResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetActorsLibraryResponseBody$outboundSchema; - /** @deprecated use `GetActorsLibraryResponseBody$Outbound` instead. */ - export type Outbound = GetActorsLibraryResponseBody$Outbound; -} - -export function getActorsLibraryResponseBodyToJSON( - getActorsLibraryResponseBody: GetActorsLibraryResponseBody, -): string { - return JSON.stringify( - GetActorsLibraryResponseBody$outboundSchema.parse( - getActorsLibraryResponseBody, - ), - ); -} - -export function getActorsLibraryResponseBodyFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetActorsLibraryResponseBody$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetActorsLibraryResponseBody' from JSON`, - ); -} - -/** @internal */ -export const GetActorsLibraryResponse$inboundSchema: z.ZodType< - GetActorsLibraryResponse, - z.ZodTypeDef, - unknown -> = z.object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetActorsLibraryResponseBody$inboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - "ContentType": "contentType", - "StatusCode": "statusCode", - "RawResponse": "rawResponse", - }); -}); - -/** @internal */ -export type GetActorsLibraryResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetActorsLibraryResponseBody$Outbound | undefined; -}; - -/** @internal */ -export const GetActorsLibraryResponse$outboundSchema: z.ZodType< - GetActorsLibraryResponse$Outbound, - z.ZodTypeDef, - GetActorsLibraryResponse -> = z.object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetActorsLibraryResponseBody$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 GetActorsLibraryResponse$ { - /** @deprecated use `GetActorsLibraryResponse$inboundSchema` instead. */ - export const inboundSchema = GetActorsLibraryResponse$inboundSchema; - /** @deprecated use `GetActorsLibraryResponse$outboundSchema` instead. */ - export const outboundSchema = GetActorsLibraryResponse$outboundSchema; - /** @deprecated use `GetActorsLibraryResponse$Outbound` instead. */ - export type Outbound = GetActorsLibraryResponse$Outbound; -} - -export function getActorsLibraryResponseToJSON( - getActorsLibraryResponse: GetActorsLibraryResponse, -): string { - return JSON.stringify( - GetActorsLibraryResponse$outboundSchema.parse(getActorsLibraryResponse), - ); -} - -export function getActorsLibraryResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetActorsLibraryResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetActorsLibraryResponse' from JSON`, - ); -} diff --git a/src/sdk/models/operations/getalbums.ts b/src/sdk/models/operations/getalbums.ts new file mode 100644 index 00000000..a1b7ba8d --- /dev/null +++ b/src/sdk/models/operations/getalbums.ts @@ -0,0 +1,419 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type GetAlbumsGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type GetAlbumsRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * Section identifier + */ + sectionId: number; +}; + +export type GetAlbumsResponse = { + /** + * 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; + /** + * OK + */ + mediaContainerWithMetadata?: shared.MediaContainerWithMetadata | undefined; +}; + +/** @internal */ +export const GetAlbumsGlobals$inboundSchema: z.ZodType< + GetAlbumsGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type GetAlbumsGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const GetAlbumsGlobals$outboundSchema: z.ZodType< + GetAlbumsGlobals$Outbound, + z.ZodTypeDef, + GetAlbumsGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetAlbumsGlobals$ { + /** @deprecated use `GetAlbumsGlobals$inboundSchema` instead. */ + export const inboundSchema = GetAlbumsGlobals$inboundSchema; + /** @deprecated use `GetAlbumsGlobals$outboundSchema` instead. */ + export const outboundSchema = GetAlbumsGlobals$outboundSchema; + /** @deprecated use `GetAlbumsGlobals$Outbound` instead. */ + export type Outbound = GetAlbumsGlobals$Outbound; +} + +export function getAlbumsGlobalsToJSON( + getAlbumsGlobals: GetAlbumsGlobals, +): string { + return JSON.stringify( + GetAlbumsGlobals$outboundSchema.parse(getAlbumsGlobals), + ); +} + +export function getAlbumsGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAlbumsGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAlbumsGlobals' from JSON`, + ); +} + +/** @internal */ +export const GetAlbumsRequest$inboundSchema: z.ZodType< + GetAlbumsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + sectionId: z.number().int(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type GetAlbumsRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + sectionId: number; +}; + +/** @internal */ +export const GetAlbumsRequest$outboundSchema: z.ZodType< + GetAlbumsRequest$Outbound, + z.ZodTypeDef, + GetAlbumsRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + sectionId: z.number().int(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetAlbumsRequest$ { + /** @deprecated use `GetAlbumsRequest$inboundSchema` instead. */ + export const inboundSchema = GetAlbumsRequest$inboundSchema; + /** @deprecated use `GetAlbumsRequest$outboundSchema` instead. */ + export const outboundSchema = GetAlbumsRequest$outboundSchema; + /** @deprecated use `GetAlbumsRequest$Outbound` instead. */ + export type Outbound = GetAlbumsRequest$Outbound; +} + +export function getAlbumsRequestToJSON( + getAlbumsRequest: GetAlbumsRequest, +): string { + return JSON.stringify( + GetAlbumsRequest$outboundSchema.parse(getAlbumsRequest), + ); +} + +export function getAlbumsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAlbumsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAlbumsRequest' from JSON`, + ); +} + +/** @internal */ +export const GetAlbumsResponse$inboundSchema: z.ZodType< + GetAlbumsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + MediaContainerWithMetadata: shared.MediaContainerWithMetadata$inboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "MediaContainerWithMetadata": "mediaContainerWithMetadata", + }); +}); + +/** @internal */ +export type GetAlbumsResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + MediaContainerWithMetadata?: + | shared.MediaContainerWithMetadata$Outbound + | undefined; +}; + +/** @internal */ +export const GetAlbumsResponse$outboundSchema: z.ZodType< + GetAlbumsResponse$Outbound, + z.ZodTypeDef, + GetAlbumsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + mediaContainerWithMetadata: shared.MediaContainerWithMetadata$outboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + mediaContainerWithMetadata: "MediaContainerWithMetadata", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetAlbumsResponse$ { + /** @deprecated use `GetAlbumsResponse$inboundSchema` instead. */ + export const inboundSchema = GetAlbumsResponse$inboundSchema; + /** @deprecated use `GetAlbumsResponse$outboundSchema` instead. */ + export const outboundSchema = GetAlbumsResponse$outboundSchema; + /** @deprecated use `GetAlbumsResponse$Outbound` instead. */ + export type Outbound = GetAlbumsResponse$Outbound; +} + +export function getAlbumsResponseToJSON( + getAlbumsResponse: GetAlbumsResponse, +): string { + return JSON.stringify( + GetAlbumsResponse$outboundSchema.parse(getAlbumsResponse), + ); +} + +export function getAlbumsResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAlbumsResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAlbumsResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/getallhubs.ts b/src/sdk/models/operations/getallhubs.ts new file mode 100644 index 00000000..7673d06c --- /dev/null +++ b/src/sdk/models/operations/getallhubs.ts @@ -0,0 +1,603 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type GetAllHubsGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type GetAllHubsRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * Limit results to count items + */ + 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?: shared.BoolInt | undefined; + /** + * If provided, limit to only specified hubs + */ + identifier?: Array | undefined; +}; + +/** + * `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * + * @remarks + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +export type GetAllHubsMediaContainer = { + identifier?: string | undefined; + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + * + * @remarks + */ + offset?: number | undefined; + size?: number | undefined; + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + * + * @remarks + */ + totalSize?: number | undefined; + hub?: Array | undefined; +}; + +/** + * OK + */ +export type GetAllHubsResponseBody = { + mediaContainer?: GetAllHubsMediaContainer | undefined; +}; + +export type GetAllHubsResponse = { + /** + * 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; + /** + * OK + */ + object?: GetAllHubsResponseBody | undefined; + headers: { [k: string]: Array }; +}; + +/** @internal */ +export const GetAllHubsGlobals$inboundSchema: z.ZodType< + GetAllHubsGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type GetAllHubsGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const GetAllHubsGlobals$outboundSchema: z.ZodType< + GetAllHubsGlobals$Outbound, + z.ZodTypeDef, + GetAllHubsGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetAllHubsGlobals$ { + /** @deprecated use `GetAllHubsGlobals$inboundSchema` instead. */ + export const inboundSchema = GetAllHubsGlobals$inboundSchema; + /** @deprecated use `GetAllHubsGlobals$outboundSchema` instead. */ + export const outboundSchema = GetAllHubsGlobals$outboundSchema; + /** @deprecated use `GetAllHubsGlobals$Outbound` instead. */ + export type Outbound = GetAllHubsGlobals$Outbound; +} + +export function getAllHubsGlobalsToJSON( + getAllHubsGlobals: GetAllHubsGlobals, +): string { + return JSON.stringify( + GetAllHubsGlobals$outboundSchema.parse(getAllHubsGlobals), + ); +} + +export function getAllHubsGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAllHubsGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAllHubsGlobals' from JSON`, + ); +} + +/** @internal */ +export const GetAllHubsRequest$inboundSchema: z.ZodType< + GetAllHubsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + count: z.number().int().optional(), + onlyTransient: shared.BoolInt$inboundSchema.optional(), + identifier: z.array(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type GetAllHubsRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + count?: number | undefined; + onlyTransient?: number | undefined; + identifier?: Array | undefined; +}; + +/** @internal */ +export const GetAllHubsRequest$outboundSchema: z.ZodType< + GetAllHubsRequest$Outbound, + z.ZodTypeDef, + GetAllHubsRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + count: z.number().int().optional(), + onlyTransient: shared.BoolInt$outboundSchema.optional(), + identifier: z.array(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetAllHubsRequest$ { + /** @deprecated use `GetAllHubsRequest$inboundSchema` instead. */ + export const inboundSchema = GetAllHubsRequest$inboundSchema; + /** @deprecated use `GetAllHubsRequest$outboundSchema` instead. */ + export const outboundSchema = GetAllHubsRequest$outboundSchema; + /** @deprecated use `GetAllHubsRequest$Outbound` instead. */ + export type Outbound = GetAllHubsRequest$Outbound; +} + +export function getAllHubsRequestToJSON( + getAllHubsRequest: GetAllHubsRequest, +): string { + return JSON.stringify( + GetAllHubsRequest$outboundSchema.parse(getAllHubsRequest), + ); +} + +export function getAllHubsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAllHubsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAllHubsRequest' from JSON`, + ); +} + +/** @internal */ +export const GetAllHubsMediaContainer$inboundSchema: z.ZodType< + GetAllHubsMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + identifier: z.string().optional(), + offset: z.number().int().optional(), + size: z.number().int().optional(), + totalSize: z.number().int().optional(), + Hub: z.array(shared.Hub$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "Hub": "hub", + }); +}); + +/** @internal */ +export type GetAllHubsMediaContainer$Outbound = { + identifier?: string | undefined; + offset?: number | undefined; + size?: number | undefined; + totalSize?: number | undefined; + Hub?: Array | undefined; +}; + +/** @internal */ +export const GetAllHubsMediaContainer$outboundSchema: z.ZodType< + GetAllHubsMediaContainer$Outbound, + z.ZodTypeDef, + GetAllHubsMediaContainer +> = z.object({ + identifier: z.string().optional(), + offset: z.number().int().optional(), + size: z.number().int().optional(), + totalSize: z.number().int().optional(), + hub: z.array(shared.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 GetAllHubsMediaContainer$ { + /** @deprecated use `GetAllHubsMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetAllHubsMediaContainer$inboundSchema; + /** @deprecated use `GetAllHubsMediaContainer$outboundSchema` instead. */ + export const outboundSchema = GetAllHubsMediaContainer$outboundSchema; + /** @deprecated use `GetAllHubsMediaContainer$Outbound` instead. */ + export type Outbound = GetAllHubsMediaContainer$Outbound; +} + +export function getAllHubsMediaContainerToJSON( + getAllHubsMediaContainer: GetAllHubsMediaContainer, +): string { + return JSON.stringify( + GetAllHubsMediaContainer$outboundSchema.parse(getAllHubsMediaContainer), + ); +} + +export function getAllHubsMediaContainerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAllHubsMediaContainer$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAllHubsMediaContainer' from JSON`, + ); +} + +/** @internal */ +export const GetAllHubsResponseBody$inboundSchema: z.ZodType< + GetAllHubsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetAllHubsMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); + +/** @internal */ +export type GetAllHubsResponseBody$Outbound = { + MediaContainer?: GetAllHubsMediaContainer$Outbound | undefined; +}; + +/** @internal */ +export const GetAllHubsResponseBody$outboundSchema: z.ZodType< + GetAllHubsResponseBody$Outbound, + z.ZodTypeDef, + GetAllHubsResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetAllHubsMediaContainer$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 GetAllHubsResponseBody$ { + /** @deprecated use `GetAllHubsResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetAllHubsResponseBody$inboundSchema; + /** @deprecated use `GetAllHubsResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetAllHubsResponseBody$outboundSchema; + /** @deprecated use `GetAllHubsResponseBody$Outbound` instead. */ + export type Outbound = GetAllHubsResponseBody$Outbound; +} + +export function getAllHubsResponseBodyToJSON( + getAllHubsResponseBody: GetAllHubsResponseBody, +): string { + return JSON.stringify( + GetAllHubsResponseBody$outboundSchema.parse(getAllHubsResponseBody), + ); +} + +export function getAllHubsResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAllHubsResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAllHubsResponseBody' from JSON`, + ); +} + +/** @internal */ +export const GetAllHubsResponse$inboundSchema: z.ZodType< + GetAllHubsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetAllHubsResponseBody$inboundSchema).optional(), + Headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "Headers": "headers", + }); +}); + +/** @internal */ +export type GetAllHubsResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetAllHubsResponseBody$Outbound | undefined; + Headers: { [k: string]: Array }; +}; + +/** @internal */ +export const GetAllHubsResponse$outboundSchema: z.ZodType< + GetAllHubsResponse$Outbound, + z.ZodTypeDef, + GetAllHubsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetAllHubsResponseBody$outboundSchema).optional(), + headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + 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 GetAllHubsResponse$ { + /** @deprecated use `GetAllHubsResponse$inboundSchema` instead. */ + export const inboundSchema = GetAllHubsResponse$inboundSchema; + /** @deprecated use `GetAllHubsResponse$outboundSchema` instead. */ + export const outboundSchema = GetAllHubsResponse$outboundSchema; + /** @deprecated use `GetAllHubsResponse$Outbound` instead. */ + export type Outbound = GetAllHubsResponse$Outbound; +} + +export function getAllHubsResponseToJSON( + getAllHubsResponse: GetAllHubsResponse, +): string { + return JSON.stringify( + GetAllHubsResponse$outboundSchema.parse(getAllHubsResponse), + ); +} + +export function getAllHubsResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAllHubsResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAllHubsResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/getallitemleaves.ts b/src/sdk/models/operations/getallitemleaves.ts new file mode 100644 index 00000000..00cf99cb --- /dev/null +++ b/src/sdk/models/operations/getallitemleaves.ts @@ -0,0 +1,422 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type GetAllItemLeavesGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type GetAllItemLeavesRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + ids: string; +}; + +export type GetAllItemLeavesResponse = { + /** + * 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; + /** + * OK + */ + mediaContainerWithMetadata?: shared.MediaContainerWithMetadata | undefined; + headers: { [k: string]: Array }; +}; + +/** @internal */ +export const GetAllItemLeavesGlobals$inboundSchema: z.ZodType< + GetAllItemLeavesGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type GetAllItemLeavesGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const GetAllItemLeavesGlobals$outboundSchema: z.ZodType< + GetAllItemLeavesGlobals$Outbound, + z.ZodTypeDef, + GetAllItemLeavesGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetAllItemLeavesGlobals$ { + /** @deprecated use `GetAllItemLeavesGlobals$inboundSchema` instead. */ + export const inboundSchema = GetAllItemLeavesGlobals$inboundSchema; + /** @deprecated use `GetAllItemLeavesGlobals$outboundSchema` instead. */ + export const outboundSchema = GetAllItemLeavesGlobals$outboundSchema; + /** @deprecated use `GetAllItemLeavesGlobals$Outbound` instead. */ + export type Outbound = GetAllItemLeavesGlobals$Outbound; +} + +export function getAllItemLeavesGlobalsToJSON( + getAllItemLeavesGlobals: GetAllItemLeavesGlobals, +): string { + return JSON.stringify( + GetAllItemLeavesGlobals$outboundSchema.parse(getAllItemLeavesGlobals), + ); +} + +export function getAllItemLeavesGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAllItemLeavesGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAllItemLeavesGlobals' from JSON`, + ); +} + +/** @internal */ +export const GetAllItemLeavesRequest$inboundSchema: z.ZodType< + GetAllItemLeavesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + ids: z.string(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type GetAllItemLeavesRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + ids: string; +}; + +/** @internal */ +export const GetAllItemLeavesRequest$outboundSchema: z.ZodType< + GetAllItemLeavesRequest$Outbound, + z.ZodTypeDef, + GetAllItemLeavesRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + ids: z.string(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetAllItemLeavesRequest$ { + /** @deprecated use `GetAllItemLeavesRequest$inboundSchema` instead. */ + export const inboundSchema = GetAllItemLeavesRequest$inboundSchema; + /** @deprecated use `GetAllItemLeavesRequest$outboundSchema` instead. */ + export const outboundSchema = GetAllItemLeavesRequest$outboundSchema; + /** @deprecated use `GetAllItemLeavesRequest$Outbound` instead. */ + export type Outbound = GetAllItemLeavesRequest$Outbound; +} + +export function getAllItemLeavesRequestToJSON( + getAllItemLeavesRequest: GetAllItemLeavesRequest, +): string { + return JSON.stringify( + GetAllItemLeavesRequest$outboundSchema.parse(getAllItemLeavesRequest), + ); +} + +export function getAllItemLeavesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAllItemLeavesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAllItemLeavesRequest' from JSON`, + ); +} + +/** @internal */ +export const GetAllItemLeavesResponse$inboundSchema: z.ZodType< + GetAllItemLeavesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + MediaContainerWithMetadata: shared.MediaContainerWithMetadata$inboundSchema + .optional(), + Headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "MediaContainerWithMetadata": "mediaContainerWithMetadata", + "Headers": "headers", + }); +}); + +/** @internal */ +export type GetAllItemLeavesResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + MediaContainerWithMetadata?: + | shared.MediaContainerWithMetadata$Outbound + | undefined; + Headers: { [k: string]: Array }; +}; + +/** @internal */ +export const GetAllItemLeavesResponse$outboundSchema: z.ZodType< + GetAllItemLeavesResponse$Outbound, + z.ZodTypeDef, + GetAllItemLeavesResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + mediaContainerWithMetadata: shared.MediaContainerWithMetadata$outboundSchema + .optional(), + headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + mediaContainerWithMetadata: "MediaContainerWithMetadata", + 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 GetAllItemLeavesResponse$ { + /** @deprecated use `GetAllItemLeavesResponse$inboundSchema` instead. */ + export const inboundSchema = GetAllItemLeavesResponse$inboundSchema; + /** @deprecated use `GetAllItemLeavesResponse$outboundSchema` instead. */ + export const outboundSchema = GetAllItemLeavesResponse$outboundSchema; + /** @deprecated use `GetAllItemLeavesResponse$Outbound` instead. */ + export type Outbound = GetAllItemLeavesResponse$Outbound; +} + +export function getAllItemLeavesResponseToJSON( + getAllItemLeavesResponse: GetAllItemLeavesResponse, +): string { + return JSON.stringify( + GetAllItemLeavesResponse$outboundSchema.parse(getAllItemLeavesResponse), + ); +} + +export function getAllItemLeavesResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAllItemLeavesResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAllItemLeavesResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/getalllanguages.ts b/src/sdk/models/operations/getalllanguages.ts new file mode 100644 index 00000000..adacb900 --- /dev/null +++ b/src/sdk/models/operations/getalllanguages.ts @@ -0,0 +1,346 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type Language = { + /** + * 3 letter language code + */ + code?: string | undefined; + title?: string | undefined; +}; + +/** + * `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. + * + * @remarks + * Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) + * The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. + */ +export type GetAllLanguagesMediaContainer = { + identifier?: string | undefined; + /** + * The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. + * + * @remarks + */ + offset?: number | undefined; + size?: number | undefined; + /** + * The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. + * + * @remarks + */ + totalSize?: number | undefined; + language?: Array | undefined; +}; + +/** + * OK + */ +export type GetAllLanguagesResponseBody = { + mediaContainer?: GetAllLanguagesMediaContainer | undefined; +}; + +export type GetAllLanguagesResponse = { + /** + * 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; + /** + * OK + */ + object?: GetAllLanguagesResponseBody | undefined; + headers: { [k: string]: Array }; +}; + +/** @internal */ +export const Language$inboundSchema: z.ZodType< + Language, + z.ZodTypeDef, + unknown +> = z.object({ + code: z.string().optional(), + title: z.string().optional(), +}); + +/** @internal */ +export type Language$Outbound = { + code?: string | undefined; + title?: string | undefined; +}; + +/** @internal */ +export const Language$outboundSchema: z.ZodType< + Language$Outbound, + z.ZodTypeDef, + Language +> = z.object({ + code: 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 Language$ { + /** @deprecated use `Language$inboundSchema` instead. */ + export const inboundSchema = Language$inboundSchema; + /** @deprecated use `Language$outboundSchema` instead. */ + export const outboundSchema = Language$outboundSchema; + /** @deprecated use `Language$Outbound` instead. */ + export type Outbound = Language$Outbound; +} + +export function languageToJSON(language: Language): string { + return JSON.stringify(Language$outboundSchema.parse(language)); +} + +export function languageFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Language$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Language' from JSON`, + ); +} + +/** @internal */ +export const GetAllLanguagesMediaContainer$inboundSchema: z.ZodType< + GetAllLanguagesMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + identifier: z.string().optional(), + offset: z.number().int().optional(), + size: z.number().int().optional(), + totalSize: z.number().int().optional(), + Language: z.array(z.lazy(() => Language$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Language": "language", + }); +}); + +/** @internal */ +export type GetAllLanguagesMediaContainer$Outbound = { + identifier?: string | undefined; + offset?: number | undefined; + size?: number | undefined; + totalSize?: number | undefined; + Language?: Array | undefined; +}; + +/** @internal */ +export const GetAllLanguagesMediaContainer$outboundSchema: z.ZodType< + GetAllLanguagesMediaContainer$Outbound, + z.ZodTypeDef, + GetAllLanguagesMediaContainer +> = z.object({ + identifier: z.string().optional(), + offset: z.number().int().optional(), + size: z.number().int().optional(), + totalSize: z.number().int().optional(), + language: z.array(z.lazy(() => Language$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + language: "Language", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetAllLanguagesMediaContainer$ { + /** @deprecated use `GetAllLanguagesMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetAllLanguagesMediaContainer$inboundSchema; + /** @deprecated use `GetAllLanguagesMediaContainer$outboundSchema` instead. */ + export const outboundSchema = GetAllLanguagesMediaContainer$outboundSchema; + /** @deprecated use `GetAllLanguagesMediaContainer$Outbound` instead. */ + export type Outbound = GetAllLanguagesMediaContainer$Outbound; +} + +export function getAllLanguagesMediaContainerToJSON( + getAllLanguagesMediaContainer: GetAllLanguagesMediaContainer, +): string { + return JSON.stringify( + GetAllLanguagesMediaContainer$outboundSchema.parse( + getAllLanguagesMediaContainer, + ), + ); +} + +export function getAllLanguagesMediaContainerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAllLanguagesMediaContainer$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAllLanguagesMediaContainer' from JSON`, + ); +} + +/** @internal */ +export const GetAllLanguagesResponseBody$inboundSchema: z.ZodType< + GetAllLanguagesResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetAllLanguagesMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); + +/** @internal */ +export type GetAllLanguagesResponseBody$Outbound = { + MediaContainer?: GetAllLanguagesMediaContainer$Outbound | undefined; +}; + +/** @internal */ +export const GetAllLanguagesResponseBody$outboundSchema: z.ZodType< + GetAllLanguagesResponseBody$Outbound, + z.ZodTypeDef, + GetAllLanguagesResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetAllLanguagesMediaContainer$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 GetAllLanguagesResponseBody$ { + /** @deprecated use `GetAllLanguagesResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetAllLanguagesResponseBody$inboundSchema; + /** @deprecated use `GetAllLanguagesResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetAllLanguagesResponseBody$outboundSchema; + /** @deprecated use `GetAllLanguagesResponseBody$Outbound` instead. */ + export type Outbound = GetAllLanguagesResponseBody$Outbound; +} + +export function getAllLanguagesResponseBodyToJSON( + getAllLanguagesResponseBody: GetAllLanguagesResponseBody, +): string { + return JSON.stringify( + GetAllLanguagesResponseBody$outboundSchema.parse( + getAllLanguagesResponseBody, + ), + ); +} + +export function getAllLanguagesResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAllLanguagesResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAllLanguagesResponseBody' from JSON`, + ); +} + +/** @internal */ +export const GetAllLanguagesResponse$inboundSchema: z.ZodType< + GetAllLanguagesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetAllLanguagesResponseBody$inboundSchema).optional(), + Headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "Headers": "headers", + }); +}); + +/** @internal */ +export type GetAllLanguagesResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetAllLanguagesResponseBody$Outbound | undefined; + Headers: { [k: string]: Array }; +}; + +/** @internal */ +export const GetAllLanguagesResponse$outboundSchema: z.ZodType< + GetAllLanguagesResponse$Outbound, + z.ZodTypeDef, + GetAllLanguagesResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetAllLanguagesResponseBody$outboundSchema).optional(), + headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + 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 GetAllLanguagesResponse$ { + /** @deprecated use `GetAllLanguagesResponse$inboundSchema` instead. */ + export const inboundSchema = GetAllLanguagesResponse$inboundSchema; + /** @deprecated use `GetAllLanguagesResponse$outboundSchema` instead. */ + export const outboundSchema = GetAllLanguagesResponse$outboundSchema; + /** @deprecated use `GetAllLanguagesResponse$Outbound` instead. */ + export type Outbound = GetAllLanguagesResponse$Outbound; +} + +export function getAllLanguagesResponseToJSON( + getAllLanguagesResponse: GetAllLanguagesResponse, +): string { + return JSON.stringify( + GetAllLanguagesResponse$outboundSchema.parse(getAllLanguagesResponse), + ); +} + +export function getAllLanguagesResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAllLanguagesResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAllLanguagesResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/getallleaves.ts b/src/sdk/models/operations/getallleaves.ts new file mode 100644 index 00000000..74105dea --- /dev/null +++ b/src/sdk/models/operations/getallleaves.ts @@ -0,0 +1,419 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as shared from "../shared/index.js"; + +export type GetAllLeavesGlobals = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; +}; + +export type GetAllLeavesRequest = { + /** + * An opaque identifier unique to the client + */ + xPlexClientIdentifier?: string | undefined; + /** + * The name of the client product + */ + xPlexProduct?: string | undefined; + /** + * The version of the client application + */ + xPlexVersion?: string | undefined; + /** + * The platform of the client + */ + xPlexPlatform?: string | undefined; + /** + * The version of the platform + */ + xPlexPlatformVersion?: string | undefined; + /** + * A relatively friendly name for the client device + */ + xPlexDevice?: string | undefined; + /** + * A potentially less friendly identifier for the device model + */ + xPlexModel?: string | undefined; + /** + * The device vendor + */ + xPlexDeviceVendor?: string | undefined; + /** + * A friendly name for the client + */ + xPlexDeviceName?: string | undefined; + /** + * The marketplace on which the client application is distributed + */ + xPlexMarketplace?: string | undefined; + /** + * Section identifier + */ + sectionId: number; +}; + +export type GetAllLeavesResponse = { + /** + * 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; + /** + * OK + */ + mediaContainerWithMetadata?: shared.MediaContainerWithMetadata | undefined; +}; + +/** @internal */ +export const GetAllLeavesGlobals$inboundSchema: z.ZodType< + GetAllLeavesGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type GetAllLeavesGlobals$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; +}; + +/** @internal */ +export const GetAllLeavesGlobals$outboundSchema: z.ZodType< + GetAllLeavesGlobals$Outbound, + z.ZodTypeDef, + GetAllLeavesGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetAllLeavesGlobals$ { + /** @deprecated use `GetAllLeavesGlobals$inboundSchema` instead. */ + export const inboundSchema = GetAllLeavesGlobals$inboundSchema; + /** @deprecated use `GetAllLeavesGlobals$outboundSchema` instead. */ + export const outboundSchema = GetAllLeavesGlobals$outboundSchema; + /** @deprecated use `GetAllLeavesGlobals$Outbound` instead. */ + export type Outbound = GetAllLeavesGlobals$Outbound; +} + +export function getAllLeavesGlobalsToJSON( + getAllLeavesGlobals: GetAllLeavesGlobals, +): string { + return JSON.stringify( + GetAllLeavesGlobals$outboundSchema.parse(getAllLeavesGlobals), + ); +} + +export function getAllLeavesGlobalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAllLeavesGlobals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAllLeavesGlobals' from JSON`, + ); +} + +/** @internal */ +export const GetAllLeavesRequest$inboundSchema: z.ZodType< + GetAllLeavesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), + "X-Plex-Version": z.string().optional(), + "X-Plex-Platform": z.string().optional(), + "X-Plex-Platform-Version": z.string().optional(), + "X-Plex-Device": z.string().optional(), + "X-Plex-Model": z.string().optional(), + "X-Plex-Device-Vendor": z.string().optional(), + "X-Plex-Device-Name": z.string().optional(), + "X-Plex-Marketplace": z.string().optional(), + sectionId: z.number().int(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + "X-Plex-Version": "xPlexVersion", + "X-Plex-Platform": "xPlexPlatform", + "X-Plex-Platform-Version": "xPlexPlatformVersion", + "X-Plex-Device": "xPlexDevice", + "X-Plex-Model": "xPlexModel", + "X-Plex-Device-Vendor": "xPlexDeviceVendor", + "X-Plex-Device-Name": "xPlexDeviceName", + "X-Plex-Marketplace": "xPlexMarketplace", + }); +}); + +/** @internal */ +export type GetAllLeavesRequest$Outbound = { + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; + "X-Plex-Version"?: string | undefined; + "X-Plex-Platform"?: string | undefined; + "X-Plex-Platform-Version"?: string | undefined; + "X-Plex-Device"?: string | undefined; + "X-Plex-Model"?: string | undefined; + "X-Plex-Device-Vendor"?: string | undefined; + "X-Plex-Device-Name"?: string | undefined; + "X-Plex-Marketplace"?: string | undefined; + sectionId: number; +}; + +/** @internal */ +export const GetAllLeavesRequest$outboundSchema: z.ZodType< + GetAllLeavesRequest$Outbound, + z.ZodTypeDef, + GetAllLeavesRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), + xPlexVersion: z.string().optional(), + xPlexPlatform: z.string().optional(), + xPlexPlatformVersion: z.string().optional(), + xPlexDevice: z.string().optional(), + xPlexModel: z.string().optional(), + xPlexDeviceVendor: z.string().optional(), + xPlexDeviceName: z.string().optional(), + xPlexMarketplace: z.string().optional(), + sectionId: z.number().int(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + xPlexVersion: "X-Plex-Version", + xPlexPlatform: "X-Plex-Platform", + xPlexPlatformVersion: "X-Plex-Platform-Version", + xPlexDevice: "X-Plex-Device", + xPlexModel: "X-Plex-Model", + xPlexDeviceVendor: "X-Plex-Device-Vendor", + xPlexDeviceName: "X-Plex-Device-Name", + xPlexMarketplace: "X-Plex-Marketplace", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetAllLeavesRequest$ { + /** @deprecated use `GetAllLeavesRequest$inboundSchema` instead. */ + export const inboundSchema = GetAllLeavesRequest$inboundSchema; + /** @deprecated use `GetAllLeavesRequest$outboundSchema` instead. */ + export const outboundSchema = GetAllLeavesRequest$outboundSchema; + /** @deprecated use `GetAllLeavesRequest$Outbound` instead. */ + export type Outbound = GetAllLeavesRequest$Outbound; +} + +export function getAllLeavesRequestToJSON( + getAllLeavesRequest: GetAllLeavesRequest, +): string { + return JSON.stringify( + GetAllLeavesRequest$outboundSchema.parse(getAllLeavesRequest), + ); +} + +export function getAllLeavesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAllLeavesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAllLeavesRequest' from JSON`, + ); +} + +/** @internal */ +export const GetAllLeavesResponse$inboundSchema: z.ZodType< + GetAllLeavesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + MediaContainerWithMetadata: shared.MediaContainerWithMetadata$inboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "MediaContainerWithMetadata": "mediaContainerWithMetadata", + }); +}); + +/** @internal */ +export type GetAllLeavesResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + MediaContainerWithMetadata?: + | shared.MediaContainerWithMetadata$Outbound + | undefined; +}; + +/** @internal */ +export const GetAllLeavesResponse$outboundSchema: z.ZodType< + GetAllLeavesResponse$Outbound, + z.ZodTypeDef, + GetAllLeavesResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + mediaContainerWithMetadata: shared.MediaContainerWithMetadata$outboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + mediaContainerWithMetadata: "MediaContainerWithMetadata", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetAllLeavesResponse$ { + /** @deprecated use `GetAllLeavesResponse$inboundSchema` instead. */ + export const inboundSchema = GetAllLeavesResponse$inboundSchema; + /** @deprecated use `GetAllLeavesResponse$outboundSchema` instead. */ + export const outboundSchema = GetAllLeavesResponse$outboundSchema; + /** @deprecated use `GetAllLeavesResponse$Outbound` instead. */ + export type Outbound = GetAllLeavesResponse$Outbound; +} + +export function getAllLeavesResponseToJSON( + getAllLeavesResponse: GetAllLeavesResponse, +): string { + return JSON.stringify( + GetAllLeavesResponse$outboundSchema.parse(getAllLeavesResponse), + ); +} + +export function getAllLeavesResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAllLeavesResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAllLeavesResponse' from JSON`, + ); +} diff --git a/src/sdk/models/operations/getalllibraries.ts b/src/sdk/models/operations/getalllibraries.ts deleted file mode 100644 index e5aa76c7..00000000 --- a/src/sdk/models/operations/getalllibraries.ts +++ /dev/null @@ -1,625 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * The library type - */ -export enum GetAllLibrariesType { - Movie = "movie", - TvShow = "show", - Season = "season", - Episode = "episode", - Artist = "artist", - Album = "album", - Track = "track", - PhotoAlbum = "photoalbum", - Photo = "photo", - Collection = "collection", -} -/** - * The library type - */ -export type GetAllLibrariesTypeOpen = OpenEnum; - -/** - * The Plex library visibility setting - */ -export enum Hidden { - Visible = 0, - ExcludeHomeScreen = 1, - ExcludeHomeScreenAndGlobalSearch = 2, -} - -export type GetAllLibrariesLocation = { - /** - * The ID of the location. - */ - id: number; - /** - * The path to the media item. - */ - path: string; -}; - -export type GetAllLibrariesDirectory = { - /** - * Indicates whether syncing is allowed. - */ - allowSync: boolean; - /** - * URL for the background artwork of the media container. - */ - art: string; - /** - * The relative path to the composite media item. - */ - composite: string; - /** - * UNKNOWN - */ - filters: boolean; - /** - * Indicates whether the library is currently being refreshed or updated - */ - refreshing: boolean; - /** - * URL for the thumbnail image of the media container. - */ - thumb: string; - /** - * The library key representing the unique identifier - */ - key: string; - type: GetAllLibrariesTypeOpen; - /** - * The title of the library - */ - title: string; - /** - * The Plex agent used to match and retrieve media metadata. - */ - agent: string; - /** - * UNKNOWN - */ - scanner: string; - /** - * The Plex library language that has been set - */ - language: string; - /** - * The universally unique identifier for the library. - */ - uuid: string; - /** - * Unix epoch datetime in seconds - */ - updatedAt: number; - createdAt?: number | undefined; - /** - * Unix epoch datetime in seconds - */ - scannedAt: number; - /** - * UNKNOWN - */ - content: boolean; - /** - * UNKNOWN - */ - directory: boolean; - /** - * Timestamp (in seconds) representing the last time the content was modified. - * - * @remarks - * NOTE: Some Plex server have some absurd values for this field, like 8457612157633039800 so it should be int64 - */ - contentChangedAt: number; - /** - * The Plex library visibility setting - */ - hidden?: Hidden | undefined; - location: Array; -}; - -export type GetAllLibrariesMediaContainer = { - /** - * Number of media items returned in this response. - */ - size: number; - /** - * Indicates whether syncing is allowed. - */ - allowSync: boolean; - /** - * The primary title of the media container. - */ - title1: string; - directory?: Array | undefined; -}; - -/** - * The libraries available on the Server - */ -export type GetAllLibrariesResponseBody = { - 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; -}; - -/** @internal */ -export const GetAllLibrariesType$inboundSchema: z.ZodType< - GetAllLibrariesTypeOpen, - z.ZodTypeDef, - unknown -> = z - .union([ - z.nativeEnum(GetAllLibrariesType), - z.string().transform(catchUnrecognizedEnum), - ]); - -/** @internal */ -export const GetAllLibrariesType$outboundSchema: z.ZodType< - GetAllLibrariesTypeOpen, - z.ZodTypeDef, - GetAllLibrariesTypeOpen -> = z.union([ - z.nativeEnum(GetAllLibrariesType), - z.string().and(z.custom>()), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetAllLibrariesType$ { - /** @deprecated use `GetAllLibrariesType$inboundSchema` instead. */ - export const inboundSchema = GetAllLibrariesType$inboundSchema; - /** @deprecated use `GetAllLibrariesType$outboundSchema` instead. */ - export const outboundSchema = GetAllLibrariesType$outboundSchema; -} - -/** @internal */ -export const Hidden$inboundSchema: z.ZodNativeEnum